Пример #1
0
def contact():
    '''
    Muestra el formulario de contacto
    '''
    form = ContactForm(request.form)
    if request.method=='POST' and form.validate() and send_mail("contact",current_app.config["CONTACT_EMAIL"],"pages",form=form):
        flash("message_sent")
        return redirect(url_for('index.home'))

    g.title+=_("contact")
    return render_template('pages/contact.html',page_title=_("contact"),form=form)
Пример #2
0
def contact():
    '''
    Muestra el formulario de contacto
    '''
    form = ContactForm(request.form)
    if request.method=='POST' and form.validate() and send_mail("contact",current_app.config["CONTACT_EMAIL"],"pages",form=form):
        flash("message_sent")
        return redirect(url_for('index.home'))

    g.title+=_("contact")
    return render_template(
        'pages/contact.html',
        page_title=_("contact"),
        pagination=["technology","jobs" if g.lang=="es" else "about",3,4 if g.lang=="es" else 3],
        form=form,
        pname="contact"
    )