-
Notifications
You must be signed in to change notification settings - Fork 0
/
manage.py
38 lines (30 loc) · 987 Bytes
/
manage.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""
Command line tools for managing the application.
"""
from flask.ext.script import Manager
from app import create_app
import commands
# Set up the manager
manager = Manager(create_app)
manager.add_option(
'-e',
'--env',
choices=['dev', 'local', 'prod'],
default='local',
dest='env',
required=False
)
# Add commands
manager.add_command('drop', commands.Drop)
manager.add_command('init', commands.Init)
# Accounts
manager.add_command('add-account', commands.AddAccount)
manager.add_command('config-account', commands.ConfigAccount)
manager.add_command('delete-account', commands.DeleteAccount)
manager.add_command('generate-new-api-key', commands.GenerateNewAPIKey)
manager.add_command('list-accounts', commands.ListAccounts)
manager.add_command('list-backends', commands.ListBackends)
manager.add_command('rename-account', commands.RenameAccount)
manager.add_command('view-account', commands.ViewAccount)
if __name__ == "__main__":
manager.run()