Enable simple entry pagination - each h-feed page has a rel=next pointing to the next page of the feed, but there's no visible link yet
This commit is contained in:
parent
ea241577f1
commit
2d2159ee58
5 changed files with 44 additions and 8 deletions
|
|
@ -11,20 +11,24 @@ def prefix(route):
|
|||
return app_name + ':' + route
|
||||
|
||||
|
||||
before = '(?:/before/(?P<before>\d+))?'
|
||||
slug = r'/(?P<slug>[^/]+)'
|
||||
|
||||
app_name = 'entries'
|
||||
urlpatterns = [
|
||||
url('^atom$', feeds.AtomHomeEntries(), name='atom'),
|
||||
url('^rss$', feeds.RssHomeEntries(), name='rss'),
|
||||
url('^cats/(?P<slug>.+)$', views.cat, name='cat'),
|
||||
url(to_pat('cats', slug, before), views.cat, name='cat'),
|
||||
]
|
||||
crumbs.add(prefix('cat'), parent='home:index')
|
||||
|
||||
slug = '(?:' + slug + ')?'
|
||||
|
||||
for k in kinds.all:
|
||||
kind = k.plural
|
||||
id = r'/(?P<id>\d+)'
|
||||
slug = r'(?:/(?P<slug>.+))?'
|
||||
urlpatterns += (
|
||||
url(to_pat(kind), views.index, name=k.index, kwargs={'kind': k}),
|
||||
url(to_pat(kind, before), views.index, name=k.index, kwargs={'kind': k}),
|
||||
url(to_pat(kind, '/atom'), feeds.AtomByKind(k), name=k.atom),
|
||||
url(to_pat(kind, '/rss'), feeds.RssByKind(k), name=k.rss),
|
||||
url(to_pat(kind, id, slug), views.entry, name=k.entry),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue