From 21385d1315b5e30bb27dd22f7d5c17e77a886f82 Mon Sep 17 00:00:00 2001 From: Chris Church Date: Wed, 3 Dec 2014 00:33:25 -0500 Subject: [PATCH] Added /portal redirect. Fixes https://trello.com/c/E63JCT96 --- awx/ui/urls.py | 1 + awx/ui/views.py | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/awx/ui/urls.py b/awx/ui/urls.py index 5f713ddadc..94ca5ef5e7 100644 --- a/awx/ui/urls.py +++ b/awx/ui/urls.py @@ -6,4 +6,5 @@ from django.conf.urls import * urlpatterns = patterns('awx.ui.views', url(r'^$', 'index', name='index'), + url(r'^portal/$', 'portal_redirect', name='portal_redirect'), ) diff --git a/awx/ui/views.py b/awx/ui/views.py index 75b58dba68..f329297af4 100644 --- a/awx/ui/views.py +++ b/awx/ui/views.py @@ -1,7 +1,7 @@ # Copyright (c) 2014 AnsibleWorks, Inc. # All Rights Reserved. -from django.views.generic.base import TemplateView +from django.views.generic.base import TemplateView, RedirectView class IndexView(TemplateView): @@ -13,3 +13,9 @@ class IndexView(TemplateView): return context index = IndexView.as_view() + +class PortalRedirectView(RedirectView): + + url = '/#/portal' + +portal_redirect = PortalRedirectView.as_view()