05/31 Phase 2
This commit is contained in:
+7
-2
@@ -25,9 +25,15 @@ def create_app(config_name=None):
|
||||
# Register blueprints
|
||||
from app.routes.auth import auth_bp
|
||||
from app.routes.dashboard import dashboard_bp
|
||||
from app.routes.accounts import accounts_bp
|
||||
from app.routes.categories import categories_bp
|
||||
from app.routes.transactions import transactions_bp
|
||||
|
||||
app.register_blueprint(auth_bp)
|
||||
app.register_blueprint(dashboard_bp)
|
||||
app.register_blueprint(accounts_bp)
|
||||
app.register_blueprint(categories_bp)
|
||||
app.register_blueprint(transactions_bp)
|
||||
|
||||
# Import all models so Flask-Migrate can see them
|
||||
with app.app_context():
|
||||
@@ -38,12 +44,11 @@ def create_app(config_name=None):
|
||||
AiInsight, FxRate
|
||||
)
|
||||
|
||||
# Jinja2 template globals
|
||||
# Jinja2 globals
|
||||
app.jinja_env.globals['format_currency'] = format_currency
|
||||
app.jinja_env.globals['format_percent'] = format_percent
|
||||
app.jinja_env.globals['format_large_number'] = format_large_number
|
||||
|
||||
# Jinja2 filters
|
||||
@app.template_filter('currency')
|
||||
def currency_filter(value, symbol=None):
|
||||
return format_currency(value, symbol)
|
||||
|
||||
Reference in New Issue
Block a user