Thanks. Yours was one of the posts I discovered when I googled this but my problem seemed to come out of nowhere and your report seemed to imply a more reproducible issue. Is this problem intermittent or dependant on what type of Django configuration you are using? (i.e. mod_python vs Django dev server)
Anyway. I'll try your fix and report back. thanks AndyB On Apr 1, 2:47 am, Michael <[EMAIL PROTECTED]> wrote: > This is an instance of the AlreadyRegistered exception rearing its > head in the contrib.auth section, something I have been banging my > head against since I originally rewrote the auth code for a personal > project a few months ago. Here is the ticket and a patch that fixes > the problem without quite knowing what that problem > is:http://code.djangoproject.com/ticket/6718 > > A solution to this has been talked about and today I started writing a > post to the Django Devs asking where things were on that, but decided > that I would wait a few more weeks before I start nagging. > > Personally I register all my admin when the urls are originally loaded > by executing this script at the end of my master urls.py: > from django.conf import settings > > for a in settings.INSTALLED_APPS: > try: > __import__(a+'.admin') > except ImportError: > pass > > In auth make sure to remove the last line of the models.py. This > avoids all these really vague AlreadyRegistered errors that you get > with apps that have somewhat circular imports. > > Hope that helps, > > Michael > > On Mon, Mar 31, 2008 at 3:06 PM, AndyB <[EMAIL PROTECTED]> wrote: > > > Some code that has previously worked fine and still works fine on my > > development server has started giving the following error on a > > production server when I try and visit my login page: > > > ViewDoesNotExist at /accounts/login/ > > Could not import django.contrib.auth.views. Error was: cannot import > > name UserCreationForm > > > Logout works fine and it doesn't seem to make any difference what my > > login template contains. As long as it is there I get the same error. > > > Using a fresh checkout of newforms-admin on both and no other > > differences that I am aware of. I can't reproduce the error from the > > shell or on the dev server no matter what. > > > Google the problem has proved intriguing but fruitless. It's late and > > I am fully expecting to say 'doh' any second now but as I've been > > thinking that for the last hour I've decided to post in the hope > > someone can prod me in the right direction :( --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---