Example #1
0
def recommend():
    """공연 추천 페이지"""
    if request.method == "POST":
        helpdesk_email = current_app.config.get("HELPDESK_EMAIL")
        email_content = construct_email_content_from_dict(request.form)
        send_email(helpdesk_email, "공연추천해주세요~", email_content)
        show_modal = True
    return render_template("main/recommend.html", **locals())
Example #2
0
def reservation(content_id):
    try:
        content = Content.query.get(content_id)
    except:
        return redirect(url_for("main.index"))
    if request.method == "POST":
        helpdesk_email = current_app.config.get("HELPDESK_EMAIL")
        email_content = construct_email_content_from_dict(request.form)
        send_email(helpdesk_email, "예약문의가 왔습니다.", email_content)
        return redirect(url_for("main.detail", content_id=content.id))
    return render_template("main/reservation.html", **locals())