New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow different views for same model #391
Comments
Hi, |
I tried but I had some issues when trying to click on edit one of the rows, as it tried to use the normal identity of the table. Anyway thanks for your nice work on this sqladmin library 😄 |
Hey, can you clarify the use-case you have? I've been looking into this and there's a limitation: In list page, if there's a relationship, we actually link the related model so let's say you are viewing list of Users and you click their Organization's name in list, then you are redirected to the Organization detail. But with this approach we can't find which view to redirect as there are two views registered for this Model. |
well it's just having the same model but listing the users by role, let's say:
|
I think you're better off writing a custom view. |
Checklist
Is your feature related to a problem? Please describe.
Identity is not overwritten in metaclass even if in attrs
cls.identity = slugify_class_name(model.__name__)
Describe the solution you would like.
It should be possible to create something like
cls.identity = attrs.get("identity", slugify_class_name(model.__name__)
Although edit links will need to be updated accordingly, of course.
Describe alternatives you considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: