diff options
Diffstat (limited to 'forum/templatetags/extra_filters.py')
-rw-r--r-- | forum/templatetags/extra_filters.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/forum/templatetags/extra_filters.py b/forum/templatetags/extra_filters.py index 3644fdc3..22ec0109 100644 --- a/forum/templatetags/extra_filters.py +++ b/forum/templatetags/extra_filters.py @@ -1,4 +1,5 @@ from django import template +from django.core import serializers from forum import auth import logging @@ -91,3 +92,7 @@ def cnprog_intword(number): return number except: return number + +@register.filter +def json_serialize(object): + return serializers.serialize('json',object) |