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\d+)/$', 'object_detail', dict(queryset=Entry.objects.order_by('-date'))), (r'^entries/(?P[\d\w-]+)/$', 'object_detail', dict(queryset=Entry.objects.order_by('-date'))), ) urlpatterns += patterns('', (r'^rss/(?P.*)/$','django.contrib.syndication.views.feed', {'feed_dict':feed_list}) ) #urlpatterns += patterns('django.views.generic.date_based', #(r'^entries/(?P\d{4})/(?P\d{2})/(?P\d{2})/(?P[\d\w-]+)/$', 'object_detail', #dict(queryset=Entry.objects.all(), date_field='date')), #(r'^entries/(?P\d{4})/(?P\d{2})/$', 'archive_month', #dict(queryset=Entry.objects.all(), date_field='date')), #(r'^entries/(?P\d{4})/$', 'archive_year', #dict(queryset=Entry.objects.all(), date_field='date')), #(r'^microentries/(?P\d{4])/(?P\d{2})/(?P\d{2})/(?P\d+)/$', 'object_detail', #dict(queryset=MicroEntry.objects.all())), #(r'^microentries/(?P\d{4})/(?P\d{2})/$', 'archive_month', #dict(queryset=MicroEntry.objects.all())), #(r'^microentries/(?P\d{4])/$', 'archive_year', #dict(queryset=MicroEntry.objects.all())), #)