Easy template-to-view support
Project description
Overview
khufu_siteview is an addon for Pyramid hows the registration of a view that can be used to serve all .jinja2 files out of a directory as subviews without the need to map them directly.
Usage
Standard setup is to Configurator.include the khufu_siteview package and then add new views as necessary.
Example:
from pyramid.config import Configurator def app(global_conf, **settings): config = Configurator(settings=settings) config.include('khufu_siteview') config.add_templateview_route('/some/path/to/site', '/') return config.make_wsgi_app()
The previous example mounts the view at the root of the new Pyramid application. The following example url’s would work:
http://127.0.0.1:8080/favicon.ico -> /some/path/to/site/favicon.ico http://127.0.0.1:8080/somepage.jinja2 -> /some/path/to/site/somepage.jinja2
Static assets such as gif’s and ico’s will be looked up as if the view was static.
Credits
Created and maintained by Rocky Burt <rocky AT serverzen DOT com>.
Changes
0.9.1 - Apr 26, 2011
fixed bug where standard global renderer vars were being removed
0.9 - Apr 18, 2011
first release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file khufu_siteview-0.9.1.tar.gz
.
File metadata
- Download URL: khufu_siteview-0.9.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e68ca047a62f96b7d738dd5ecb73713a5de5af7dffa9af3f8fca33c4a6a746b2 |
|
MD5 | 9fa2e4f8279bffaadfcd072aab0a8fb7 |
|
BLAKE2b-256 | f8274c9dc95c06e5c23b85dd864c87483cc23c22e7491aae466ec79058d19333 |