write a function to extract blog post state from create/edit form.
This commit is contained in:
parent
4cf5b010a5
commit
8c040f7780
@ -28,3 +28,9 @@ def may_edit_blogpost(request, blog):
|
||||
return True
|
||||
return False
|
||||
|
||||
def set_blogpost_state(request, blogpost):
|
||||
if request.form['status'] == 'Publish':
|
||||
blogpost.state = u'processed'
|
||||
else:
|
||||
blogpost.state = u'failed'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user