Um.... My old convention worked well in the testing environment which has DEBUG off. (./manage.py test)
Anyway, I have another question: When using admin.autodiscover(), how do I override the ModelAdmin classes provided by Django's original contrib packages like contrib.auth? I want to make a customized admin view for User model, but if I try to admin.site.register(), it says 'already registered'. On 7월29일, 오전10시27분, Karen Tracey <kmtra...@gmail.com> wrote: > 2009/7/28 Daybreaker <daybreake...@gmail.com> > > > > > I meant, the phenomenon that mod_wsgi behaves differently with my old > > conventions. > > No, that's not a bug. Do you have DEBUG set to True when you run under dev > server and False under mod_wsgi? There's validation code that is run only > when DEBUG is True that could explain the behavior you reported, as it > ensures your models.py files are loaded early. Even if you have consistent > DEBUG settings in the different environments, it's possible that modules are > getting loaded at different times in the two, which again explains what you > see, and is not a bug. That is why admin.py files for admin registrations > and admin.autodiscover() in urls.py are recommended for simple admin setups > -- this ensures that all the admin registrations are found and run before > any admin url view is entered. > > Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---