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.WSGIHandler() Projects that were deployed with WSGI before 1.4 are likely to have kept this code since then, as it worked just fine until 1.7. -- Aymeric. On 6 sept. 2014, at 19:14, Marc Tamlyn <[email protected]> wrote: > * With 1.4 - wsgi.py didn't exist before 1.4 IIRC > > > On 6 September 2014 18:05, Aymeric Augustin > <[email protected]> wrote: > 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 > <[email protected]> wrote: > >> 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.djangoproject.com/? >> >> -- >> Aymeric. >> >> >> >> On 5 sept. 2014, at 09:14, Robert Grant <[email protected]> wrote: >> >>> 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), so I've replaced it with >>> >>> from django.core.wsgi import get_wsgi_application >>> from dj_static import Cling >>> >>> application = Cling(get_wsgi_application()) >>> >>> Which seems to work, although I don't know why. >>> >>> So: >>> 1) Is this a universal thing everyone should do? >>> 2) If everyone is going to hit this same issue, can we add it to the >>> migration docs? >>> 3) If it's already in the migration docs, apologies :) >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Django developers" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at http://groups.google.com/group/django-developers. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-developers/4a301792-988c-49a2-a86d-f08b20aee132%40googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >> > > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-developers. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/9B4736BA-B6AC-409F-866C-95D796435540%40polytechnique.org. > > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-developers. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/CAMwjO1GBiu4s7TgY0Y231W2F1dS5p88LerWGs2DCvPPGRZzAmw%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/E6EE0E20-1793-4D74-B766-5A0CC0EC7007%40polytechnique.org. For more options, visit https://groups.google.com/d/optout.
