Commit 72b8375a authored by impfundev's avatar impfundev

fix: shifting homepage from function bases to class based views

parent 25dbefd5
......@@ -18,10 +18,10 @@ Including another URLconf
from django.contrib import admin
from django.urls import path
from django.conf.urls import include
from dashboards.views import home
from dashboards.views import HomePage
urlpatterns = [
path("", home, name="homepage"),
path("", HomePage.as_view(), name="homepage"),
path("dashboard/", include("dashboards.urls")),
path("admin/", admin.site.urls),
path("auth/", include("authentications.urls")),
......
from django.db.models import Q
from django.views.generic import ListView
from django.views.generic import ListView, TemplateView
from django.shortcuts import render
from datetime import datetime, timedelta
......@@ -74,8 +74,8 @@ class UpcomingLoanView(ListView):
return queryset
def home(request):
return render(request, "homepage.html")
class HomePage(TemplateView):
template_name = "homepage.html"
def index(request):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment