I m a complete noob at django and i cant seem to get the admin page up and running. I ve set the urls.py correctly, and i ve enabled the app in the settings.py module...all the database settings are correctly defined. Help please The error thrown is as shown below
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/admin
Django Version: 1.3
Python Version: 2.7.1
Installed Applications:
[ django.contrib.auth ,
django.contrib.contenttypes ,
django.contrib.sessions ,
django.contrib.sites ,
django.contrib.messages ,
django.contrib.staticfiles ,
django.contrib.admin ]
Installed Middleware:
( django.middleware.common.CommonMiddleware ,
jango.contrib.sessions.middleware.SessionMiddleware ,
django.middleware.csrf.CsrfViewMiddleware ,
django.contrib.auth.middleware.AuthenticationMiddleware ,
django.contrib.messages.middleware.MessageMiddleware )
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
89. response = middleware_method(request)
File "/usr/local/lib/python2.7/dist-packages/django/middleware/common.py" in process_request
67. if (not _is_valid_path(request.path_info, urlconf) and
File "/usr/local/lib/python2.7/dist-packages/django/middleware/common.py" in _is_valid_path
154. urlresolvers.resolve(path, urlconf)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" in resolve
342. return get_resolver(urlconf).resolve(path)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" in resolve
250. for pattern in self.url_patterns:
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" in _get_url_patterns
279. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" in _get_urlconf_module
274. self._urlconf_module = import_module(self.urlconf_name)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py" in import_module
35. __import__(name)
File "/home/mjanja/workspace/DjangoProjectsLinux/ModelsDemo/../ModelsDemo/urls.py" in <module>
16. url(r ^admin/ , include(admin.site.urls)),
Exception Type: NameError at /admin
Exception Value: name admin is not defined