标签:site tps page 参考 通过 .com down pre ges
参考链接:https://docs.djangoproject.com/en/1.11/ref/contrib/flatpages/
知识点:
通过django.site
数据库记录表,对应域名
和请求站点的关系;
SITE_ID 进行设置
URLconf中进行通配设置,但须放置到配置最后面:
urlpatterns += [
url(r‘(?P<url>.*/)$‘), views, name="xxx"),
]
from django.contrib.flatpages import views
urlpatterns += [
url(r‘^about-us/$‘, views.flatpage, {‘url‘: ‘/about-us/‘}, name=‘about‘),
url(r‘^license/$‘, views.flatpage, {‘url‘: ‘/license/‘}, name=‘license‘),
]
标签:site tps page 参考 通过 .com down pre ges
原文地址:http://www.cnblogs.com/li1234yun/p/7905364.html