djangosnippets.org: Latest snippets tagged with 'jsonfield'https://djangosnippets.org/tags/jsonfield/2013-07-16T19:53:06.692353-05:00A widget that renders JSON data as separate editable inputs.
2013-07-16T19:53:06.692353-05:00abbasovalexhttps://djangosnippets.org/snippets/2974/<p>You can see full examples on the page <a href="https://github.com/abbasovalex/django-SplitJSONWidget-form">GitHub</a></p>
Freely redistributableJSONField
2009-05-02T22:44:30.260569-05:00Jasberhttps://djangosnippets.org/snippets/1478/<p>This is a custom field that lets you easily store JSON data in one of your model fields. This is updated to work with Django 1.1.</p>
<p><strong>Example: (models.py)</strong></p>
<pre><code>from django.db import models
import JSONField
class MyModel(models.Model):
info = JSONField()
</code></pre>
<p><strong> Example: (shell)</strong></p>
<pre><code>>>> obj = MyModel.objects.all()[0]
>>> type(obj.info)
<type 'NoneType'>
>>> …</code></pre>
Freely redistributable