summaryrefslogtreecommitdiff
path: root/app/links/urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/links/urls.py')
-rw-r--r--app/links/urls.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/links/urls.py b/app/links/urls.py
new file mode 100644
index 0000000..5a16d6e
--- /dev/null
+++ b/app/links/urls.py
@@ -0,0 +1,15 @@
+from django.conf.urls.defaults import *
+from django.views.generic import list_detail
+from django.views.generic.simple import redirect_to
+from links.models import Link
+
+photos_paged = {
+ 'queryset': Link.objects.filter(status__exact=1).order_by('-pub_date'),
+ 'paginate': True,
+ 'page_url': '/links/%d/',
+}
+
+urlpatterns = patterns('',
+ (r'^(?P<page>\d+)/$', list_detail.object_list, dict(photos_paged, template_name='archives/links.html')),
+ (r'^$', redirect_to, {'url': '/links/1/'}),
+)