Top "Django-template-filters" questions

django-template-filters refers to django template filters that are used to filter the contents of a variable in django templates

How to sort a list of objects in a template in alphabetic order?

I want to display a list of objects in a Django generic display view ListView class. And, to make it …

django django-templates django-template-filters
update value of a variable inside a template - django

I have seen enough number of examples that allow me to declare a new variable inside a template and set …

django django-templates django-template-filters
How To Use Django Cycle Tag

This hopefully is a pretty easy question. My endgoal is to be able to view my database entries in a …

python django django-templates django-views django-template-filters
"TemplateSyntaxError: Invalid filter:"; custom django template filter based on django docs broken, but template tags working

I have a template filter based on the django docs at https://docs.djangoproject.com/en/1.8/howto/custom-template-tags/. For the …

python django templates django-template-filters
Django manytomany in template format

In one of my models I have a categories field that is a manytomany configuration. I was wondering how to …

django django-templates django-template-filters
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
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
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