- @property
- def urlpatterns(self):
- urlpatterns = self.feed_patterns(r'^', 'get_all_entries', 'index_page', 'index')
- urlpatterns += self.feed_patterns(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})', 'get_entries_by_ymd', 'entry_archive_page', 'entries_by_day')
- return urlpatterns
+ class BlogView(FeedView):
+ blog = models.ForeignKey(Blog)
+ entry_archive_page = models.ForeignKey(Page)
+
+ @property
+ def urlpatterns(self):
+ urlpatterns = self.feed_patterns(r'^', 'get_all_entries', 'index_page', 'index')
+ urlpatterns += self.feed_patterns(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})', 'get_entries_by_ymd', 'entry_archive_page', 'entries_by_day')
+ return urlpatterns
+
+ def get_entries_by_ymd(request, year, month, day, extra_context=None):
+ entries = Blog.entries.all()
+ # filter entries based on the year, month, and day.
+ return entries, extra_context
+
+ .. seealso:: :meth:`get_feed_type`