您的位置:首页 > 编程语言 > Go语言

django之创建第7-1个项目-url配置高级

2016-04-05 01:31 651 查看
修改urls.PY文件

# -*- coding: UTF-8 -*-
from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('blog.views',
# Uncomment the admin/doc line below to enable admin documentation:
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
#url(r'^$', 'blog.views.index'),
url(r'^blog/index/$', 'index'),
url(r'^blog/time/$', 'time'),
)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: