aboutsummaryrefslogtreecommitdiff
path: root/weblog/urls.py
blob: 643e8c74ce61621b3819279cbc9933c9f17e738c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
from django.conf.urls import url
from . import views

app_name = 'weblog'
urlpatterns = [
    url(r'^$', views.Index, name='Index'),
    url(r'^change-language/(?P<language>[-\w]+)/$', views.ChangeLanguage, name='ChangeLanguage'),
    url(r'^(?P<year>[0-9]{4})/$', views.Index, name='ArchiveIndex'),
    url(r'^(?P<year>[0-9]{4})/(?P<month>[0-9]{1,2})/$', views.Index, name='ArchiveIndex'),
    url(r'^(?P<category_slug>[-\w]+)/$', views.Index, name='CategoryIndex'),
    url(r'^(?P<category_slug>[-\w]+)/(?P<post_slug>[-\w]+)/$', views.PostView, name='PostView'),
]