Top "Django-templates" questions

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

How can I check the size of a collection within a Django template?

I have a list in my Django template. I want to do something only if the size of the list …

django django-templates
Reverse for '*' with arguments '()' and keyword arguments '{}' not found

Caught an exception while rendering: Reverse for 'products.views.'filter_by_led' with arguments '()' and keyword arguments '{}…

python django django-templates
How can I get the username of the logged-in user in Django?

How can I get information about the logged-in user in a Django application? For example: I need to know the …

python django django-templates django-views models
How to concatenate strings in django templates?

I want to concatenate a string in a Django template tag, like: {% extend shop/shop_name/base.html %} Here shop_…

django django-templates
how to iterate through dictionary in a dictionary in django template?

My dictionary looks like this(Dictionary within a dictionary): {'0': { 'chosen_unit': <Unit: Kg>, 'cost': Decimal('10.0000…

python django dictionary django-templates
Django -- Template tag in {% if %} block

I have the following dictionary passed to a render function, with sources being a list of strings and title being …

django templates django-templates
Creating a dynamic choice field

I'm having some trouble trying to understand how to create a dynamic choice field in django. I have a model …

python django django-forms django-templates
Custom tag not loaded in template

I've created a custom tag that I want to use, but Django can't seem to find it. My templatetags directory …

django django-templates pygments
matching query does not exist Error in Django

I have implemented a password recovery functionality in django. With my method, the new password will be sent to the …

python django django-models django-templates django-views
Django templates: If false?

How do I check if a variable is False using Django template syntax? {% if myvar == False %} Doesn't seem to work. …

django django-templates