diff piecrust/admin/views/sources.py @ 886:dcdec4b951a1

admin: Get the admin panel working again.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 20 Jun 2017 21:13:08 -0700
parents 82509bce94ca
children 7ecb946bfafd
line wrap: on
line diff
--- a/piecrust/admin/views/sources.py	Tue Jun 20 21:12:35 2017 -0700
+++ b/piecrust/admin/views/sources.py	Tue Jun 20 21:13:08 2017 -0700
@@ -18,17 +18,16 @@
     default_author = site.config.get('site/author')
     data = {'title': "List %s" % source_name}
     data['pages'] = []
-    pgn = Paginator(None, source, page_num=page_num, items_per_page=20)
+    pgn = Paginator(source, None, sub_num=page_num, items_per_page=20)
     for p in pgn.items:
         page_data = {
             'title': p['title'],
             'author': p.get('author', default_author),
-            'slug': p['slug'],
             'timestamp': p['timestamp'],
             'tags': p.get('tags', []),
             'category': p.get('category'),
             'source': source_name,
-            'url': url_for('.edit_page', slug=p['slug'])
+            'url': url_for('.edit_page', uri=p['slug'])
         }
         data['pages'].append(page_data)