Icon ui method
This commit is contained in:
@@ -15,10 +15,10 @@ from atst.handlers.dev import Dev
|
||||
from atst.home import home
|
||||
from atst.api_client import ApiClient
|
||||
from atst.sessions import RedisSessions
|
||||
from atst.ui import UI
|
||||
|
||||
ENV = os.getenv("TORNADO_ENV", "dev")
|
||||
|
||||
|
||||
def make_app(config, deps, **kwargs):
|
||||
|
||||
routes = [
|
||||
@@ -104,6 +104,7 @@ def make_app(config, deps, **kwargs):
|
||||
)
|
||||
app.config = config
|
||||
app.sessions = deps["sessions"]
|
||||
app.ui = UI
|
||||
return app
|
||||
|
||||
|
||||
|
||||
5
atst/ui.py
Normal file
5
atst/ui.py
Normal file
@@ -0,0 +1,5 @@
|
||||
class UI:
|
||||
|
||||
def icon(name):
|
||||
with open("../static/icons/%(name)s.svg") as svg:
|
||||
return svg.read()
|
||||
Reference in New Issue
Block a user