Skip to content

Commit

Permalink
App working
Browse files Browse the repository at this point in the history
  • Loading branch information
piusdan committed Jun 30, 2017
0 parents commit b2cc7c6
Show file tree
Hide file tree
Showing 35 changed files with 4,188 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea/**
**.pyc
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn manage:app
439 changes: 439 additions & 0 deletions README.md

Large diffs are not rendered by default.

Empty file added __init__.py
Empty file.
33 changes: 33 additions & 0 deletions app/__init__.py
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
Loading

0 comments on commit b2cc7c6

Please sign in to comment.