我的项目名为“tweetme”,当我运行服务器时出现此错误。
Using the URLconf defined in tweetme.urls, Django tried these URL patterns, in this order:
^admin/
^static/(?P<path>.*)$
The empty path didn't match any of these.
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
urls.py 文件:
from django.conf.urls import url, include
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
url(r'^admin/', admin.site.urls),
]
if settings.DEBUG:
urlpatterns += (static(settings.STATIC_URL,
document_root=settings.STATIC_ROOT))
我希望显示:安装成功!祝贺
但它告诉我:页面未找到/