You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
198 B
Python
12 lines
198 B
Python
2 years ago
|
from django import template
|
||
|
import orjson
|
||
|
|
||
|
register = template.Library()
|
||
|
|
||
|
|
||
|
@register.filter
|
||
|
def pretty(data):
|
||
|
return orjson.dumps(
|
||
|
data, option=orjson.OPT_INDENT_2
|
||
|
).decode("utf-8")
|