首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Centos7.2 部署django路由问题?

Centos7.2 部署django路由问题?

提问于 2018-02-02 10:31:11
回答 3关注 0查看 740

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.

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档