Reputation: 39
In order to reduce the superfluous codes,I want to share a base template among many subapps,
Example dir tree
├── admin
│ ├── __init__.py
│ ├── templates
│ │ └── admin.html
│ └── view.py
├── base_templates
│ └── base.html
└── view.py
Now , I am using dir package styel as a sub app(I dunno whether it's a right way to do this). Above, I am going to use base.html template in admin app, so
foo.py
render = web.template.render(...) # the render
class Foo:
def GET:
return render.admin()
any way to resolve my trouble ? thx
Upvotes: 0
Views: 62