aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django/journal/artifact_urls.py
blob: 9a3bde4a102f397209df93e0fedb48e59968a8e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from django.conf.urls.defaults import *
from django.conf import settings

from models import Artifact, VideoArtifact, ImageArtifact, LinkArtifact, CodeArtifact

urlpatterns = patterns('django.views.generic.list_detail',
	(r'^images/$', 'object_list',
		dict(queryset=ImageArtifact.objects.order_by('-date'),
        paginate_by=35, allow_empty=False)),
	(r'^images/(?P<object_id>\d+)/$', 'object_detail',
		dict(queryset=ImageArtifact.objects.all())),
	(r'^links/$', 'object_list',
		dict(queryset=LinkArtifact.objects.order_by('-date'),
        paginate_by=35, allow_empty=False)),
	(r'^links/(?P<object_id>\d+)/$', 'object_detail',
		dict(queryset=LinkArtifact.objects.all())),
	(r'^code/$', 'object_list',
		dict(queryset=CodeArtifact.objects.order_by('-date'),
        paginate_by=35, allow_empty=False)),
	(r'^code/(?P<object_id>\d+)/$', 'object_detail',
		dict(queryset=CodeArtifact.objects.all())),
	(r'^videos/$', 'object_list',
		dict(queryset=VideoArtifact.objects.order_by('-date'),
        paginate_by=35, allow_empty=False)),
	(r'^videos/(?P<object_id>\d+)/$', 'object_detail',
		dict(queryset=VideoArtifact.objects.all())),
)