Top "Django-templates" questions

Questions about the template engine of Django, which is intended to separate the presentation of a document from its data.

Django and Mustache use the same syntax for template

I try to smuggle HTML template in the HTML for mustache.js, however the django template engine remove all the …

javascript django django-templates javascript-framework mustache
Django - Custom Filter to check if File exists

I made this custom filter to check if an image exists or not: from django import template from django.core.…

django django-models django-templates django-template-filters
How to pass javascript variable to django custom filter

Is there a way to access a JavaScript variable in django template code as shown below: var tags_v1 = '{{ …

javascript django django-templates django-template-filters
how to activate DJANGO.CORE.CONTEXT_PROCESSORS.REQUEST

I read this DJANGO.CORE.CONTEXT_PROCESSORS.REQUEST If TEMPLATE_CONTEXT_PROCESSORS contains this processor, every RequestContext will contain a …

django django-templates django-custom-tags
Django: TemplateSyntaxError, Invalid filter

I'm trying to access a value from a dictionary using a variable, all in an HTML file that follows Django's …

django django-templates django-filters
Django-grappelli admin: No reverse match error

I've been working on a django project for a while now that uses grappelli for the admin and all of …

django django-admin django-templates django-grappelli
Sum in html template using template tag

I am trying to sum in HTML,but template tag return 0 , View.py def gen_Report(request): ### query returns below …

python django django-templates django-template-filters
Django humanize outside of template?

I know I can use the humanize module to convert date/time to a friendlier format in the django templates. …

python django django-templates humanize
How to specify context of translation in Django {% trans %} {% blocktrans %}?

Documentation of Django says Contextual markers are also supported by the trans and blocktrans template tags. but it not explained …

django internationalization django-templates django-i18n
Can custom Django filters access request.user?

Is it possible to access the current User (i.e. user in the template context) from a custom template filter? …

django django-templates django-template-filters