mirror of
https://github.com/actix/actix-website
synced 2024-11-27 10:02:57 +01:00
Update url-dispatch.md (#129)
* Update url-dispatch.md Description was updated according to an example. Users paths were added instead of projects and tasks. Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
This commit is contained in:
parent
fd9b6d38ba
commit
c6c5446937
@ -235,13 +235,11 @@ foo/abc/def/a/b/c -> Params{'bar':u'abc', 'tail': 'def/a/b/c'}
|
||||
Scoping helps you organize routes sharing common root paths. You can nest
|
||||
scopes within scopes.
|
||||
|
||||
Suppose that you want to organize paths to endpoints used to manage a "Project",
|
||||
consisting of "Tasks". Such paths may include:
|
||||
Suppose that you want to organize paths to endpoints used to view "Users". Such paths may include:
|
||||
|
||||
- /project
|
||||
- /project/{project_id}
|
||||
- /project/{project_id}/task
|
||||
- /project/{project_id}/task/{task_id}
|
||||
- /users
|
||||
- /users/show
|
||||
- /users/show/{id}
|
||||
|
||||
|
||||
A scoped layout of these paths would appear as follows
|
||||
|
Loading…
Reference in New Issue
Block a user