Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

modify page part

  • Loading branch information...
commit c1b5ed65242bd631060e27fd12fdf4df561ee6d8 1 parent ec151d0
David Shieh authored
Showing with 5 additions and 5 deletions.
  1. +0 −1  templates/page.html
  2. +5 −4 views.py
View
1  templates/page.html
@@ -6,6 +6,5 @@
<div>{{ page.content }}</div>
</div>
</div>
-{% include 'sidebar.html' %}
<br class="clearfloat" />
{% endblock %}
View
9 views.py
@@ -98,10 +98,11 @@ def POST(self, slug):
class page(object):
def GET(self, slug):
- page = list(db.select('pages', where='slug = "%s"' % slug))
- if not page:
- datas['usedTime'] = time.time() - datas['startTime']
- return render.page(**datas)
+ page = web.ctx.orm.query(Page).filter_by(slug=slug).first()
+ if page:
+ d['usedTime'] = time.time() - d['startTime']
+ d['page'] = page
+ return render.page(**d)
class tag(object):
def GET(self, slug):
Please sign in to comment.
Something went wrong with that request. Please try again.