mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-11 09:27:56 -04:00
Initial code added for models and services not functional yet. Bootstrap and migrations added for db.
This commit is contained in:
@@ -2,11 +2,15 @@ import os
|
||||
|
||||
from flask._compat import string_types
|
||||
from flask import Flask, _request_ctx_stack
|
||||
from flask.ext.sqlalchemy import SQLAlchemy
|
||||
from werkzeug.local import LocalProxy
|
||||
from config import configs
|
||||
from utils import logging
|
||||
|
||||
|
||||
db = SQLAlchemy()
|
||||
|
||||
|
||||
api_user = LocalProxy(lambda: _request_ctx_stack.top.api_user)
|
||||
|
||||
|
||||
@@ -16,6 +20,7 @@ def create_app(config_name):
|
||||
application.config['NOTIFY_API_ENVIRONMENT'] = config_name
|
||||
application.config.from_object(configs[config_name])
|
||||
|
||||
db.init_app(application)
|
||||
init_app(application)
|
||||
|
||||
logging.init_app(application)
|
||||
@@ -26,6 +31,8 @@ def create_app(config_name):
|
||||
from .status import status as status_blueprint
|
||||
application.register_blueprint(status_blueprint)
|
||||
|
||||
from app import models
|
||||
|
||||
return application
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user