On Fri, Jun 11, 2010 at 4:49 AM, Jan Meier <j...@codejunky.org> wrote:

> And my model my_app/models.py looks as follows:
>
> from django.db import models
> from django.contrib import admin
>
> class Blubb(models.Model):
>        x = models.IntegerField()
>
> admin.site.register(Blubb)
>
> Any ideas what could be wrong?
>


Yes, you've got your admin registrations in your models.py file. models.py
won't necessarily be loaded early in a production environment with
DEBUG=False, so these registration calls are not running before you start
using admin. Move admin registrations to an admin.py file and call
admin.autodiscover() in your urls.py file (see
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#hooking-adminsite-instances-into-your-urlconf)
and the problem will go away.

Karen
-- 
http://tracey.org/kmt/

-- 
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