()
return render_template('login.html', form=form)
Standard login form.
Standard login form.
Standard login form .
def login():
    """
    Standard login form.
    """
    if g.user:
        return redirect(url_for('public.landing'))

    form = UserLoginForm()
    if form.validate_on_submit():
        u = User.by_username(form.username.data)
        session['_u'] = u.id
        session['_uu'] = u.username
        return redirect(url_for('projects.dashboard', u=u.username))

    return render_template('login.html', form=form)
def login ( ) : if g . user : return redirect ( url_for ( 'public.landing' ) ) form = UserLoginForm ( ) if form . validate_on_submit ( ) : u = User . by_username ( form . username . data ) session [ '_u' ] = u . id session [ '_uu' ] = u . username return redirect ( url_for ( 'projects.dashboard' , u = u . username ) ) return render_template ( 'login.html' , form = form )