python - Django initial data serialization error -
i trying provide initial data model in django. when try run python manage.py loaddata <fixture path>
following error:
django.core.serializers.base.deserializationerror: problem installing fixture '/home/location/fixtures/initial_data.json': expecting property name enclosed in double quotes: line 7 column 10 (char 119)
my fixtures or initial data this:
[ { "model": "location.zipcode", "pk": 1, "fields": { "zipcode": 79936, } }, { "model": "location.zipcode", "pk": 2, "fields": { "zipcode": 90011, } } ]
i have zipcode
integerfield in zipcode model. appreciated.
trailing commas not valid in json remove them.
give:
[ { "model": "location.zipcode", "pk": 1, "fields": { "zipcode": 79936 } }, { "model": "location.zipcode", "pk": 2, "fields": { "zipcode": 90011 } } ]
Comments
Post a Comment