﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
12330	Tutorials Page 2 missing 'from django.contrib import admin' in urls.py	dummydata	nobody	"In the tutorial section that details enabling the admin console, the instructions as they are result in an HTTP 500 error (see full error below) when attempting access the admin URL.

Adding ''''from django.contrib import admin'''' to ''''mysite/urls.py'''' and restarting the test web server solved the issue.  The import statement should be added or clarified in the tutorial.
[[BR]]
[[BR]]

-- ERROR --

Environment:[[BR]]
[[BR]]
Request Method: GET[[BR]]
Request URL: http://localhost:8000/admin/[[BR]]
Django Version: 1.1.1[[BR]]
Python Version: 2.6.4[[BR]]
Installed Applications:[[BR]]
['django.contrib.auth',[[BR]]
 'django.contrib.contenttypes',[[BR]]
 'django.contrib.sessions',[[BR]]
 'django.contrib.sites',[[BR]]
 'django.contrib.admin',[[BR]]
 'inventory.collection'][[BR]]
[[BR]]
Installed Middleware:[[BR]]
('django.middleware.common.CommonMiddleware',[[BR]]
 'django.contrib.sessions.middleware.SessionMiddleware',[[BR]]
 'django.contrib.auth.middleware.AuthenticationMiddleware')[[BR]]
[[BR]]
[[BR]]
Traceback:[[BR]]
File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/core/handlers/base.py"" in get_response[[BR]]
  83.                     request.path_info)[[BR]]
File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/core/urlresolvers.py"" in resolve[[BR]]
  216.             for pattern in self.url_patterns:[[BR]]
File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/core/urlresolvers.py"" in _get_url_patterns[[BR]]
  245.         patterns = getattr(self.urlconf_module, ""urlpatterns"", self.urlconf_module)[[BR]]
File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/core/urlresolvers.py"" in _get_urlconf_module[[BR]]
  240.             self._urlconf_module = import_module(self.urlconf_name)[[BR]]
File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/utils/importlib.py"" in import_module[[BR]]
  35.     __import__(name)[[BR]]
File ""/Users/dru/projects/inventory/../inventory/urls.py"" in <module>[[BR]]
  17.     (r'^admin/', include(admin.site.urls)),[[BR]]
[[BR]]
'''Exception Type: NameError at /admin/'''[[BR]]
'''Exception Value: name 'admin' is not defined'''[[BR]]

"		closed	Uncategorized	1.1		invalid	tutorial admin		Unreviewed	0	0	0	0	0	0
