Skip to content

Instantly share code, notes, and snippets.

@cdent
Created February 22, 2010 16:14
Show Gist options
  • Save cdent/311210 to your computer and use it in GitHub Desktop.
Save cdent/311210 to your computer and use it in GitHub Desktop.
"""
quick plugin for dynamic recipe.
"""
from tiddlywebplugins.utils import replace_handler
from tiddlywebp.web.handler.recipe import get_tiddlers
def init(config):
replace_handler(config['selector'], '/', dict(GET=front))
def front(environ, start_response):
environ['wsgiorg.routing_args'][1]['recipe_name'] = '12days'
environ['tiddlyweb.type'] = 'text/x-tiddlywiki'
return get_tiddlers(environ, start_response)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment