API-Manager/apimanager/api_config/views.py
Sebastian Henschel ea84b92091 Initial commit
2016-11-09 14:54:47 +01:00

27 lines
685 B
Python

# -*- coding: utf-8 -*-
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic import TemplateView
CONFIG = {
'versions_disabled': ', '.join(['1.4.0', '2.0.0']),
'functions_disabled': ', '.join([
'getBank', 'getBanks', 'getAccounts', 'getAccount',
'getTransactions', 'getTransaction'
]),
'host': 'http://127.0.0.1:8080',
}
class IndexView(LoginRequiredMixin, TemplateView):
template_name = "api_config/index.html"
def get_context_data(self, **kwargs):
context = super(IndexView, self).get_context_data(**kwargs)
context.update({
'config': CONFIG,
})
return context