mirror of
https://github.com/ansible/awx.git
synced 2026-02-03 18:48:12 -03:30
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
29 lines
666 B
Python
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()
|