mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-21 11:37:21 -06:00
fix pep8 formatting
This commit is contained in:
parent
eb55761c38
commit
be484d20a2
@ -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'
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user