Serializer for Postgis Array field in Django

30 views
Skip to first unread message

Stefan Milutinovic

unread,
Feb 11, 2017, 9:55:33 AM2/11/17
to Django users
Hi,

I have a class BPS:

class BPS(models.Model):
"""
This is representation of
UK BPS applications.
"""
...
questions = ArrayField(models.IntegerField())

This field questions is ArrayField od integers.

And I also have Serializer for BPS.

When I want to create BPS objects from REST API with input:
[1,2]
I get this error:
[u'[1,2]']
A valid integer is required.


How should I create a proper serializer for this field?

Thanks.


Reply all
Reply to author
Forward
0 new messages