urls.py 989 B

1234567891011121314
  1. from django.conf import settings
  2. from django.conf.urls.defaults import *
  3. from historical import views as hi_views
  4. from historical.models import HistoricArticle
  5. # custom views for groups & index
  6. urlpatterns = patterns('historical.views',
  7. url(r'^$', view=hi_views.index, name="hi-index"),
  8. url(r'^(?P<slug>[\-\d\w]+)/$', view=hi_views.group_detail, name='hi-group-detail'),
  9. url(r'^(?P<group_slug>[\-\d\w]+)/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/(?P<slug>[\-\d\w]+)/$', view=hi_views.article_detail, name='hi-article-detail'),
  10. url(r'^(?P<group_slug>[\-\d\w]+)/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/$', view=hi_views.article_archive_day, name='hi-article-archive-day'),
  11. url(r'^(?P<group_slug>[\-\d\w]+)/(?P<year>\d{4})/(?P<month>[a-z]{3})/$', view=hi_views.article_archive_month, name='hi-article-archive-month'),
  12. url(r'^(?P<group_slug>[\-\d\w]+)/(?P<year>\d{4})/$', view=hi_views.article_archive_year, name='hi-article-archive-year'),
  13. )