我正在通过https://docs.djangoproject.com/en/1.4/intro/tutorial02/工作。
将 urls.py 更改为
from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'mysite.views.home', name='home'),
# url(r'^mysite/', include('mysite.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
)
当我启动运行服务器时,我得到以下信息:
404 error
Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
^admin/
The current URL, , didn't match any of these.
有什么明显的我做错了吗?
提前致谢,
账单