A Python web framework that makes the most of the filesystem.
Simplates are the main attraction.

Rendered Simplates

Rendered simplates are the main kind of simplate. The third page of a rendered simplate uses a templating language to transform the bytes in your file into content to send out over the wire. Aspen no longer bundles any templating language adapters; instead they're in their own packages. There are modules available with support for Tornado (aspen-tornado), Jinja2 (aspen-jinja2) and Pystache (aspen-pystache). The way to specify a renderer is with a so-called “specline” at the start of the content page of a rendered simplate.

program = "program"
[---] via pystache
Greetings, {{ program }}!

You can set the default renderer for a given media type (presuming it is installed) in like so:

website.default_renderers_by_media_type['text/html'] = 'pystache'

Here’s how to directly set the default renderer for all media types:

website.default_renderers_by_media_type.default_factory = lambda: 'pystache'

If this is being done in, it can also be phrased as:

website.renderer_default = 'pystache'

You can also set the default renderer globally using the --renderer_default command line switch or the ASPEN_RENDERER_DEFAULT environment variable.

Default Templating Language

The default renderer is the basic templating language that python uses to render strings: %(varname)s is replaced by the variable 'varname' as a string. More details are available in the python docs. Other built-in templating languages are stdlib_format (using python string formatting and stdlib_template (using python template strings). Home Negotiated Simplates