tabletop-frog/ttfrog/webserver/controllers/root.py
2024-01-28 22:14:50 -08:00

17 lines
494 B
Python

from tg import expose
from ttfrog.db import db
from ttfrog.webserver.controllers.base import BaseController
from ttfrog.webserver.controllers.character_sheet import CharacterSheetController
class RootController(BaseController):
# serve character sheet interface on /sheet
sheet = CharacterSheetController()
@expose('index.html')
def index(self):
ancestries = [row._mapping for row in db.query(db.ancestry).all()]
return self.output(content=str(ancestries))