django 백그라운드name'admin'is not defined

1225 단어 django
name 'admin' is not defined In tutorial page 2, after you setup admin site, I get "name 'admin' is not defined"then a stacktrace.
add line
from django.contrib import admin to the urls.py. so the file looks like below:
from django.conf.urls.defaults import *
from django.contrib import admin

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
# Example:
# (r'^django01/', include('django01.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(admin.site.urls)),

)
http://groups.wuyasea.com/profile/dorren/articles

좋은 웹페이지 즐겨찾기