-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b2cc7c6
Showing
35 changed files
with
4,188 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.idea/** | ||
**.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: gunicorn manage:app |
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from flask import Flask, render_template | ||
from flask_bootstrap import Bootstrap | ||
from flask_sqlalchemy import SQLAlchemy | ||
|
||
|
||
from config import config | ||
|
||
|
||
bootstrap = Bootstrap() | ||
db = SQLAlchemy() | ||
|
||
|
||
def create_app(config_name): | ||
app = Flask(__name__) | ||
app.config.from_object(config[config_name]) | ||
config[config_name].init_app(app) | ||
|
||
bootstrap.init_app(app) | ||
db.init_app(app) | ||
|
||
# attach routes and custom pages here | ||
|
||
from apiv1 import api_v1 as api10_blueprint | ||
app.register_blueprint(api10_blueprint, url_prefix='/api/v1.0') | ||
|
||
from apiv2 import api_v11 as api11_blueprint | ||
app.register_blueprint(api11_blueprint, url_prefix='/api/v1.1') | ||
|
||
if not app.debug and not app.testing and not app.config['SSL_DISABLE']: | ||
from flask_sslify import SSLify | ||
sslify = SSLify(app) | ||
|
||
return app |
Oops, something went wrong.