-
Notifications
You must be signed in to change notification settings - Fork 0
/
manage.py
33 lines (26 loc) · 950 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
import sys
def create_all():
from main import create_app
app = create_app(config_file="config.cfg")
from extensions import db
db.create_all(app=app)
def runserver():
from main import create_app
app = create_app(config_file="config.cfg")
app.run(debug=True)
def createsuperuser():
from helpers import userhelpers
import getpass
username = input("Enter username: ")
email = input("Enter email: ")
password = getpass.getpass("Enter password: ")
userhelpers.create_user(username=username,email=email,password=password,verified=True)
def create_user():
from helpers import userhelpers
import getpass
username = input("Enter username: ")
email = input("Enter email: ")
password = getpass.getpass("Enter password: ")
userhelpers.create_user(username=username,email=email,password=password,verified=True,is_staff=False)
if __name__ == '__main__':
globals()[sys.argv[1]]()