add defaults templates
This commit is contained in:
5
app.py
5
app.py
@@ -13,6 +13,7 @@ from tasks import cleanup_trash
|
||||
import click
|
||||
from utils import timeago
|
||||
from extensions import db, login_manager, csrf
|
||||
from utils.email_templates import create_default_templates
|
||||
|
||||
# Load environment variables
|
||||
load_dotenv()
|
||||
@@ -85,6 +86,10 @@ def create_app():
|
||||
# Register custom filters
|
||||
app.jinja_env.filters['timeago'] = timeago
|
||||
|
||||
# Create default email templates if they don't exist
|
||||
with app.app_context():
|
||||
create_default_templates()
|
||||
|
||||
return app
|
||||
|
||||
app = create_app()
|
||||
|
||||
Reference in New Issue
Block a user