adding defaults, modifiers, traits and attributes

This commit is contained in:
evilchili
2024-02-08 23:04:28 -08:00
parent da6255a86a
commit 8bde2ab5f3
8 changed files with 178 additions and 40 deletions
+5 -2
View File
@@ -2,6 +2,10 @@ from pyramid.response import Response
from pyramid.view import view_config
from ttfrog.db.manager import db
from ttfrog.db.schema import Ancestry
from ttfrog.attribute_map import AttributeMap
def response_from(controller):
return controller.response() or AttributeMap.from_dict({'c': controller.template_context()})
@view_config(route_name='index')
@@ -12,5 +16,4 @@ def index(request):
@view_config(route_name='sheet', renderer='character_sheet.html')
def sheet(request):
controller = request.context
return controller.response() or controller.template_context()
return response_from(request.context)