Re: Proposal: enhance 1.7 migration docs re django.core.handlers.wsgi:WSGIHandler()

2014-09-09 Thread Robert Grant
Thanks for this. Sorry I didn't create the PR over the weekend; I didn't have internet access and only got round to looking now. On Saturday, 6 September 2014 19:19:36 UTC+2, Aymeric Augustin wrote: > > wsgi.py didn’t exist in the project template before 1.4, but our mod_wsgi > docs told people

Re: Proposal: enhance 1.7 migration docs re django.core.handlers.wsgi:WSGIHandler()

2014-09-06 Thread Aymeric Augustin
wsgi.py didn't exist in the project template before 1.4, but our mod_wsgi docs told people to create an "apache.wsgi" file containing: import os import sys os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandle

Re: Proposal: enhance 1.7 migration docs re django.core.handlers.wsgi:WSGIHandler()

2014-09-06 Thread Marc Tamlyn
* With 1.4 - wsgi.py didn't exist before 1.4 IIRC On 6 September 2014 18:05, Aymeric Augustin < aymeric.augus...@polytechnique.org> wrote: > I made this addition here: > https://github.com/django/django/commit/f8fdb7177b79b79968a3f40612d33c7367ae584f > > I’m afraid most projects started before 1

Re: Proposal: enhance 1.7 migration docs re django.core.handlers.wsgi:WSGIHandler()

2014-09-06 Thread Aymeric Augustin
I made this addition here: https://github.com/django/django/commit/f8fdb7177b79b79968a3f40612d33c7367ae584f I'm afraid most projects started before 1.4 will hit this :-/ but the fix is really easy so I haven't tried to change the code. -- Aymeric. On 5 sept. 2014, at 20:23, Aymeric Augustin

Re: Proposal: enhance 1.7 migration docs re django.core.handlers.wsgi:WSGIHandler()

2014-09-05 Thread Aymeric Augustin
Indeed, that was the recommandation until Django 1.3: https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/ And it worked until Django 1.6 but breaks in 1.7. Sorry for missing that. We should add something in the release notes. Would you mind filing a ticket on https://code.djangoproj

Re: Proposal: enhance 1.7 migration docs re django.core.handlers.wsgi:WSGIHandler()

2014-09-05 Thread Russell Keith-Magee
Hi Robert, The "old" version breaks because it's now missing a key part of the Django startup sequence: import django django.setup() This is something that was added in 1.7 as part of the app loading changes. So, to answer your questions directly: 1) You either need to use get_wsgi_application

Re: Proposal: enhance 1.7 migration docs re django.core.handlers.wsgi:WSGIHandler()

2014-09-05 Thread Collin Anderson
I ran into this problem myself upgrading to to django 1.7. The secret is that get_wsgi_application calls django.setup() which is now required to initialize django. I went through and switched all my code to use get_wsgi_application(). get_wsgi_application() has been in the default wsgi.py in ne

Proposal: enhance 1.7 migration docs re django.core.handlers.wsgi:WSGIHandler()

2014-09-05 Thread Robert Grant
I was using import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() as per whichever *This Is The Right Way To Lay Out A Django Application* article I was reading at the time. This seems to now break in 1.7 (details - from someone else - here