[Fixed]-Is there a size limit for choices dict as Enum in Django model column?

1👍

The Django docs have not defined an upper limit for the number of choices in Model Field Choices documentation.

So, you can go ahead and define your detailed choices, it should not be a problem. Only issue could be running out of memory as jonsharpe also pointed if the choices tuple/list is huge.

It would be better if you put your choices in a separate file choices.py and import it into your models.py so that the models does not look cluttered and dirty.

Leave a comment