-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HH-200459 add handler-return to example app
- Loading branch information
1 parent
fb0e201
commit 523d57c
Showing
4 changed files
with
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import frontik.handler | ||
|
||
|
||
class Page(frontik.handler.PageHandler): | ||
def get_page(self) -> dict: | ||
return {'str_field': 'Привет'} |
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,12 @@ | ||
from pydantic import BaseModel | ||
|
||
import frontik.handler | ||
|
||
|
||
class ResponseModel(BaseModel): | ||
str_field: str | ||
|
||
|
||
class Page(frontik.handler.PageHandler): | ||
def get_page(self) -> ResponseModel: | ||
return ResponseModel(str_field='Привет') |
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 |
---|---|---|
|
@@ -11,3 +11,5 @@ stderr_log = True | |
jinja_template_root = 'templates' | ||
|
||
consul_enabled=False | ||
|
||
debug=True |
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