+ if self.issue_archive_page:
+ urlpatterns += patterns('',
+ url(r'^(?:%s)/$' % self.issue_permalink_base, self.issue_archive_view)
+ )
+ if self.article_archive_page:
+ urlpatterns += patterns('',
+ url(r'^(?:%s)/' % self.article_permalink_base, include(self.feed_patterns(self.get_all_articles, self.article_archive_page, 'articles')))
+ )
+ if self.article_permalink_style in 'DMY':
+ urlpatterns += patterns('',
+ url(r'^(?:%s)/(?P<year>\d{4})/' % self.article_permalink_base, include(self.feed_patterns(self.get_articles_by_ymd, self.article_archive_page, 'articles_by_year')))
+ )
+ if self.article_permalink_style in 'DM':
+ urlpatterns += patterns('',
+ url(r'^(?:%s)/(?P<year>\d{4})/(?P<month>\d{2})/' % self.article_permalink_base, include(self.feed_patterns(self.get_articles_by_ymd, self.article_archive_page, 'articles_by_month')))
+ )
+ if self.article_permalink_style == 'D':
+ urlpatterns += patterns('',
+ url(r'^(?:%s)/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/' % self.article_permalink_base, include(self.feed_patterns(self.get_articles_by_ymd, self.article_archive_page, 'articles_by_day')))
+ )
+
+ if self.article_permalink_style == 'Y':
+ urlpatterns += patterns('',
+ url(r'^(?:%s)/(?P<year>\d{4})/(?P<slug>[\w-]+)/$' % self.article_permalink_base, self.article_view)
+ )
+ elif self.article_permalink_style == 'M':
+ urlpatterns += patterns('',
+ url(r'^(?:%s)/(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[\w-]+)/$' % self.article_permalink_base, self.article_view)
+ )
+ elif self.article_permalink_style == 'D':
+ urlpatterns += patterns('',
+ url(r'^(?:%s)/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>[\w-]+)/$' % self.article_permalink_base, self.article_view)
+ )
+ else:
+ urlpatterns += patterns('',
+ url(r'^(?:%s)/(?P<slug>[-\w]+)/?$' % self.article_permalink_base, self.article_view)
+ )
+
+ return urlpatterns