Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

jsonfield django

>>> Dog.objects.create(name='Rufus', data={
...     'breed': 'labrador',
...     'owner': {
...         'name': 'Bob',
...         'other_pets': [{
...             'name': 'Fishy',
...         }],
...     },
... })
>>> Dog.objects.create(name='Meg', data={'breed': 'collie', 'owner': None})

>>> Dog.objects.filter(data__breed='collie')
<QuerySet [<Dog: Meg>]>
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #jsonfield #django
ADD COMMENT
Topic
Name
3+6 =