Re: django 1.11 login user

2017-05-04 Thread ludovic coues
My guess is that your error happen when accessing the page before submitting the firm. So you don't have any POST data and trying to access any key rise an error. You can use request.POST.get("key", "default_value") or you can write an if and testing that request.method is "POST". If I'm wrong, I

Re: Daphne and Intermediate certificate

2017-05-04 Thread Алексей Кузуб
Thank you very much, Andrew! It works! четверг, 4 мая 2017 г., 19:39:49 UTC+3 пользователь Andrew Godwin написал: > > You can - if you use the `-e` method of passing arguments to Daphne, as a > couple of the examples in the README show, you can use the full Twisted > endpoint syntax, which allow

Unit testing Multiselect fields not loading as expected

2017-05-04 Thread Trevor Woolley
Hi, when I run a unittest on a form containing a MultipleChoiceField, and in the unittest I test setting what I think should be a valid field, it does not pass. It appears that field in question extracts the data is uses for the test before the test database is created, and actually uses the pr

Re: Occasional FieldError for a field that really does exist

2017-05-04 Thread Tim Graham
Could it be related to a third-party app similar to https://code.djangoproject.com/ticket/27365#comment:12 ? On Thursday, May 4, 2017 at 5:12:47 PM UTC-4, Evan Heidtmann wrote: > > Hello Django friends, > > > My app, running in production with uwsgi, very occasionally will crash > because of a F

django 1.11 login user

2017-05-04 Thread sum abiut
Hi, i have try to login user using the guide from https://docs.djangoproject.com/en/1.11/topics/auth/default/ but get an error. Can someone advise what i am doin wrong here he is my view.py #Authentication user def login(request): username=request.POST['username'] password=request.POS

Occasional FieldError for a field that really does exist

2017-05-04 Thread Evan Heidtmann
Hello Django friends, My app, running in production with uwsgi, very occasionally will crash because of a FieldError on a (valid) reverse ForeignKey relationship field. Without any code changes, other requests will succeed. Tests that cover this code path always pass. The two models are i

Re: Django Tutorial Issues

2017-05-04 Thread René Fleschenberg
Hi Ivan, It is very likely that your problem is caused by one of these: - `question` is not assigned to the template context - `question` is assigned to the template context, but it has a wrong value (e.g. `None`) - the question has no `id` (it is not saved to the database yet). This then re

Re: Error was: cannot import name 'GDALRaster in Window 8.1

2017-05-04 Thread Daniel Wiesmann
Your question regarding raster2pgsql has nothing to do with Django, so please ask questions related to that somewhere else (for instance onhttps://gis.stackexchange.com/ ) Regarding your first error, could you share the output of the following command on your command line: gdalinfo --version

Django Tutorial Issues

2017-05-04 Thread Ivan Cox
Hi i am new to Django and in the process of going through the django tutorial at https://www.djangoproject.com/ I have however run into problems on Part 4. I have added the following code to the detail.html page {{ question.question_text }} {% if error_message %}{{ error_message }}{% endif %}

Need help with deployment

2017-05-04 Thread sarfaraz ahmed
Hello Friends, I have an Windows 2016 Server edition on EC2. I install Apache 2.4 VC10 on my server and installed 2.7.13 I am not able to find MOD_WSGI.SO for this combination. Can someone provide me steps to compile or link to download -- Thanks with regards, Sarfaraz Ahmed -- You received

Re: Daphne and Intermediate certificate

2017-05-04 Thread Andrew Godwin
You can - if you use the `-e` method of passing arguments to Daphne, as a couple of the examples in the README show, you can use the full Twisted endpoint syntax, which allows a extraCertChain parameter. You can see their documentation here, including example syntax for how that would look: https:

Daphne and Intermediate certificate

2017-05-04 Thread Алексей Кузуб
Hi! I cam using Django channels and Daphne web server. And I want to use web sockets with it over https i.e using SSL. Can Daphne use intermediate certificates and how i can to run this stack? -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: {{ form }} vs {{ form }}

2017-05-04 Thread Todor Velichkov
Take a look at: 1) Form rendering options 2) Outputting forms as HTML {{ form }} and {{ form.as_table }} are basically the same. So in te

{{ form }} vs {{ form }}

2017-05-04 Thread guettli
I am unsure how to render a form. I see these ways - {{ form }} - {{ form }} If I use a model form, then the first way is the correct one. How to you solve this? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: Error was: cannot import name 'GDALRaster in Window 8.1

2017-05-04 Thread Prashant Verma
I have installed it now. But It's showing some error: Can you tell me what is this? How can I able to fix this? C:\Users\Prashant>*gdalinfo --version* ERROR 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\ogr_MSSQLSp atial.dll 126: The specified module could not be found. ERROR

Re: Error was: cannot import name 'GDALRaster in Window 8.1

2017-05-04 Thread Prashant Verma
I have installed it now. But It's showing some error: Can you tell me what is this? How can I able to fix this? C:\Users\Prashant>*gdalinfo --version* ERROR 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\ogr_MSSQLSp atial.dll 126: The specified module could not be found. ERROR 1:

Re: Error was: cannot import name 'GDALRaster in Window 8.1

2017-05-04 Thread Prashant Verma
The error after entered: gdalinfo --version C:\Users\Prashant>gdalinfo --version 'gdalinfo' is not recognized as an internal or external command, operable program or batch file. Though, I have already installed gdal "gdal-201-1800-x64-core" into my system. On 4 May 2017 at 14:43, Prashant Verma

Re: pass context to overridden templates

2017-05-04 Thread Florian Schweikert
On 03/05/17 15:53, cjdcordeiro wrote: > Probably the best would be overriding the app's default class based > view, but when I look at it > (https://github.com/django-notifications/django-notifications/blob/master/notifications/views.py#L29) > it doesn't have a get_context method or anything I can

Re: Django Channels, Nginx, Daphne - Not working?

2017-05-04 Thread Alex Elson
I was able to get it working with the development server, python manage.py runserver, with an addition to the firewall on Google Cloud. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails fro