Skip to content

Instantly share code, notes, and snippets.

@rochacbruno
Forked from hersonls/__init__.py
Created February 8, 2014 03:25
Show Gist options
  • Save rochacbruno/8876253 to your computer and use it in GitHub Desktop.
Save rochacbruno/8876253 to your computer and use it in GitHub Desktop.
from flask import Blueprint
from urls import url_rules
bp = Blueprint(__name__.split('.')[1], __name__, template_folder='templates')
for url_rule in url_rules:
url_regex, view_func = url_rule
bp.add_url_rule(url_regex, view_func=view_func, methods=['GET', 'POST'])
from views import index
from views import register
url_rules = (
('/', index),
('/register/', register)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment