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 9
9
path ('add/' , views .polls_add , name = 'add' ),
10
10
path ('edit/<int:poll_id>/' , views .polls_edit , name = 'edit' ),
11
11
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' ),
13
13
path ('edit/<int:poll_id>/choice/add/' , views .add_choice , name = 'add_choice' ),
14
14
path ('edit/choice/<int:choice_id>/' , views .choice_edit , name = 'choice_edit' ),
15
15
path ('delete/choice/<int:choice_id>/' ,
Original file line number Diff line number Diff line change @@ -63,9 +63,9 @@ def polls_add(request):
63
63
poll = form .save (commit = False )
64
64
poll .owner = request .user
65
65
poll .save ()
66
- new_choice1 = Choice (
66
+ Choice (
67
67
poll = poll , choice_text = form .cleaned_data ['choice1' ]).save ()
68
- new_choice2 = Choice (
68
+ Choice (
69
69
poll = poll , choice_text = form .cleaned_data ['choice2' ]).save ()
70
70
71
71
messages .success (
@@ -210,7 +210,7 @@ def poll_vote(request, poll_id):
210
210
211
211
212
212
@login_required
213
- def endpoll (request , poll_id ):
213
+ def end_poll (request , poll_id ):
214
214
poll = get_object_or_404 (Poll , pk = poll_id )
215
215
if request .user != poll .owner :
216
216
return redirect ('home' )
You can’t perform that action at this time.
0 commit comments