File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 99 path ('add/' , views .polls_add , name = 'add' ),
1010 path ('edit/<int:poll_id>/' , views .polls_edit , name = 'edit' ),
1111 path ('delete/<int:poll_id>/' , views .polls_delete , name = 'delete_poll' ),
12- path ('end/<int:poll_id>/' , views .endpoll , name = 'end_poll' ),
12+ path ('end/<int:poll_id>/' , views .end_poll , name = 'end_poll' ),
1313 path ('edit/<int:poll_id>/choice/add/' , views .add_choice , name = 'add_choice' ),
1414 path ('edit/choice/<int:choice_id>/' , views .choice_edit , name = 'choice_edit' ),
1515 path ('delete/choice/<int:choice_id>/' ,
Original file line number Diff line number Diff line change @@ -63,9 +63,9 @@ def polls_add(request):
6363 poll = form .save (commit = False )
6464 poll .owner = request .user
6565 poll .save ()
66- new_choice1 = Choice (
66+ Choice (
6767 poll = poll , choice_text = form .cleaned_data ['choice1' ]).save ()
68- new_choice2 = Choice (
68+ Choice (
6969 poll = poll , choice_text = form .cleaned_data ['choice2' ]).save ()
7070
7171 messages .success (
@@ -210,7 +210,7 @@ def poll_vote(request, poll_id):
210210
211211
212212@login_required
213- def endpoll (request , poll_id ):
213+ def end_poll (request , poll_id ):
214214 poll = get_object_or_404 (Poll , pk = poll_id )
215215 if request .user != poll .owner :
216216 return redirect ('home' )
You can’t perform that action at this time.
0 commit comments