API-Manager/apimanager/base/views.py
2021-07-28 17:03:31 +02:00

25 lines
640 B
Python

# -*- coding: utf-8 -*-
"""
Views for base app
"""
from django.conf import settings
from django.views.generic import TemplateView
from obp.forms import DirectLoginForm, GatewayLoginForm
class HomeView(TemplateView):
"""View for home page"""
template_name = "home.html"
def get_context_data(self, **kwargs):
context = super(HomeView, self).get_context_data(**kwargs)
context.update({
'API_HOST': settings.API_HOST,
'logo_url': settings.LOGO_URL,
'directlogin_form': DirectLoginForm(),
'gatewaylogin_form': GatewayLoginForm(),
})
return context