def choice_create(poll_id): poll = Poll.get_or_none(Poll.id == poll_id) if not poll: return abort(404) choice = PollServices.create_new_choice_for_poll_from_post_data(poll, request.form) return redirect(url_for('poll', poll_id=poll.id))
def poll(poll_id): poll = Poll.get_or_none(Poll.id == poll_id) if not poll: return abort(404) return views.view_poll(poll)