Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python beginner question - trying to understand return statement

def register():
    form = SignupForm(request.form)
    if request.method == 'POST' and form.validate():
        create_user = ({'username' : form.username.data, 'email' : form.email.data,
                            'password': form.password.data})
        flash('Thanks for registering')
        return create_user, redirect(url_for('loggedin.html'))
    return render_template('get-started.html', form=form)
 
PREVIOUS NEXT
Tagged: #Python #beginner #question #understand #return #statement
ADD COMMENT
Topic
Name
4+9 =