Open awapf opened 2 months ago
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.