def setUp(self): app = flask.Flask(__name__) app.config["BCRYPT_LOG_ROUNDS"] = 6 bcrypt_init(app) self.password = "******" self.pw_hash = generate_password_hash(self.password)
check_password_hash from flaskext.wtf import Form, TextField, TextAreaField, PasswordField, \ SubmitField, Required, ValidationError, validators from flaskext.mail import Mail import os #------------------------------------------------------------------------------- # create our application :) app = Flask(__name__) # take the configuration from the config file app.config.from_object(config_file) #use py-bcrypt for hashing password bcrypt_init(app) mail = Mail(app) #all functions need to have to be imported from Base class or SVNfunctions() class func = Base() svn = SVNfunctions(app.config['LOCAL_REPO']) #-----------------------All forms are defined here------------------------------ class LoginForm (Form): username = TextField("Email") password = PasswordField("Password") submit = SubmitField("Login")
def setUp(self): app = flask.Flask(__name__) app.config['BCRYPT_LOG_ROUNDS'] = 6 bcrypt_init(app) self.password = '******' self.pw_hash = generate_password_hash(self.password)