expephalon-demomodule/core/views/__init__.py

36 lines
1.1 KiB
Python
Raw Normal View History

from django.shortcuts import render
from django.views.generic import TemplateView
from django.conf import settings
from core.views.dbsettings import *
from core.views.auth import *
from core.views.profiles import *
2020-05-21 12:54:59 +00:00
from core.views.generic import *
from core.mixins.auth import AdminMixin
# Create your views here.
class IndexView(TemplateView):
template_name = f"{settings.EXPEPHALON_FRONTEND}/index.html"
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["title"] = "Home"
return context
2020-05-21 12:54:59 +00:00
class DashboardView(BackendTemplateView):
template_name = f"{settings.EXPEPHALON_BACKEND}/index.html"
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["title"] = "Dashboard"
return context
2020-05-21 12:54:59 +00:00
class BackendNotImplementedView(BackendTemplateView):
template_name = f"{settings.EXPEPHALON_BACKEND}/notimplemented.html"
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["title"] = "Oops!"
2020-05-21 12:54:59 +00:00
return context