Change import paths to be absolute, change pythonpath for config app
This commit is contained in:
parent
c378e408ef
commit
841053f878
19 changed files with 814 additions and 79 deletions
|
@ -3,10 +3,13 @@ import logging
|
|||
from flask import Blueprint
|
||||
from flask_restful import Resource, Api
|
||||
from flask_restful.utils.cors import crossdomain
|
||||
from config_app import app
|
||||
from email.utils import formatdate
|
||||
from calendar import timegm
|
||||
from functools import partial, wraps
|
||||
from jsonschema import validate, ValidationError
|
||||
from config_endpoints.exception import InvalidResponse
|
||||
|
||||
from config_app.c_app import app
|
||||
from config_app.config_endpoints.exception import InvalidResponse
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
api_bp = Blueprint('api', __name__)
|
||||
|
@ -28,6 +31,13 @@ api = ApiExceptionHandlingApi()
|
|||
api.init_app(api_bp)
|
||||
|
||||
|
||||
def format_date(date):
|
||||
""" Output an RFC822 date format. """
|
||||
if date is None:
|
||||
return None
|
||||
return formatdate(timegm(date.utctimetuple()))
|
||||
|
||||
|
||||
def verify_not_prod(func):
|
||||
@add_method_metadata('enterprise_only', True)
|
||||
@wraps(func)
|
||||
|
|
Reference in a new issue