Centos7.2 部署django为啥只出现Django欢迎页面,修改了urls为啥没有效果,只能访问admin
"""
from django.conf.urls import url
from django.contrib import admin
from main.views import host
urlpatterns = [
url(r'^host/$', host),
]
Page not found (404)
Request Method: GET
Request URL: http://193.112.2.120/f
Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
^admin/
The current path, f, 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.