Page MenuHomePhorge

No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
diff --git a/run.py b/run.py
index 8210483..c8ccd28 100644
--- a/run.py
+++ b/run.py
@@ -1,35 +1,37 @@
# -*- coding: utf-8 -*-
#
# Copyright 2014 Kolab Systems AG (http://www.kolabsys.com)
#
# Thomas Bruederli <bruederli at kolabsys.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import os
-from flask.ext.script import Manager, Shell
+from flask_script import Manager, Shell
from app import create_app, db
app = create_app(os.getenv('FLASK_CONFIG') or 'default')
manager = Manager(app)
+
def make_shell_context():
from app.model import User, Permission
return dict(app=app, db=db, User=User, Permission=Permission)
+
manager.add_command('shell', Shell(make_context=make_shell_context))
if __name__ == '__main__':
manager.run()

File Metadata

Mime Type
text/x-diff
Expires
Fri, Apr 24, 2:07 PM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18839967
Default Alt Text
(1 KB)

Event Timeline