3👍
✅
View may not only be function, but also a class.
You can easily specify some kind of DispatchedView class with __call__
method and dispatch to method according to remaining URI. Also, You can inspire yourself with CherryPy dispatcher.
However, it’s considered beter to use named patterns and have URIs and views completely decoupled.
Source:stackexchange.com