1π
β
Your view should be using charts.html
, not chart_base.html
(which it extends).
class HomeView(View):
def get(self, request, *args, **kwargs):
return render(request, 'chart.html')
You could use TemplateView
instead of View
:
class HomeView(TemplateView):
template_name = 'chart.html'
In your charts.html
the comment and <script>
tag are not in any block. That means that they wonβt be included in the rendered template, so you can remove them.
{% extends 'chart_base.html' %}
<!-- charts.html jquery -->
<script>
{% block jquery %}
1π
In your base.html
you have a typo. You are closing the <div>
with a <container>
tag.
<footer class="footer">
<div class="container">
{% block footer %}
{% endblock %}
</container>
</footer>
It should be:
<footer class="footer">
<div class="container">
{% block footer %}
{% endblock %}
</div>
</footer>
Also wrap charts.html
in a block so it can be included anywhere.
Source:stackexchange.com