I followed your first suggestion, removing quoted strings, which
didn't make a difference. I don't know why I was importing
django.forms in my models.py as I wasn't using it, so I removed that.
I have now fixed this by simply changing the location of the
admin.autodiscover() line in my urls.py. Before I had:
from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
import settings
from web.views import *
from web.forms import *
from web.feeds import *
import web.models
from django.views.generic.simple import redirect_to
and NOW I have:
from django.conf.urls.defaults import *
import settings
from web.views import *
from web.forms import *
from web.feeds import *
import web.models
from django.views.generic.simple import redirect_to
from django.contrib import admin
admin.autodiscover()
and it works! :) Is this a bug I've just stumbled across, or should
admin.autodiscover() always be after models are imported in urls.py?
Thanks,
Nick
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment