Replies: 2 comments
-
I couldn't get this to work either. |
Beta Was this translation helpful? Give feedback.
0 replies
-
We can tell ninja that from ninja import Path
main_router = Router()
secondary_router = Router()
@secondary_router.get('/secondaryitems/{secondary_hashid}')
def foo(request,
item_hashid: Path[str], # OR item_hashid: str = Path(...)
secondary_hashid: Path[str]
):
...
main_router.add_router('items/{item_hashid}/secondary', secondary_router) # `add_router` accepts prefix including path params related issue: #1055 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Is it possible to include path params in a router prefix? For example, I want to use some nested routers, but the parameter in prefix will be a query param:
Beta Was this translation helpful? Give feedback.
All reactions