diff --git a/scribeengine/config/routing.py b/scribeengine/config/routing.py index 634fd0d..f8dbc2a 100644 --- a/scribeengine/config/routing.py +++ b/scribeengine/config/routing.py @@ -50,13 +50,13 @@ def make_map(): map.connect('/search', controller='blog', action='search') map.connect('/tag/{id}', controller='blog', action='tag') map.connect('/calendar/{year}/{month}', controller='blog', action='calendar') - map.connect('/page/new', controller='page', action='new') - map.connect('/{url}', controller='page', action='view') map.connect('/{controller}') map.connect('/{controller}/{action}') map.connect('/{controller}/{action}/{id}') + map.connect('/{url}', controller='page', action='view') + map.connect('/', controller='blog', action='index') return map diff --git a/scribeengine/controllers/page.py b/scribeengine/controllers/page.py index d5ef804..da89b25 100644 --- a/scribeengine/controllers/page.py +++ b/scribeengine/controllers/page.py @@ -39,8 +39,8 @@ class PageController(BaseController): def view(self, url): c.page = Session.query(Page)\ .filter_by(url=url)\ - .filter_by(status=u'published')\ .first() + #.filter_by(status=u'published')\ c.page_title = c.page.title return render(u'/page/view.mako') @@ -67,8 +67,8 @@ class PageController(BaseController): else: page = Session.query(Page).get(id) page.modified = datetime.now() - page.title = c.form_values[u'post-title'] - page.body = c.form_values[u'post-body'] + page.title = c.form_values[u'page-title'] + page.body = c.form_values[u'page-body'] page.url = url Session.add(page) Session.commit() diff --git a/scribeengine/templates/base.mako b/scribeengine/templates/base.mako index c9bb25c..da03fec 100644 --- a/scribeengine/templates/base.mako +++ b/scribeengine/templates/base.mako @@ -29,7 +29,7 @@