Skip to content

Commit

Permalink
added release note for new version
Browse files Browse the repository at this point in the history
  • Loading branch information
the-robot committed May 4, 2020
1 parent 37e6a2e commit da0d0b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/releasenotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

### 0.1.7

- Rewrite new routing strategy. Read more [here](https://github.com/yaat-project/yaat/pull/23).

### 0.1.6

- Fixed `StaticFiles` getting 404 when mounted to sub router instead of main Yaat application.
Expand Down
6 changes: 3 additions & 3 deletions docs/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ app.add_route(path="/blog", handler=blog)
When your application grows, it is better to break down into smaller applications. Each application will have their own routes
and mount those routes back to the main application.

`mount(prefix, router)`
`mount(router, prefix)`

- `prefix` - url prefix to be added to all routes under the router.
- `router` - Yaat `Router` object.
- `prefix` - url prefix to be added to all routes under the router.

**app.py**
```python
Expand All @@ -124,7 +124,7 @@ app = Yaat()
async def index(request):
return TextResponse(content="Hello World")

app.mount(prefix="blog", router=BlogRouter)
app.mount(router=BlogRouter, prefix="/blog")
```

**blog.py**
Expand Down

0 comments on commit da0d0b8

Please sign in to comment.