I'm using Django 1.11. I cannot set dynamic choices for model's field because:
- choices must be iterable, not function,
- choices iterable is always coverted to list,
- iterable is evaluated oat the module import stage.
The whole thing is about iterable evaluation time. The data source is populated once at App.ready() stage, after models.py imports.
This results in empty choices, always. It is a big limitation.
I do not understand why Django supports custom iterators if they're always converted to lists so early.
How to achieve dynamic choices at the model level? Any ideas? Thanks.