django-2.2

Django Nested Views

穿精又带淫゛_ 提交于 2019-12-02 11:50:21
I'm developing an internal application and I would like to be able to nest my views to keep everything nice and organized. I plan on doing this by keeping different parts of the page in their own HTML files with their own Views (separate sidebar and navbar, separate charts, etc). views.py from django.shortcuts import render from django.views.generic import TemplateView import Recall.data_logger.models as DLM class ReportHome(TemplateView): template_name = 'data_logger/index.html' class SelectorSidebar(TemplateView): template_name = 'data_logger/sidebar.html' def get(self, request, *args, *