aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django/journal/urls.py
blob: 4b50f4042928be3a6af8a87cf482d6966d1d3f8e (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from django.conf.urls.defaults import *
from django.conf import settings

from models import Entry, MicroEntry
from feeds import feed_list

urlpatterns = patterns('django.views.generic.list_detail',
	(r'^$', 'object_list',
		dict(queryset=Entry.objects.order_by('-date'),
        paginate_by=35, allow_empty=False)),
	(r'^entries/$', 'object_list',
		dict(queryset=Entry.objects.order_by('-date'),
        paginate_by=35, allow_empty=False)),
	(r'^microentries/$', 'object_list',
		dict(queryset=MicroEntry.objects.order_by('-date'),
        paginate_by=35, allow_empty=False)),
	(r'^microentries/(?P<object_id>\d+)/$', 'object_detail',
		dict(queryset=Entry.objects.order_by('-date'))),
	(r'^entries/(?P<slug>[\d\w-]+)/$', 'object_detail',
		dict(queryset=Entry.objects.order_by('-date'))),
)

urlpatterns += patterns('',
    (r'^rss/(?P<url>.*)/$','django.contrib.syndication.views.feed',
        {'feed_dict':feed_list})
)

#urlpatterns += patterns('django.views.generic.date_based',
	#(r'^entries/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>[\d\w-]+)/$', 'object_detail',
		#dict(queryset=Entry.objects.all(), date_field='date')),
	#(r'^entries/(?P<year>\d{4})/(?P<month>\d{2})/$', 'archive_month',
		#dict(queryset=Entry.objects.all(), date_field='date')),
	#(r'^entries/(?P<year>\d{4})/$', 'archive_year',
		#dict(queryset=Entry.objects.all(), date_field='date')),
	#(r'^microentries/(?P<year>\d{4])/(?P<month>\d{2})/(?P<day>\d{2})/(?P<object_id>\d+)/$', 'object_detail',
		#dict(queryset=MicroEntry.objects.all())),
	#(r'^microentries/(?P<year>\d{4})/(?P<month>\d{2})/$', 'archive_month',
		#dict(queryset=MicroEntry.objects.all())),
	#(r'^microentries/(?P<year>\d{4])/$', 'archive_year',
		#dict(queryset=MicroEntry.objects.all())),
#)