You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.3 KiB
Python
46 lines
1.3 KiB
Python
from django.urls import reverse_lazy
|
|
from django.views.generic import TemplateView, RedirectView
|
|
from django.shortcuts import render, redirect
|
|
|
|
|
|
# Create your views here.
|
|
class IndexView(TemplateView):
|
|
template_name = 'landing-page.html'
|
|
extra_context = {
|
|
'title': 'Home',
|
|
'description': 'This is the home page of the container application.',
|
|
}
|
|
|
|
def get(self, request, *args, **kwargs):
|
|
return render(request, self.template_name, self.extra_context)
|
|
|
|
|
|
|
|
class DashboardRedirectView(RedirectView):
|
|
is_permanent = False
|
|
|
|
def get_redirect_url(self, *args, **kwargs):
|
|
if 1==1:
|
|
return reverse_lazy('client_dashboard')
|
|
return reverse_lazy('client_dashboard')
|
|
|
|
|
|
class ClientDashboardView(TemplateView):
|
|
template_name = 'client-dashboard.html'
|
|
extra_context = {
|
|
'title': 'Client Dashboard',
|
|
'description': 'This is the client dashboard page.',
|
|
}
|
|
|
|
def get(self, request, *args, **kwargs):
|
|
return render(request, self.template_name, self.extra_context)
|
|
|
|
class ClientPreinfoView(TemplateView):
|
|
template_name = 'client-preinfo.html'
|
|
extra_context = {
|
|
'title': 'Client Preinfo',
|
|
'description': 'This is the client preinfo page.',
|
|
}
|
|
|
|
def get(self, request, *args, **kwargs):
|
|
return render(request, self.template_name, self.extra_context) |