from flask import Flask, request, render_template
app = Flask(__name__)
@app.route('/')
def home():
return render_template('home.html')
@app.route('/startup_form')
def startup_form():
return render_template('startup_form.html')
@app.route('/investor_form')
def investor_form():
return render_template('investor_form.html')
@app.route('/startup_submitted', methods=['POST'])
def startup_submitted():
startup_name = request.form['startup_name']
startup_industry = request.form['startup_industry']
startup_description = request.form['startup_description']
startup_location = request.form['startup_location']
startup_website = request.form['startup_website']
# save startup information to database
return render_template('startup_submitted.html', startup_name=startup_name)
@app.route('/investor_submitted', methods=['POST'])
def investor_submitted():
investor_name = request.form['investor_name']
investor_industries = request.form.getlist('investor_industries')
investor_location = request.form['investor_location']
investor_minimum_investment = request.form['investor_minimum_investment']
# save investor information to database
return render_template('investor_submitted.html', investor_name=investor_name)
@app.route('/match_found')
def match_found():
# search database for matching startups and investors
startup = find_matching_startup()
investor = find_matching_investor()
# send email to both parties with contact information
return render_template('match_found.html', startup=startup, investor=investor)
if __name__ == '__main__':
app.run()