summaryrefslogtreecommitdiff
path: root/app/notes/urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/notes/urls.py')
-rw-r--r--app/notes/urls.py31
1 files changed, 24 insertions, 7 deletions
diff --git a/app/notes/urls.py b/app/notes/urls.py
index 9018553..2bec08f 100644
--- a/app/notes/urls.py
+++ b/app/notes/urls.py
@@ -1,8 +1,25 @@
-from django.conf.urls import patterns, url
+from django.conf.urls import url
-urlpatterns = patterns('',
- url(r'(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[-\w]+)$', 'notes.views.entry_detail'),
- url(r'(?P<year>\d{4})/(?P<month>\d{2})/$', 'notes.views.date_list', name="notes_by_month"),
- url(r'(?P<year>\d{4})/$', 'notes.views.date_list', name="notes_by_year"),
- url(r'^$', 'notes.views.entry_list', name="notes_archive"),
-)
+from . import views
+
+urlpatterns = [
+ url(
+ r'(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[-\w]+)$',
+ views.entry_detail
+ ),
+ url(
+ r'(?P<year>\d{4})/(?P<month>\d{2})/$',
+ views.date_list,
+ name="notes_by_month"
+ ),
+ url(
+ r'(?P<year>\d{4})/$',
+ views.date_list,
+ name="notes_by_year"
+ ),
+ url(
+ r'^$',
+ views.entry_list,
+ name="notes_archive"
+ ),
+]