Skip to content
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

Support import string in router.add_router #1256

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

martinsvoboda
Copy link
Contributor

Added support for importing nested router with string path. This unifies behaviour with api.add_router:

# api.add_router
api = NinjaAPI()
api.add_router("main", "myproject.app1.router")

# router.add_router
router = Router()
router.add_router("nested", "myproject.app1.nested.router")

@vitalik vitalik merged commit 3c55d99 into vitalik:master Aug 5, 2024
27 checks passed
@vitalik
Copy link
Owner

vitalik commented Aug 5, 2024

Thank you @martinsvoboda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants