Only render comments in debug

This commit is contained in:
Jake Howard 2022-09-02 17:20:03 +01:00
parent 7fff13f0ab
commit 8691d11a15
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 6 additions and 4 deletions

View file

@ -1,5 +1,7 @@
<div class="container"> <section class="container">
<div id="commento"></div> <div id="commento"></div>
</div> </section>
{% if not DEBUG %}
<script async defer src="https://commento.theorangeone.net/js/commento.js"></script> <script async defer src="https://commento.theorangeone.net/js/commento.js"></script>
{% endif %}

View file

@ -3,4 +3,4 @@ from django.http.request import HttpRequest
def global_vars(request: HttpRequest) -> dict: def global_vars(request: HttpRequest) -> dict:
return {"SEO_INDEX": settings.SEO_INDEX} return {"SEO_INDEX": settings.SEO_INDEX, "DEBUG": settings.DEBUG}