You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
tareksanger
changed the title
Configurable Lookup Field for ModelControllerBase in Django Ninja Extra
Configurable Lookup Field for ModelControllerBase
Aug 28, 2024
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.
The text was updated successfully, but these errors were encountered: