aboutsummaryrefslogtreecommitdiff
path: root/weblog/urls.py
diff options
context:
space:
mode:
authorYaroslsav-95 <contact@yaroslavps.com>2018-01-31 08:27:11 +0300
committerYaroslsav-95 <contact@yaroslavps.com>2018-01-31 08:27:11 +0300
commit28b67ad39af15d27bad7e55a0ae7fafe91139239 (patch)
treeb94b7d55bfc8b95f2a3c0b96fe17d6eeee85589f /weblog/urls.py
parent40949b252c9929c755715d3e32df47cd82b095a0 (diff)
downloadw3blog-28b67ad39af15d27bad7e55a0ae7fafe91139239.tar.gz
w3blog-28b67ad39af15d27bad7e55a0ae7fafe91139239.zip
Initial
Diffstat (limited to 'weblog/urls.py')
-rw-r--r--weblog/urls.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/weblog/urls.py b/weblog/urls.py
new file mode 100644
index 0000000..643e8c7
--- /dev/null
+++ b/weblog/urls.py
@@ -0,0 +1,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'),
+] \ No newline at end of file