Esempio n. 1
0
def db_fixture(app_fixture, request):
	#db.app = app_fixture
	db.drop_all()
	db.create_all()

	def teardown():
		db.drop_all()

	request.addfinalizer(teardown)
	return db
Esempio n. 2
0
from kiosk import db
from models.user import *
from models.event import *
from models.signin import *
from Crypto.Hash import SHA256

if __name__ == "__main__":
		db.drop_all()
		db.create_all()
		first_admin = Admin()
		first_admin.uname = 'admin'
		first_admin.fullname = 'admin'
		first_admin.password = SHA256.new('stronkpass'.encode('utf-8')).hexdigest()
		db.session.add(first_admin)
		db.session.commit()
Esempio n. 3
0
from kiosk import db
from models.user import *
from models.event import *
from models.signin import *
from Crypto.Hash import SHA256

if __name__ == "__main__":
    db.drop_all()
    db.create_all()
    first_admin = Admin()
    first_admin.uname = 'admin'
    first_admin.fullname = 'admin'
    first_admin.password = SHA256.new('stronkpass'.encode('utf-8')).hexdigest()
    db.session.add(first_admin)
    db.session.commit()
Esempio n. 4
0
	def teardown():
		db.drop_all()