Skip to content

Configurable Lookup Field for ModelControllerBase #178

@tareksanger

Description

@tareksanger

Description:

Summary:
Currently, the ModelControllerBase class in Django Ninja Extra only supports the primary key as the lookup field, which limits flexibility when working with models that might require alternative lookup fields. I would like to request the addition of a feature that allows the lookup field to be configurable.

Use Case:
In some applications, it is necessary to use a field other than the primary key for lookups, such as a UUID or a slug. Allowing developers to configure the lookup field would enhance the versatility of ModelControllerBase and align it with the flexibility provided by Django’s built-in views and routers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions