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
This proposal is about how to improve actual router to add possibility to include sub routers into main application router.
I big projects we want so split functionality into modules, e.g. module for users, module for news, etc. And each module can contains views, helpers, db tables, etc; and if module contains views we want to put routes in this module too. And for now there are no useful way to do it.
In top level router I just want something like this:
# routes.py
from users.routes import router as users_router
from news.routes import router as news_router
router = UrlDispatcher()
router.add_subrouter('/users', users_router, name_or_namespace='users')
router.add_subrouter('/news', news_router, name_or_namespace='news')
# main.py
from routes import router
app = Application(router=router)
...
In this case I don't want to create additional apps (using realization #1301) for news and users modules, because I don't need additional middlewares or signals, I just want to include routes.
The text was updated successfully, but these errors were encountered:
Long story short
This proposal is about how to improve actual router to add possibility to include sub routers into main application router.
I big projects we want so split functionality into modules, e.g. module for users, module for news, etc. And each module can contains views, helpers, db tables, etc; and if module contains views we want to put routes in this module too. And for now there are no useful way to do it.
Expected behaviour
For example we have a project:
In top level router I just want something like this:
In this case I don't want to create additional apps (using realization #1301) for news and users modules, because I don't need additional middlewares or signals, I just want to include routes.
The text was updated successfully, but these errors were encountered: