zjj
zjj

Reputation: 39

web.py, How to share the base_base_template among subapps?

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

Answers (1)

Chris
Chris

Reputation: 1426

You can do this using a site layout template.

Upvotes: 1

Related Questions