Exemplo 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
Exemplo 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()
Exemplo 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()
Exemplo n.º 4
0
	def teardown():
		db.drop_all()