您的位置:首页 > 产品设计 > UI/UE

Views and URLconfs(The Definitive Guild to Django)

2010-03-25 20:31 441 查看
urls.py 1 from django.conf.urls.defaults import *
2 from mysite.views import hello, abc, hours_ahead
3
4 # Uncomment the next two lines to enable the admin:
5 # from django.contrib import admin
6 # admin.autodiscover()
7
8 urlpatterns = patterns('',
9 ('^hello/$', hello),
('^time/$', abc),
(r'^time/plus/(\d{1,2})/$', hours_ahead),
# Example:
# (r'^mysite/', include('mysite.foo.urls')),

# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),

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