[cmsiki-svn] SF.net SVN: cmsiki: [10] trunk/cmsiki/urls.py
Status: Pre-Alpha
Brought to you by:
cnu
From: <cn...@us...> - 2007-03-24 17:29:17
|
Revision: 10 http://cmsiki.svn.sourceforge.net/cmsiki/?rev=10&view=rev Author: cnu Date: 2007-03-24 10:20:10 -0700 (Sat, 24 Mar 2007) Log Message: ----------- moved categories extra_context to the common info_dict Modified Paths: -------------- trunk/cmsiki/urls.py Modified: trunk/cmsiki/urls.py =================================================================== --- trunk/cmsiki/urls.py 2007-03-24 16:30:54 UTC (rev 9) +++ trunk/cmsiki/urls.py 2007-03-24 17:20:10 UTC (rev 10) @@ -5,6 +5,9 @@ info_dict = { 'queryset': Story.objects.all(), 'date_field': 'pub_date', + 'extra_context':{ + 'categories':Category.objects.all(), + }, } @@ -14,17 +17,11 @@ # Uncomment this for admin: (r'^admin/', include('django.contrib.admin.urls')), -# (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/(?P<slug>[-\w]+)/$', 'object_detail', dict(info_dict, slug_field='slug')), - (r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/$', 'object_detail',\ - dict(info_dict, month_format='%m', slug_field='slug', extra_context={'categories':Category.objects.all()})), - (r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{1,2})/$', 'archive_day', \ - dict(info_dict, month_format='%m', extra_context={'categories':Category.objects.all()})), - (r'^(?P<year>\d{4})/(?P<month>\d{2})/$', 'archive_month',\ - dict(info_dict, month_format='%m', extra_context={'categories':Category.objects.all()})), - (r'^(?P<year>\d{4})/$', 'archive_year', \ - dict(info_dict, extra_context={'categories':Category.objects.all()})), - (r'^/?$', 'archive_index',\ - dict(info_dict, extra_context={'categories':Category.objects.all()})), + (r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/$', 'object_detail', dict(info_dict, month_format='%m', slug_field='slug')), + (r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{1,2})/$', 'archive_day', dict(info_dict, month_format='%m')), + (r'^(?P<year>\d{4})/(?P<month>\d{2})/$', 'archive_month', dict(info_dict, month_format='%m')), + (r'^(?P<year>\d{4})/$', 'archive_year', dict(info_dict)), + (r'^/?$', 'archive_index', dict(info_dict)), ) if settings.DEBUG: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |