From 27f0bead73dc8d83f249cf288d63ec92d6004289 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Sun, 12 Feb 2017 12:20:16 +0100 Subject: No need for flask-script anymore; flask provides this out of the box --- app/__init__.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'app') diff --git a/app/__init__.py b/app/__init__.py index 61841ca..0a02ed4 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -15,3 +15,17 @@ app.config.from_pyfile('settings.py') from .model import db from .login import login_manager from . import views + +# commands +@app.cli.command() +def create(): + db.create_all() + +@app.cli.command() +def drop(): + db.drop_all() + +@app.cli.command() +def compile(): + """Compiles all templates.""" + app.jinja_env.compile_templates('comp', zip = None) -- cgit v1.2.3-54-g00ecf