how can i see all possible attributes of an context variable in django templates

You create a custom filter:

in templatetags/

from django import template

register = template.Library()

def getallattrs(value):
    return dir(value)

in your template:

{% load my_filters %}
{{ field|getallattrs }}

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top