

def create_model(self, form):
    if (form.password.data == ''):
        form.password.errors.append(lazy_gettext('This field is required.'))
        return False
    form.password.data = unicode(new_hash('sha', form.password.data.encode('utf8')).hexdigest())
    return super(LtUsersPanel, self).create_model(form)

dataset/ETHPy150Open gateway4labs/labmanager/labmanager/views/admin.py LtUsersPanel.create_model/original