Skip to content

Commit b47e956

Browse files
committed
pep8
1 parent 648c388 commit b47e956

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

example_project/polls/admin.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from django.db.models import F
66
from django.http import HttpResponseRedirect
77

8-
from django_object_actions import (DjangoObjectActions,
9-
takes_instance_or_queryset)
8+
from django_object_actions import (
9+
DjangoObjectActions, takes_instance_or_queryset)
1010

1111
from .models import Choice, Poll, Comment
1212

@@ -42,8 +42,10 @@ def edit_poll(self, request, obj):
4242
def raise_key_error(self, request, obj):
4343
raise KeyError
4444

45-
objectactions = ('increment_vote', 'decrement_vote', 'reset_vote',
46-
'edit_poll', 'raise_key_error')
45+
objectactions = (
46+
'increment_vote', 'decrement_vote', 'reset_vote', 'edit_poll',
47+
'raise_key_error',
48+
)
4749
actions = ['increment_vote']
4850

4951
admin.site.register(Choice, ChoiceAdmin)
@@ -57,7 +59,8 @@ class ChoiceInline(admin.StackedInline):
5759
class PollAdmin(DjangoObjectActions, admin.ModelAdmin):
5860
fieldsets = [
5961
(None, {'fields': ['question']}),
60-
('Date information', {'fields': ['pub_date'], 'classes': ['collapse']}),
62+
('Date information',
63+
{'fields': ['pub_date'], 'classes': ['collapse']}),
6164
]
6265
inlines = [ChoiceInline]
6366
list_display = ('question', 'pub_date', 'was_published_recently')
@@ -74,7 +77,8 @@ def delete_all_choices(self, request, obj):
7477
return
7578

7679
self.message_user(request, 'All choices deleted')
77-
return render_to_response('clear_choices.html',
80+
return render_to_response(
81+
'clear_choices.html',
7882
dict(object=obj), context_instance=RequestContext(request))
7983
delete_all_choices.label = "Delete All Choices"
8084

0 commit comments

Comments
 (0)