Skip to content

Commit

Permalink
Some more small PEP8 compliance changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dlareau committed Feb 7, 2020
1 parent b26a0ad commit 754130e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions huntserver/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def formfield_for_manytomany(self, db_field, request, **kwargs):
query = models.Puzzle.objects.filter(hunt=self.obj.hunt)
kwargs["queryset"] = query.order_by('puzzle_id')
return super(PuzzleAdmin, self).formfield_for_manytomany(db_field, request, **kwargs)

list_filter = ('hunt',)
fields = ('hunt', 'puzzle_name', 'puzzle_number', 'puzzle_id', 'is_meta',
'doesnt_count', 'is_html_puzzle', 'resource_link', 'link', 'solution_link',
Expand Down
3 changes: 2 additions & 1 deletion huntserver/staff_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ def charts(request):
# Chart 3
time_zone = tz.gettz(settings.TIME_ZONE)
subs = Submission.objects.filter(puzzle__hunt=curr_hunt).all().order_by("submission_time")
grouped = itertools.groupby(subs, lambda x: x.submission_time.astimezone(time_zone).strftime("%x - %H:00"))
grouped = itertools.groupby(subs, lambda x: x.submission_time.astimezone(time_zone)
.strftime("%x - %H:00"))
submission_hours = []
for group, matches in grouped:
matches = list(matches)
Expand Down
3 changes: 2 additions & 1 deletion huntserver/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
url(r'^info/$', staff_views.hunt_info, name='hunt_info'),
])),

url(r'^Shibboleth.sso/Logout', base_auth_views.LogoutView.as_view(), name='logout', kwargs={'next_page': '/'}),
url(r'^Shibboleth.sso/Logout', base_auth_views.LogoutView.as_view(), name='logout',
kwargs={'next_page': '/'}),
url(r'^Shibboleth.sso/Login', base_auth_views.LoginView.as_view()),
]

0 comments on commit 754130e

Please sign in to comment.