mirror of
https://github.com/ansible/awx.git
synced 2026-03-23 03:45:01 -02:30
throw 404 when UI_NEXT false
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
from django.conf import settings
|
||||||
|
from django.http import Http404
|
||||||
from django.urls import re_path
|
from django.urls import re_path
|
||||||
from django.views.generic.base import TemplateView
|
from django.views.generic.base import TemplateView
|
||||||
|
|
||||||
@@ -5,6 +7,12 @@ from django.views.generic.base import TemplateView
|
|||||||
class IndexView(TemplateView):
|
class IndexView(TemplateView):
|
||||||
template_name = 'index_awx.html'
|
template_name = 'index_awx.html'
|
||||||
|
|
||||||
|
def get_context_data(self, **kwargs):
|
||||||
|
if settings.UI_NEXT is False:
|
||||||
|
raise Http404()
|
||||||
|
|
||||||
|
return super().get_context_data(**kwargs)
|
||||||
|
|
||||||
|
|
||||||
app_name = 'ui_next'
|
app_name = 'ui_next'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user