aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django/journal/urls.py
diff options
context:
space:
mode:
authorbnewbold <bnewbold@eta.mit.edu>2009-02-01 06:25:10 -0500
committerbnewbold <bnewbold@eta.mit.edu>2009-02-01 06:25:10 -0500
commitc7b29da94d3b85ec91f0d5e2789db11a43473df5 (patch)
treea5502674da4a9ed8367f911112d34c094481e83c /bn_django/journal/urls.py
parent0988ee83c8a8b24801624beae78ceba1bfa82d07 (diff)
downloadbnewnet-c7b29da94d3b85ec91f0d5e2789db11a43473df5.tar.gz
bnewnet-c7b29da94d3b85ec91f0d5e2789db11a43473df5.zip
lots went on:
* rss feeds * some admin interface stuff * blah running issues: * admin interface with model inheretence? * rss feeds: unicode cool? * proper year/month implementation (don't want day) * right side bar info * dating issue (datetime vs date)
Diffstat (limited to 'bn_django/journal/urls.py')
-rw-r--r--bn_django/journal/urls.py27
1 files changed, 24 insertions, 3 deletions
diff --git a/bn_django/journal/urls.py b/bn_django/journal/urls.py
index 4267e17..4b50f40 100644
--- a/bn_django/journal/urls.py
+++ b/bn_django/journal/urls.py
@@ -2,6 +2,7 @@ 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',
@@ -10,11 +11,31 @@ urlpatterns = patterns('django.views.generic.list_detail',
(r'^entries/$', 'object_list',
dict(queryset=Entry.objects.order_by('-date'),
paginate_by=35, allow_empty=False)),
- (r'^entries/(?P<slug>[\d\w-]+)/$', 'object_detail',
- dict(queryset=Entry.objects.all(), slug_field='slug')),
(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=MicroEntry.objects.all())),
+ 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())),
+#)