1 2 3 4 5 | class JsonableModel(models.Model):
class Meta:
abstract = True
def to_json(self):
return render_to_string('models/%s.json' % self._meta.module_name,{'object':self})
|
More like this
- Command to make fixtures. by buriy 4 years, 9 months ago
- Modeli18n by pavl 2 years, 11 months ago
- Deep json serialization by Alexey Boriskin 3 years, 10 months ago
- Using dojo/json to check for username availability by heckj 5 years, 11 months ago
- Url persistance of GET variables by alex_ndc 4 years, 6 months ago
Comments