mirror of
https://github.com/ansible/awx.git
synced 2024-10-30 13:55:31 +03:00
Add /login convenience URL
This commit is contained in:
parent
f467e26842
commit
2b111c81df
@ -4,7 +4,7 @@
|
||||
import json
|
||||
|
||||
# Django
|
||||
from django.http import HttpResponse
|
||||
from django.http import HttpResponse, HttpResponseRedirect
|
||||
from django.shortcuts import render
|
||||
from django.utils.html import format_html
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
@ -97,3 +97,6 @@ def handle_csp_violation(request):
|
||||
logger = logging.getLogger('awx')
|
||||
logger.error(json.loads(request.body))
|
||||
return HttpResponse(content=None)
|
||||
|
||||
def handle_login_redirect(request):
|
||||
return HttpResponseRedirect("/#/login")
|
||||
|
@ -9,6 +9,7 @@ from awx.main.views import (
|
||||
handle_404,
|
||||
handle_500,
|
||||
handle_csp_violation,
|
||||
handle_login_redirect,
|
||||
)
|
||||
|
||||
|
||||
@ -22,6 +23,7 @@ urlpatterns = [
|
||||
url(r'^(?:api/)?404.html$', handle_404),
|
||||
url(r'^(?:api/)?500.html$', handle_500),
|
||||
url(r'^csp-violation/', handle_csp_violation),
|
||||
url(r'^login/', handle_login_redirect),
|
||||
]
|
||||
|
||||
if settings.SETTINGS_MODULE == 'awx.settings.development':
|
||||
|
Loading…
Reference in New Issue
Block a user