fix pep8 formatting

This commit is contained in:
checktheroads 2021-04-23 07:57:33 -07:00
parent eb55761c38
commit be484d20a2
2 changed files with 12 additions and 12 deletions

View File

@ -37,6 +37,7 @@ OBJ_TYPE_CHOICES = (
)),
)
def build_options():
options = [{"label": OBJ_TYPE_CHOICES[0][1], "items": []}]
@ -49,6 +50,7 @@ def build_options():
options.append({"label": label, "items": items})
return options
class SearchForm(BootstrapMixin, forms.Form):
q = forms.CharField(
label='Search'

View File

@ -54,7 +54,6 @@ class HomeView(View):
status__in=JobResultStatusChoices.TERMINAL_STATE_CHOICES
).defer('data')[:10]
def build_stats():
perms = request.user.get_all_permissions()
stats = []
@ -119,8 +118,6 @@ class HomeView(View):
stats.append(stat)
return stats
changelog = ObjectChange.objects.restrict(request.user, 'view').prefetch_related('user', 'changed_object_type')
# Check whether a new release is available. (Only for staff/superusers.)
@ -195,6 +192,7 @@ class StaticMediaFailureView(View):
"""
Display a user-friendly error message with troubleshooting tips when a static media file fails to load.
"""
def get(self, request):
return render(request, 'media_failure.html', {
'filename': request.GET.get('filename')