Add debugging template filter
All checks were successful
Tests / test (push) Successful in 28s

This commit is contained in:
Tobias Kunze 2025-04-11 17:41:58 +02:00
parent 60b47ed6c8
commit 2a359b50ef

View file

@ -0,0 +1,12 @@
import json
from django import template
register = template.Library()
@register.filter
def pprint(value):
if isinstance(value, (dict, list)):
return json.dumps(value, indent=2)
return value