Skip to content

Feature request: alter the package to make the field an actual foreign key so it works with autocomplete in the admin UI #147

@venteto

Description

@venteto

Perhaps at least make this an optional feature, if not completely replacing the current design of just reading a system tz database.

The reason I request this is because in the admin UI, the list of timezones is a very lengthy dropdown menu, where I would like to be able to make this field an autocomplete field in the admin UI, so that, e.g., I can just start typing "New York" and then the UI will automatically filter out all of the irrelevant timezones, and I can more quickly pick the zone I am after, instead of haphazardly scrolling down a long list, where I might miss something if I blink.

However, the autocomplete admin option only seems to work on foreign key and many-to-many fields.

If you gave the us the option of persisting the data as a foreign key relation, maybe you could create a a management command to loop through the system database and read it into a new table for a model in this package, then dump a fixture, and have a migration to load that fixture whenever we install or update this package. I really don't know.

I don't know how often the IANA tz database is really likely to change in the future but maybe a management command would make it easy to update the packaged fixture for future releases of the package, if it were ever necessary to reflect new timezones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions