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
I played around with neapolitan and it looks quite productive. My use case includes a lot of parent -> child relationships:
Author --> Book (book always is written by an author)
House --> Room (room does not exist without a parent house)
I tried to add this functionality by creating a subclass of CrudView and it works. But there are a lot of changes and I cannot override the Role methods because it is an enum.
Is there a planed featue for this use case?
Is there a simpler way to achieve that than the subclass below?
If there is no simpler way, I could actually see that this could be mergable with the CRUDView. Is that an option?
Why are the url_pattern, get_url, reverse and maybe_reverse on the Role and not on the CrudView? It feels moving them to the CrudView makes it more understandable/easier to change.
This is something that I wanted, and I ended up restructuring my app so that I could make the routes flat. I used to use drf-nested-routes to do something similar with Django Rest Framework, and tbh I was never totally happy with the results. It worked, though, and it's been long enough that I'm not precisely sure what felt off about it.
I have plans here but it will definitely be on a flat basis. Nested routes open up a whole load of weird edge cases that aren't worth the trouble, in my experience.
I have the patterns working well in the WORK project. Just a question of finding the time to extract them.
I played around with neapolitan and it looks quite productive. My use case includes a lot of parent -> child relationships:
Author --> Book (book always is written by an author)
House --> Room (room does not exist without a parent house)
I tried to add this functionality by creating a subclass of CrudView and it works. But there are a lot of changes and I cannot override the Role methods because it is an enum.
The html stuff is provided by the htpy library.
The text was updated successfully, but these errors were encountered: