Hey Guys,
I'm new to Django and computer programming and am currently following
a tutorial from this website:
http://www.zabada.com/tutorials/django-quick-start.php
Everything worked until the activate the admin part.
My code to activate the admin in my records/urls.py is as such:
from django.conf.urls.defaults import *
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Example:
# (r'^djangotest/', include('djangotest.foo.urls')),
# Uncomment the admin/doc line below and add
'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation:
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
(r'^admin/', include(divesh.records.urls)),
)
I don't exactly know what i'm doing, so please help.
divesh is my username
records is the app
This is the error i get when i try to runserver and display the page.
I am a newbie.
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/servers/basehttp.py", line 278, in
run
self.result = application(self.environ, self.start_response)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/servers/basehttp.py", line 636, in
__call__
return self.application(environ, start_response)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/handlers/wsgi.py", line 241, in
__call__
response = self.get_response(request)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/handlers/base.py", line 73, in
get_response
response = middleware_method(request)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/middleware/common.py", line 56, in
process_request
if (not _is_valid_path(request.path_info) and
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/middleware/common.py", line 142, in
_is_valid_path
urlresolvers.resolve(path)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/urlresolvers.py", line 257, in
resolve
return get_resolver(urlconf).resolve(path)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/urlresolvers.py", line 184, in
resolve
for pattern in self.url_patterns:
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/urlresolvers.py", line 208, in
_get_url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns",
self.urlconf_module)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/urlresolvers.py", line 203, in
_get_urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/utils/importlib.py", line 35, in
import_module
__import__(name)
File "/Users/Divesh/djangotest/djangotest/../djangotest/urls.py",
line 16, in
(r'^admin/', include(divesh.records.urls)),
NameError: name 'divesh' is not defined
Please help. thanks in advance.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---