Jinja (Python templating lib) has a very nice way of skeletoning the website and specifying fill-in content in another file

17 Aug

Template Inheritance??

The most powerful part of Jinja is template inheritance. Template inheritanceallows you to build a base ???skeleton??? template that contains all the commonelements of your site and defines blocks that child templates can override.

Why? I’ve just committed a proof-of-concept Single Page Application demo (http://trac.tiddlywiki.org/browser/Trunk/contributors/MichaelMahemoff/vertica…), from which I’ll extract a little SPA framework. I decided to make a small scripting environment to build a SPA, thought I could use TiddlyWiki’s cook, but it’s tiddlywiki-specific. Jinja we’re already using in ILGA and Scrumptious, to name two TiddlyWeb apps, so it makes sense to try and use the same templating framework to support a new kind of build process.

BTW the reason I’m doing this SPA thing is mostly to scratch an itch, as I had an idea for a Twitter type mashup where the file would contain all your user and password info, so it’s convenient to keep it in a file on your local drive.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: