make-admin.py (212B) download
1from server.app import db
2from server.models import User
3import sys
4
5user = User.query.filter_by(email=sys.argv[1]).first()
6if not user:
7 print('not found')
8 exit(1)
9
10user.admin = True
11
12db.session.commit()