from flask import Flask, render_template, Request,request, redirect, send_from_directory,url_for,make_response
from flask.json import jsonify
import zmq
import os
app = Flask(__name__)
app.debug = True

@app.route('/')
def root():
	return render_template('index.html')

#  Other pages
@app.route('/about')
def about():
	return render_template('about.html')

@app.route('/subscribe')
def subscribe():
	return render_template('signup.html')

@app.route('/update/<username>',methods=['GET', 'POST'])
def updateCity(city):
	# response = Request('https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=YOUR_API_KEY')
	return render_template('error.html')

#  Error Handling
@app.errorhandler(404)
def not_found(error):
    return render_template('error.html')

if __name__=='__main__':
	app.run(host='0.0.0.0',port=5565)
