Django changes to serve ansible-ui.

This commit is contained in:
Kia Lam 2023-02-02 11:14:39 -08:00
parent 61821faa00
commit 68f56570ae
2 changed files with 6 additions and 2 deletions

View File

@ -290,7 +290,7 @@ TEMPLATES = [
],
'builtins': ['awx.main.templatetags.swagger'],
},
'DIRS': [os.path.join(BASE_DIR, 'templates'), os.path.join(BASE_DIR, 'ui', 'build'), os.path.join(BASE_DIR, 'ui', 'public')],
'DIRS': [os.path.join(BASE_DIR, 'templates'), '/var/lib/awx/public/static/controller/', os.path.join(BASE_DIR, 'ui', 'build'), os.path.join(BASE_DIR, 'ui', 'public')],
},
]

View File

@ -9,6 +9,10 @@ class IndexView(TemplateView):
template_name = 'index.html'
class ControllerView(TemplateView):
template_name = 'index_controller.html'
class MigrationsNotran(TemplateView):
@ -27,4 +31,4 @@ class MigrationsNotran(TemplateView):
app_name = 'ui'
urlpatterns = [re_path(r'^$', IndexView.as_view(), name='index'), re_path(r'^migrations_notran/$', MigrationsNotran.as_view(), name='migrations_notran')]
urlpatterns = [re_path(r'^$', IndexView.as_view(), name='index'), re_path(r'^controller/.*$', ControllerView.as_view(), name='index'), re_path(r'^migrations_notran/$', MigrationsNotran.as_view(), name='migrations_notran')]