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
Suggest adding something like the below code in starlette_admin/contrib/sqlmodel/view.py. This automatically changes the label for columns to the alias parameter in SQLModel.
Describe the solution you'd like
async def _configs(self, request: Request) -> Dict[str, Any]:
locale = get_locale()
fields = [f.dict() for f in self.get_fields_list(request)]
for n, field in enumerate(fields):
for model_field in self.model.__fields__.values():
if model_field.name == field["name"]:
fields[n]['label'] = model_field.alias
return {
"label": self.label,
"pageSize": self.page_size,
The text was updated successfully, but these errors were encountered:
Add support for SQLModel Alias.
Suggest adding something like the below code in starlette_admin/contrib/sqlmodel/view.py. This automatically changes the label for columns to the alias parameter in SQLModel.
Describe the solution you'd like
The text was updated successfully, but these errors were encountered: