def profile():
    """View for editing a profile."""
    # Create forms
    verification_form = VerificationForm(formdata=None, prefix="verification")
    profile_form = profile_form_factory()

    # Process forms
    form = request.form.get('submit', None)
    if form == 'profile':
        handle_profile_form(profile_form)
    elif form == 'verification':
        handle_verification_form(verification_form)

    return render_template(
        current_app.config['USERPROFILES_PROFILE_TEMPLATE'],
        profile_form=profile_form,
        verification_form=verification_form,)
def profile ( ) : verification_form = VerificationForm ( formdata = None , prefix = "verification" ) profile_form = profile_form_factory ( ) form = request . form . get ( 'submit' , None ) if form == 'profile' : handle_profile_form ( profile_form ) elif form == 'verification' : handle_verification_form ( verification_form ) return render_template ( current_app . config [ 'USERPROFILES_PROFILE_TEMPLATE' ] , profile_form = profile_form , verification_form = verification_form , )
View for editing a profile.