Commits

Guilherme Gondim committed cba765a

URLs refactored

  • Participants
  • Parent commits 7a8da5c

Comments (0)

Files changed (3)

File diario/urls/__init__.py

 # -*- coding: utf-8 -*-
 
-from django.conf.urls import patterns, url
+from django.conf.urls import patterns, include, url
 
 
 urlpatterns = patterns(
-    'diario.views',
-    url('^$', 'entry_list', name='entry-list'),
-    url('^(?P<pk>\d+)-(?P<slug>[-\w]+)/$', 'entry_detail', name='entry-detail'),
-    url('^preview/(?P<pk>\d+)/$', 'entry_preview', name='entry-preview'),
-    url('^feed/$', 'feed', name='feed'),
+    '',
+    url(r'^', include('diario.urls.entries')),
+    url(r'^archive/', include('diario.urls.archive')),
+    url(r'^category/', include('diario.urls.categories')),
+    url(r'^preview/', include('diario.urls.preview')),
+    url(r'^tag/', include('diario.urls.tags')),
 )

File diario/urls/entries.py

+# -*- coding: utf-8 -*-
+
+from django.conf.urls import patterns, url
+
+
+urlpatterns = patterns(
+    'diario.views',
+    url('^$', 'entry_list', name='entry-list'),
+    url('^(?P<pk>\d+)-(?P<slug>[-\w]+)/$', 'entry_detail', name='entry-detail'),
+    url('^feed/$', 'feed', name='feed'),
+)

File diario/urls/preview.py

+# -*- coding: utf-8 -*-
+
+from django.conf.urls import patterns, url
+
+
+urlpatterns = patterns(
+    'diario.views',
+    url('^(?P<pk>\d+)/$', 'entry_preview', name='entry-preview'),
+)