Added some authentication methods.

This commit is contained in:
Raoul Snyman 2010-01-19 21:51:45 +02:00
parent b56cd48dec
commit e61fee8258
2 changed files with 2 additions and 0 deletions

View File

@ -71,6 +71,7 @@ class BlogController(BaseController):
c.page_title = c.post.title
return render(u'/blog/view.mako')
@authenticate()
def comment_POST(self, id):
if not id:
h.flash.set_message(u'There was a problem submitting your comment.', u'error')

View File

@ -48,6 +48,7 @@ class PostController(BaseController):
c.page_title = 'Edit Post: %s' % c.post.title
return render(u'/post/edit.mako')
@authenticate()
def edit_POST(self, id=None):
url = utils.generate_url(c.form_values[u'title'])
if id is None: