kopia lustrzana https://github.com/cirospaciari/socketify.py
remove unnecessary async from template examples
rodzic
d589d8b9f1
commit
b380456fdc
|
@ -6,7 +6,7 @@ from helpers.templates import Jinja2Template
|
||||||
app = App()
|
app = App()
|
||||||
app.template(Jinja2Template("./templates", encoding='utf-8', followlinks=False))
|
app.template(Jinja2Template("./templates", encoding='utf-8', followlinks=False))
|
||||||
|
|
||||||
async def home(res, req):
|
def home(res, req):
|
||||||
res.render("jinja2_home.html", title="Hello", message="Hello, World")
|
res.render("jinja2_home.html", title="Hello", message="Hello, World")
|
||||||
|
|
||||||
app.get("/", home)
|
app.get("/", home)
|
||||||
|
|
|
@ -6,7 +6,7 @@ from helpers.templates import MakoTemplate
|
||||||
app = App()
|
app = App()
|
||||||
app.template(MakoTemplate(directories=['./templates'], output_encoding='utf-8', encoding_errors='replace'))
|
app.template(MakoTemplate(directories=['./templates'], output_encoding='utf-8', encoding_errors='replace'))
|
||||||
|
|
||||||
async def home(res, req):
|
def home(res, req):
|
||||||
res.render("mako_home.html", message="Hello, World")
|
res.render("mako_home.html", message="Hello, World")
|
||||||
|
|
||||||
app.get("/", home)
|
app.get("/", home)
|
||||||
|
|
Ładowanie…
Reference in New Issue