#11563: Models are not registered at the moment when AdminSite.get_urls() runs, only at mod_wsgi environment -----------------------------+---------------------------------------------- Reporter: daybreaker | Owner: nobody Status: new | Milestone: 1.1 Component: Contrib apps | Version: SVN Keywords: admin urls wsgi | Stage: Unreviewed Has_patch: 0 | -----------------------------+---------------------------------------------- I'm using Django 1.1rc1 on Python 2.5.2 + mod_wsgi 1.3.1 + Apache 2.2.8 on a Ubuntu machine. I have never installed python-django package on this machine--this is a clean custom install.
Everything works fine when I run my project via the test server. But after attaching it to Apache/mod_wsgi, all `/admin/appname/modelname/` urls stopped to work. I've inspected [http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/sites.py#L191 the source code of Django], and used [http://docs.python.org/library/logging.html logging module] around the AdminSite class, and finally found that this problem only occurs when I use mod_wsgi. All model class registration should be done BEFORE get_urls() method runs, and this is correct with the internal test server, but not with mod_wsgi. I don't have any idea why this happens, but if this is a bug of Django, it seems very critical. (I hope not...) -- Ticket URL: <http://code.djangoproject.com/ticket/11563> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---