Skip to content

Instantly share code, notes, and snippets.

@rafaelmartins
Created January 15, 2014 00:00
Show Gist options
  • Save rafaelmartins/8428374 to your computer and use it in GitHub Desktop.
Save rafaelmartins/8428374 to your computer and use it in GitHub Desktop.
Simple example of a blohg extension that mounts a view at the root of the flask app.
from blohg.ext import BlohgExtension
ext = BlohgExtension(__name__)
def foo():
return 'Hello world!'
@ext.setup_extension
def setup_extension(app):
app.add_url_rule('/foo', 'foo', foo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment