Re: list field in django Serializer?


Hi Lengyue,

You may be best off using a ForeignKey to another table, if the set of
options is not known in advance.  If it iis, you could use a Choice.

https://docs.djangoproject.com/en/1.8/ref/models/fields/

On Mon, Aug 10, 2015 at 10:44 AM, Lengyue Chen <lchen95@xxxxxxxxxxxx> wrote:
> Hi
>
> I am reimplementing the REST api for manipulating instances on openstack
> with django. I defined a model named Lab with a list field to store the
> status of instances in the lab. But there is no list field in Serializer
> class...Anyone have idea about this? Thanks
>
> Best
> Lengyue
>
>
>



Other Mailing lists | Author Index | Date Index | Subject Index | Thread Index