It's a rather common need to want to use the list of locales in product_details as the choices for a locale field (let's call this a LocaleField). Less common but still useful would be a similar thing for versions. There are problems around this:
- If you generate migrations for a model without up-to-date product_details, the migration will alter the field unnecessarily.
- It requires a product_details update (and an internet connection) or checked-in product_details files for setup (or a finnicky fallback for when product_details is missing).
- If using the database-based product_details, test database setup needs to be customized.
I propose that the database backend should have a locales table and a version table, and models wanting to have a LocaleField can have a ForeignKey to the product_details tables. I think this would avoid all the weirdness around choices.
It's a rather common need to want to use the list of locales in product_details as the choices for a locale field (let's call this a LocaleField). Less common but still useful would be a similar thing for versions. There are problems around this:
I propose that the database backend should have a locales table and a version table, and models wanting to have a LocaleField can have a ForeignKey to the product_details tables. I think this would avoid all the weirdness around choices.