Skip to content

jstacoder/flask-apps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Flask-Apps

this gives flask applications a setting similar to djangos INSTALLED_APPS, called INSTALLED_BLUEPRINTS

  • to use:
    • first install:

      • pip install flask-apps
    • in your settings file add:

      INSTALLED_BLUEPRINTS = [
          'path.to.the.bp',
          'path.to.next.bp'
      ]
    • then when you create your app do

      from flask_apps import FlaskApps
      
      app = Flask(__name__)
      
      flask_apps = FlaskApps(app)
    • or use the factory pattern

      flask_apps = FlaskApps()
    • then later

      flask_apps.init_app(app)

And thats it, from there FlaskApps will import and register all of the blueprints from the INSTALLED_BLUEPRINTS setting, as well as any modules inside the blueprints, ie: models, views, filters, anything

About

give your flask application a setting similar to django INSTALLED_APPS, but with more features

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages