On Thu, Dec 31, 2009 at 1:22 PM, DizzyDoo <mattlu...@googlemail.com> wrote:

> Bill,
>
> It's my own fault for capitalising the file names in the first post,
> but I'll be sure to watch out for that.
>
> Also, I hadn't realised it, but it did seem I was running mod_python
> accidentally, when all I wanted was my django.wsgi. So a quick
> uninstall and a few minutes of testing seems to give the appearence
> everything is just fine.
>
>
Everything may seem to be fine now, when you have DEBUG set to True, but
placing your admin registrations in your models.py file is likely to cause
problems under a production server when  DEBUG is set to False.  There is no
guarantee your models.py file will have been loaded (thus triggering the
admin registration for your model) when a request for an admin URL is
processed.  Thus your admin will not necessarily know about your model.  You
should put admin definitions in a file named admin.py in your app, and
include a call to admin.autodiscover() in your main urls.py file.  That way
the admin registrations will be sure to be run before any view is called.

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-us...@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.


Reply via email to