您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

17 行
674 B

  1. from django.conf.urls import url
  2. from django.views.generic import TemplateView
  3. urlpatterns = [
  4. url(r'^pins/pin-form/$', TemplateView.as_view(template_name='core/pin_form.html'),
  5. name='pin-form'),
  6. url(r'^pins/tags/(?P<tag>(\w|-)+)/$', TemplateView.as_view(template_name='core/pins.html'),
  7. name='tag-pins'),
  8. url(r'^pins/users/(?P<username>(\w|-)+)/$', TemplateView.as_view(template_name='core/pins.html'),
  9. name='user-pins'),
  10. url(r'^(?P<pin>[0-9]+)/$', TemplateView.as_view(template_name='core/pins.html'),
  11. name='pin-detail'),
  12. url(r'^$', TemplateView.as_view(template_name='core/pins.html'),
  13. name='recent-pins'),
  14. ]