1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #4332: Redirect to a user-friendly error page when CSS/JS resources fail to load

This commit is contained in:
Jeremy Stretch
2020-03-09 15:33:57 -04:00
parent 93159fec4b
commit 0e49a7a1fd
5 changed files with 98 additions and 15 deletions

View File

@ -300,6 +300,16 @@ class SearchView(View):
})
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')
})
class APIRootView(APIView):
_ignore_model_permissions = True
exclude_from_schema = True