Handle inventory types where Automation Hub collection names differ

Move imports added by Bill to be in-line, because utils should not import models at top

Remove more get_licenser inline imports
This commit is contained in:
Alan Rominger
2021-06-07 16:20:43 -04:00
parent 395af1b5e4
commit 21aa1fc11f
7 changed files with 41 additions and 40 deletions

View File

@@ -2,8 +2,7 @@ from django.conf.urls import url
from django.utils.translation import ugettext_lazy as _
from django.views.generic.base import TemplateView
from awx.main.utils.common import get_licenser
from awx.main.utils.licensing import OpenLicense
from awx.main.utils.licensing import server_product_name
class IndexView(TemplateView):
@@ -17,7 +16,7 @@ class MigrationsNotran(TemplateView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
product_name = 'AWX' if isinstance(get_licenser(), OpenLicense) else 'Red Hat Ansible Automation Platform'
product_name = server_product_name()
context['title'] = _('%s Upgrading' % product_name)
context['image_alt'] = _('Logo')
context['aria_spinner'] = _('Loading')