muizenval

Observe mouse traps remotely
Log | Files | Refs

make-admin.py (212B)


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