Added some authentication methods.
This commit is contained in:
parent
b56cd48dec
commit
e61fee8258
@ -71,6 +71,7 @@ class BlogController(BaseController):
|
|||||||
c.page_title = c.post.title
|
c.page_title = c.post.title
|
||||||
return render(u'/blog/view.mako')
|
return render(u'/blog/view.mako')
|
||||||
|
|
||||||
|
@authenticate()
|
||||||
def comment_POST(self, id):
|
def comment_POST(self, id):
|
||||||
if not id:
|
if not id:
|
||||||
h.flash.set_message(u'There was a problem submitting your comment.', u'error')
|
h.flash.set_message(u'There was a problem submitting your comment.', u'error')
|
||||||
|
@ -48,6 +48,7 @@ class PostController(BaseController):
|
|||||||
c.page_title = 'Edit Post: %s' % c.post.title
|
c.page_title = 'Edit Post: %s' % c.post.title
|
||||||
return render(u'/post/edit.mako')
|
return render(u'/post/edit.mako')
|
||||||
|
|
||||||
|
@authenticate()
|
||||||
def edit_POST(self, id=None):
|
def edit_POST(self, id=None):
|
||||||
url = utils.generate_url(c.form_values[u'title'])
|
url = utils.generate_url(c.form_values[u'title'])
|
||||||
if id is None:
|
if id is None:
|
||||||
|
Reference in New Issue
Block a user