Files
awx/awx/ui/views.py
Matthew Jones b39db745d4 Integrate a migration-detector middleware
This attempts to detect if there are migrations in-progress and will
force display an interstitial page in the process that attempts to
load the index page every 10s until it succeeds.

This is only attached in production settings so the development
environment can proceed even if the migrations haven't been applied yet
2017-09-11 11:09:45 -04:00

29 lines
666 B
Python

# Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
from django.views.generic.base import TemplateView, RedirectView
class IndexView(TemplateView):
template_name = 'ui/index.html'
def get_context_data(self, **kwargs):
context = super(IndexView, self).get_context_data(**kwargs)
# Add any additional context info here.
return context
index = IndexView.as_view()
class PortalRedirectView(RedirectView):
permanent = True
url = '/#/portal'
portal_redirect = PortalRedirectView.as_view()
class MigrationsNotran(TemplateView):
template_name = 'ui/installing.html'
migrations_notran = MigrationsNotran.as_view()