Ejemplo n.º 1
0
def search():
    query = request.args.get('q')
    results = get_results(query)
    info = {
      'q': query,
      'results': results
    }
    return util.render_common_template('results.html', info=info)
Ejemplo n.º 2
0
def email_template():
    form = {'last_name': u'Lee', 'is_non_smoking_household': 'Y', 'property_losses_count': '0',
            'personal_property_worth': '60000', 'medical_payments': '1000', 'has_home_security': 'Y',
            'email_address': u'*****@*****.**', 'has_local_fire_smoke_alarm': 'Y', 'first_name': u'David',
            'personal_liability': '300000', 'has_bite_dog': 'N', 'label': -1, 'state': u'California',
            'unit_count': '5+', 'zip_code': u'94063', 'phone_number': u'', 'insurance_type': u'renters',
            'city': u'Rewood City', 'has_center_fire_burglar_alarm': 'Y', 'has_fire_sprinkler_system': 'Y',
            'has_local_burglar_alarm': 'Y', 'address': u'3328 Bay Road', 'farmers_identity_protection': 'N',
            'dob': '01/01/1984', 'has_auto_insurance_coverage': 'N', 'deductible': '1000',
            'purchase_category': 'deluxe', 'policy_price': '$%.2f' % (13.4567)}
    #return util.render_common_template('email/confirmation.txt', first_name="David")
    return util.render_common_template('email/full_page.html', page="email/confirmation.html", **form)
Ejemplo n.º 3
0
def quote_page():
    # The Amazon Elastic Load Balancer (ELB) supports a HTTP header called X-FORWARDED-PROTO.
    # All the HTTPS requests going through the ELB will have the value of X-FORWARDED-PROTO equal to 'HTTPS'.
    if request.headers.get('X-Forwarded-Proto') == 'http':
        secure_qoute = "https://rentsafe.co/quote"
        return redirect(secure_qoute, code=302)

    # Log what the user had regarding their email and first name.
    # (Do it by sending an email to us).
    first_name = request.form.get('first_name')
    email = request.form.get('email')
    founders = ['*****@*****.**', '*****@*****.**', '*****@*****.**']
    util.send_simple_email(
      founders, 
      subject='{name} just entered Get a quote on rentsafe.co'.format(name=first_name), 
      body='Go follow up with {email}!'.format(email=email),
      from_person='*****@*****.**')
    return util.render_common_template('quote.html', public_key=config.public_key)
Ejemplo n.º 4
0
def home_page():
    return util.render_common_template('index.html')
Ejemplo n.º 5
0
def checkout():
    return util.render_common_template('checkout.html')
Ejemplo n.º 6
0
def view_cart():
    return util.render_common_template('view_cart.html')
Ejemplo n.º 7
0
def shop():
    return util.render_common_template('shop.html')
Ejemplo n.º 8
0
def handle_exception(error):
    app.logger.error(str(error))
    return util.render_common_template('errors/500.html', err_msg=repr(error))
Ejemplo n.º 9
0
def page_not_found(e):
    return util.render_common_template('errors/404.html'), 404
Ejemplo n.º 10
0
def about():
    return util.render_common_template('about.html')
Ejemplo n.º 11
0
def privacy_policy():
    return util.render_common_template('privacy_policy.html')
Ejemplo n.º 12
0
def terms():
    return util.render_common_template('terms.html')
Ejemplo n.º 13
0
def payment_complete_page():
    return util.render_common_template('payment_complete.html')