Skip to content

Database backend that stores semantic data (locales as a table, versions as a table, etc.) #53

@Osmose

Description

@Osmose

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions