标签:学习 访问 参数 enum index 第一个 logs python order
python manage.py startapp demo
from django.shortcuts import render
# Create your views here.
from django.http importHttpResponse
def index(request):
returnHttpResponse("Hello, world. You‘re at the demo index.")
from django.conf.urls import url
from.import views
urlpatterns =[
url(r‘^$‘, views.index, name=‘index‘),
]
from django.conf.urls import include, url
from django.contrib import admin
urlpatterns =[
url(r‘^demo/‘, include(‘demo.urls‘)),
url(r‘^admin/‘, admin.site.urls),
]
url(r‘^$‘, views.index, name=‘index‘),
标签:学习 访问 参数 enum index 第一个 logs python order
原文地址:http://www.cnblogs.com/leejy/p/6745181.html