标签:增加 操作 查找视图 表达式 from 目的 正则表达 地址栏 urls.py文件
#coding:utf-8 from django.http import HttpResponse def index(request): return HttpResponse("index")
from django.conf.urls import url
from . import views
urlpatterns = [
url(r‘^$‘, views.index),
#url(r‘^index/‘, views.index),
]
url(r‘^‘, include(‘booktest.urls‘)),
from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r‘^admin/‘, include(admin.site.urls)), url(r‘^‘, include(‘booktest.urls‘)), ]
http://127.0.0.1:8000/
标签:增加 操作 查找视图 表达式 from 目的 正则表达 地址栏 urls.py文件
原文地址:https://www.cnblogs.com/yaboya/p/8926181.html