def render(self, name, value, attrs=None): """ Dump the python object to JSON if it hasn't been done yet. """ from djangae.fields.json import dumps if not isinstance(value, six.string_types): value = dumps(value) return super(JSONWidget, self).render(name, value, attrs)
def render(self, name, value, attrs=None): """ Dump the python object to JSON if it hasn't been done yet. """ from djangae.fields.json import dumps if not isinstance(value, six.string_types): value = dumps(value) return super(JSONWidget, self).render(name, value, attrs)