1. youngking
  2. flask-actions

Commits

sempr  committed 1f3860f

use Blueprint instead in project_template, while Module will be deprecated

  • Participants
  • Parent commits a6c9ca8
  • Branches default

Comments (0)

Files changed (2)

File flaskext/actions/project_template/__init__.py_tmpl

View file
  • Ignore whitespace
 from %(project)s.views.frontend import frontend
 
 app = Flask(__name__)
-app.register_module(frontend)
+app.register_blueprint(frontend, url_prefix='')
 

File flaskext/actions/project_template/views/frontend.py

View file
  • Ignore whitespace
 # -*- encoding:utf-8 -*-
-from flask import Module
+from flask import Blueprint
 
-frontend = Module(__name__)
+frontend = Blueprint('frontend',__name__)
 
 @frontend.route('/')
 def index():