-
-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6210234
commit 09e4ad3
Showing
4 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
docs_src/src/pages/documentation/example_app/redirection.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
export const description = | ||
"Welcome to the Robyn API documentation. You will find comprehensive guides and documentation to help you start working with Robyn as quickly as possible, as well as support if you get stuck."; | ||
|
||
## Redirection | ||
|
||
Batman wanted to redirect some endpoints to others. Robyn helped him do so by the following. | ||
|
||
```python {{ title: 'Redirection' }} | ||
from robyn import Robyn | ||
|
||
app = Robyn(__file__) | ||
|
||
@app.get("/") | ||
def index(): | ||
return landing() | ||
|
||
@app.get("/landing") | ||
def landing(): | ||
return "hii!" | ||
``` | ||
|
||
With increased flexibility achieved by redirection, Batman had a powerful new tool at his disposal. The Robyn framework had provided him with the flexibility, scalability, and performance needed to create an effective crime-fighting application, giving him a technological edge in his ongoing battle to protect Gotham City. | ||
|
||
<div className="not-prose"> | ||
<Button | ||
href="/documentation/example_app/templates" | ||
variant="text" | ||
arrow="right" | ||
children="Adding a Frontend" | ||
/> | ||
</div> |