Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

src/f/l/flamejam-HEAD/flamejam/views/account.py   flamejam(Download)
from flamejam import app, db, mail
from flamejam.models import User
from flamejam.utils import hash_password, verify_password
from flamejam.forms import UserLogin, UserRegistration, ResetPassword, NewPassword, SettingsForm, ContactUserForm
from flask import render_template, redirect, flash, url_for, current_app, session, request, abort, Markup
        user.token = None
        # set the new password
        user.password = hash_password(form.password.data)
        db.session.commit()
        flash("Your password was updated and you can login with it now.", "success")
                flash("Your password is incorrect. The password was not changed.", "error")
            else:
                user.password = hash_password(form.new_password.data)
                flash("Your password was changed", "success")
 

src/f/l/flamejam-HEAD/flamejam/models/user.py   flamejam(Download)
# -*- coding: utf-8 -*-
 
from flamejam import app, db, login_manager
from flamejam.utils import hash_password, verify_password, findLocation
from flamejam.models import Participation, Team, Game
    def __init__(self, username, password, email, is_admin = False, is_verified = False):
        self.username = username
        self.password = hash_password(password)
        self.email = email
        self.new_email = email