-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathapp.py
More file actions
executable file
·28 lines (23 loc) · 823 Bytes
/
app.py
File metadata and controls
executable file
·28 lines (23 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#
# Filename: app.py
# Version : 0.1
# Author : Lisa Esselink
# Purpose : App core functions and init
# Usage : Initialize the core app functions
#
# Copyright (c) Lisa Esselink. All rights reserved.
# Licensend under the Creative Commons Attribution-NonCommercial 4.0 International License.
# See LICENSE file in the project root for full license information.
#
import picoweb
from utemplate import source
ROUTES = [
# You can specify exact URI string matches...
# ("/favicon.ico", lambda req, resp: (yield from app.sendfile(resp, "/static/favicon.ico"))),
]
class EasyApp(picoweb.WebApp):
def init(self):
super().init()
app = EasyApp(__name__, ROUTES)
# Add our own templates to the template path
app.template_loader = source.Loader(app.pkg, "templates")