Hi Alex Yes I have the line from django.contrib import admin" in urls.py
On 9 Feb, 16:20, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Mon, Feb 9, 2009 at 11:11 AM, claudio.br...@googlemail.com < > > > > claudio.br...@googlemail.com> wrote: > > > Hi > > > I am new to django and have just started to play. I have a working > > (small) app but wanted to turn on the admin console for the project. I > > edited the settings.py to include the admin module and now get the > > following errors > > > NameError at /admin/ > > > name 'admin' is not defined > > > Request Method: GET > > Request URL:http://127.0.0.1:8000/admin/ > > Exception Type: NameError > > Exception Value: > > > name 'admin' is not defined > > > although I first saw the error using django 1.0.2, I can re-create it > > using 0.96. I have come to the conclusion that I am doing something > > wrong but can anyone tell me what? > > > the relevant part of my settings.py looks like; > > > INSTALLED_APPS = ( > > 'django.contrib.auth', > > 'django.contrib.contenttypes', > > 'django.contrib.sessions', > > 'django.contrib.sites', > > 'django.contrib.admin', > > ) > > > and URLS looks like > > > # Uncomment the next line to enable the admin: > > (r'^admin/(.*)', admin.site.root), > > ) > > > i have removed evrything else from the project and app and still get > > the errror, at the top of the urls.py it makes no difference whether I > > have the line admin.autodiscover() or not as I still get the error > > > Regards > > > K > > Do you have the line "from django.contrib import admin" in your urls.py? > > Alex > > -- > "I disapprove of what you say, but I will defend to the death your right to > say it." --Voltaire > "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---