# Path: productporter/app.py
# def create_app(config=None):
#     """
#     Creates the app.
#     """
#     static_url_path = ''
#     instance_path = None
#     if config is None:
#         static_url_path = DefaultConfig.ROOT_URL_PREFIX + '/static'
#         instance_path = DefaultConfig.INSTANCE_PATH
#     else:
#         static_url_path = config.ROOT_URL_PREFIX + '/static'
#         instance_path = config.INSTANCE_PATH
#     # Initialize the app
#     app = Flask("productporter",
#         static_url_path=static_url_path,
#         instance_path=instance_path)
# 
#     # Use the default config and override it afterwards
#     app.config.from_object('productporter.configs.default.DefaultConfig')
#     # Update the config
#     app.config.from_object(config)
# 
#     configure_blueprints(app)
#     configure_extensions(app)
#     configure_template_filters(app)
#     configure_context_processors(app)
#     configure_before_handlers(app)
#     configure_errorhandlers(app)
#     configure_logging(app)
# 
#     return app


from productporter.app import create_app
from productporter.configs.production import ProductionConfig
"""
    productporter
    ~~~~~~~~~~~~~~~~~~~~

    helper for uwsgi

    :copyright: (c) 2014 by the ProductPorter Team.
    :license: BSD, see LICENSE for more details.
"""


# Path: productporter/app.py
# def create_app(config=None):
#     """
#     Creates the app.
#     """
#     static_url_path = ''
#     instance_path = None
#     if config is None:
#         static_url_path = DefaultConfig.ROOT_URL_PREFIX + '/static'
#         instance_path = DefaultConfig.INSTANCE_PATH
#     else:
#         static_url_path = config.ROOT_URL_PREFIX + '/static'
#         instance_path = config.INSTANCE_PATH
#     # Initialize the app
#     app = Flask("productporter",
#         static_url_path=static_url_path,
#         instance_path=instance_path)
# 
#     # Use the default config and override it afterwards
#     app.config.from_object('productporter.configs.default.DefaultConfig')
#     # Update the config
#     app.config.from_object(config)
# 
#     configure_blueprints(app)
#     configure_extensions(app)
#     configure_template_filters(app)
#     configure_context_processors(app)
#     configure_before_handlers(app)
#     configure_errorhandlers(app)
#     configure_logging(app)
# 
#     return app


# Path: run.py
from productporter.app import create_app
from productporter.configs.production import ProductionConfig

"""
    productporter
    ~~~~~~~~~~~~~~~~~~~~

    helper for uwsgi

    :copyright: (c) 2014 by the ProductPorter Team.
    :license: BSD, see LICENSE for more details.
"""


app = create_app(config=ProductionConfig())