aboutsummaryrefslogtreecommitdiff
path: root/src/manager.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/manager.py')
-rwxr-xr-xsrc/manager.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/manager.py b/src/manager.py
index c088ac29..795b3974 100755
--- a/src/manager.py
+++ b/src/manager.py
@@ -38,6 +38,14 @@ def db_create():
db.create_all()
UserController(ignore_context=True).create(**admin)
+@manager.command
+def create_admin(nickname, password):
+ "Will create an admin user."
+ admin = {'is_admin': True, 'is_api': True, 'is_active': True,
+ 'nickname': nickname,
+ 'pwdhash': generate_password_hash(password)}
+ with application.app_context():
+ UserController(ignore_context=True).create(**admin)
@manager.command
def fetch_asyncio(user_id=None, feed_id=None):
bgstack15