Skip to content

Make a difference between sequential and non-sequential primary keys #35

@tooxie

Description

@tooxie

Whenever you define a field as primary_key it won't appear in the add/edit form. This behaviour can be modified by setting the exclude_pks to False on admin.datastore.sqlalchemy.SQLAlchemyDatastore.

This is ok for autoincremental Integer fields, but when you need a String as a primary_key this becomes a problem. Usually string primary keys are not sequential, and need to be edited while keeping sequential database-defined keys hidden.

A possible solution would be to split the exclude_pks parameter into editable_pks and editable_sequential_pks. That way you can achieve the expected behaviour by setting editable_pks=True and editable_sequential_pks=False.

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