Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation about ArrayField for Postgres #2615

Closed
rvanlaar opened this issue Feb 27, 2015 · 6 comments
Closed

Add documentation about ArrayField for Postgres #2615

rvanlaar opened this issue Feb 27, 2015 · 6 comments

Comments

@rvanlaar
Copy link

Django 1.8 supports the Array data type from postgres.

A simple solution is to use a ListField Serializer:

    field_names = serializers.ListField(child=serializers.CharField(max_length=32, allow_blank=True))

as seen in this issue: https://groups.google.com/forum/#!topic/django-rest-framework/Rolw5yEQ8cU

It would help if this was part of the documentation.

@rvanlaar
Copy link
Author

Seems this will be supported in DRF 3.1.

#2496
#2107

@jpadilla
Copy link
Member

@rvanlaar yes indeed, we still need docs for those new fields though.

@johnthagen
Copy link
Contributor

@encode / @tomchristie Could this be reopened? I don't see any documentation for ArrayField currently.

@xordoquy
Copy link
Collaborator

xordoquy commented Jan 28, 2019

I think we already got everything covered through ListField

@johnthagen
Copy link
Contributor

I guess it's not immediately clear to me how a ModelSerializer with an ArrayField maps in without an example. Maybe at least mentioning the connection between ListField and ArrayField would be very helpful.

@rpkilby
Copy link
Member

rpkilby commented Feb 21, 2019

A very minimal docs update might be helpful here. Aside from HStoreField, JSONField and ListField don't mention their connection to their postgres counterparts. That said, I wouldn't really consider this an open concern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants