A
A
abbrakadabbra2019-06-04 12:14:05
Django
abbrakadabbra, 2019-06-04 12:14:05

What is the type of a multi-select field in Django?

Now the model field is configured as follows: Which allows you to write one value in the field. You need to change the type of this field so that you can select more than one value (checkboxes) and write them, preferably in one field (ie not ManyToMany). What are the options, the simplest and the most optimized (from the point of view of the database, ArrayField)?
models.CharField(max_length=2, choices=CHOICES)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JRazor, 2019-06-04
@JRazor

Django Model MultipleChoice

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question