@register.filter
def jsonify(obj):
    d = model_to_dict(obj)
    return json.dumps(d, cls=LazyEncoder)
Renders a Django model object as a JSON object.
dataset/ETHPy150Open california-civic-data-coalition/django-calaccess-campaign-browser/calaccess_campaign_browser/templatetags/calaccesscampaignbrowser.py/jsonify