Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jstacoder/flask-apps
give your flask application a setting similar to django INSTALLED_APPS, but with more features
https://github.com/jstacoder/flask-apps
Last synced: 13 days ago
JSON representation
give your flask application a setting similar to django INSTALLED_APPS, but with more features
- Host: GitHub
- URL: https://github.com/jstacoder/flask-apps
- Owner: jstacoder
- Created: 2015-07-27T00:26:35.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-24T19:24:47.000Z (about 9 years ago)
- Last Synced: 2024-09-21T06:25:08.822Z (about 2 months ago)
- Language: Python
- Size: 180 KB
- Stars: 14
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/jstacoder/flask-apps.svg?branch=master)](https://travis-ci.org/jstacoder/flask-apps)
##flask-appsthis 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:
```python
INSTALLED_BLUEPRINTS = [
'path.to.the.bp',
'path.to.next.bp'
]
```- then when you create your app do
```python
from flask_apps import FlaskAppsapp = Flask(__name__)
flask_apps = FlaskApps(app)
```- or use the factory pattern
```python
flask_apps = FlaskApps()
```- then later
```python
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