Exemplo n.º 1
0
def index(request, app_label):
    from public.functions import get_app_list
    apps = get_app_list()
    context = {
        'apps': apps,
        'app_label': app_label
    }
    return TemplateResponse(request, 'dashboard.html', context)
Exemplo n.º 2
0
 def index(self, request):
     from django.template.response import TemplateResponse
     from public.functions import get_app_list
     context = {
         'apps': get_app_list(),
         'app_label': 'dashboard'
     }
     template = "dashboard.html"
     return TemplateResponse(request, template, context)
Exemplo n.º 3
0
def page_view(request, app_label, model_name):
    heads, actions = page_generator(request, app_label, model_name)
    app_list = get_app_list()
    context = dict(app_label=app_label, model_name=model_name, heads=heads, actions=actions, apps=app_list)
    templates = [
        "{0}_{1}.html".format(app_label.lower(), model_name.lower()),
        "model_page.html",
        "public/web_base.html",
    ]
    return render(request, templates, context)
Exemplo n.º 4
0
def page_view(request, app_label, model_name):
    heads, actions = page_generator(request, app_label, model_name)
    app_list = get_app_list()
    context = dict(app_label=app_label,
                   model_name=model_name,
                   heads=heads,
                   actions=actions,
                   apps=app_list)
    templates = [
        '{0}_{1}.html'.format(app_label.lower(), model_name.lower()),
        'model_page.html', 'public/web_base.html'
    ]
    return render(request, templates, context)
Exemplo n.º 5
0
 def index(self, request):
     from django.template.response import TemplateResponse
     from public.functions import get_app_list
     context = {'apps': get_app_list(), 'app_label': 'dashboard'}
     template = "dashboard.html"
     return TemplateResponse(request, template, context)