23 lines
603 B
Python
23 lines
603 B
Python
"""
|
|
Café Bach Email Generator - Flask Application
|
|
"""
|
|
|
|
import os
|
|
from flask import Flask
|
|
|
|
|
|
def create_app(config_name=None):
|
|
"""Application factory pattern for Flask"""
|
|
# Get the directory of this file (app/__init__.py)
|
|
basedir = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
app = Flask(__name__,
|
|
template_folder=os.path.join(basedir, 'templates'),
|
|
static_folder=os.path.join(basedir, 'static'))
|
|
app.config.from_object('app.config')
|
|
|
|
# Register blueprints
|
|
from app.views import main_bp
|
|
app.register_blueprint(main_bp)
|
|
|
|
return app
|