See3D/views.py
def submit():
    """Render and accept data from a form to submit a request."""
    form = SubmitForm()

    if form.validate_on_submit():
        new_request = Request(title=form.title.data,
                              description=form.description.data)

        current_user.requests.append(new_request)

        db.session.add(new_request)
        db.session.commit()

        return redirect(url_for('gallery'))

    return render_template('submit.html', title="Create Request", form=form)
Render and accept data from a form to submit a request.
Render and accept data from a form to submit a request.
Render and accept data from a form to submit a request .
def submit():
    form = SubmitForm()
    if form.validate_on_submit():
        new_request = Request(title=form.title.data,
                              description=form.description.data)
        current_user.requests.append(new_request)
        db.session.add(new_request)
        db.session.commit()
        return redirect(url_for('gallery'))
    return render_template('submit.html', title="Create Request", form=form)
def submit ( ) : form = SubmitForm ( ) if form . validate_on_submit ( ) : new_request = Request ( title = form . title . data , description = form . description . data ) current_user . requests . append ( new_request ) db . session . add ( new_request ) db . session . commit ( ) return redirect ( url_for ( 'gallery' ) ) return render_template ( 'submit.html' , title = "Create Request" , form = form )
Render and accept data from a form to submit a request.
Render and accept data from a form to submit a request .
"""Render and accept data from a form to submit a request."""