This commit is contained in:
pika 2025-03-30 20:32:22 +02:00
parent 539d6a6416
commit f939933a7c
9 changed files with 62 additions and 59 deletions

View file

@ -108,6 +108,17 @@ def create_app(config_name='development'):
except ImportError as e:
print(f"Could not import API blueprint: {e}")
# Register template filters - IMPORTANT FOR MARKDOWN FILTER
from app.core.template_filters import bp as filters_bp
app.register_blueprint(filters_bp)
# Register template filters directly if the blueprint method doesn't work
from app.core.template_filters import markdown_filter, ip_network_filter, ip_address_filter, get_ip_network
app.jinja_env.filters['markdown'] = markdown_filter
app.jinja_env.filters['ip_network'] = ip_network_filter
app.jinja_env.filters['ip_address'] = ip_address_filter
app.jinja_env.globals['get_ip_network'] = get_ip_network
# Create database tables
with app.app_context():
try: