Re: Package a virtualenv to deploy across multiple systems?

2016-09-22 Thread Vadim Serdiuk
Hi. I suggest you to look at Docker. четверг, 22 сентября 2016 г., 4:25:48 UTC+3 пользователь Abraham Varricatt написал: > > Hello, > > Do we have any standard/recommended way to distribute the python > virtualenv used in a django application across multiple servers? > > I'm able to write a prov

Re: Binding a ModelForm to an existing instance

2016-09-05 Thread Vadim Serdiuk
Hi Carlos. At first you should get an article, then put it to the form via instance parameter. If article is not found, instance is None. Than if form is valid, method 'save' creates new object or updates old one. if request.method == 'POST': try: article = Article.objects.get(url=

Re: Blank field object just for headings in form object

2016-09-05 Thread Vadim Serdiuk
Ma I guess you should look at fieldsets https://docs.djangoproject.com/en/1.10/ref/contrib/admin/#django.contrib.admin.ModelAdmin.fieldsets воскресенье, 4 сентября 2016 г., 20:34:52 UTC+3 пользователь Shane Fagan написал: > > Hi, > > I asked this question on Stackoverflow but didn't get any ans

Re: Getting NoReverseMatch at /logout/

2016-03-28 Thread Vadim Serdiuk
Hello. The exception raises because 'boardgames_home' name is defined for group of patterns, and not one. So it was skiped and is undefined in runtime. Use 'name' parameter only for individual pattern, don't use it when include other patterns. Also don't use blank string in url pattern. Use '/

Re: Why does Django allow Circular Model Relation

2016-02-19 Thread Vadim Serdiuk
Why should it be complained? I know a lot of the same cases that may be applied. пятница, 19 февраля 2016 г., 15:00:12 UTC+2 пользователь Eddilbert Macharia написал: > > Hello All, > > I was working on a project, and realized that Django does not complain > when you create Circular Model relati

Re: django-allauth facebook doesn't collect more information other than "name" and "id"

2015-11-02 Thread Vadim Serdiuk
First you should add SCOPE and FIELDS keys to facebook settings (in file settings.py) to allow allauth your website capture other information SOCIALACCOUNT_PROVIDERS = { 'facebook': { 'METHOD': 'oauth2', 'SCOPE': ['email', 'public_profile', 'user_friends'], 'AUTH_PARAM

Re: Solr highlighting through Scorched in Django

2015-10-05 Thread Vadim Serdiuk
Write template tag. понедельник, 5 октября 2015 г., 13:54:29 UTC+3 пользователь Luca Guariento написал: > > Hi all, > > I am trying to output the highlighted search-term from a Solr search. I'm > using Django 1.8.4 with Scorched. > > I have already activated highlighting (resp = ('highlightin