#!/usr/bin/env python

from flask import abort, Flask, jsonify, redirect, render_template, request, session, url_for
from flask.ext.sqlalchemy import SQLAlchemy

app = Flask(__name__)
db = SQLAlchemy(app)

app.secret_key = 'development'

@app.route('/')
def hello_world():
	return render_template('base.html')

@app.route('/u/<user>')
@app.route('/user/<user>')
def get_user(user):
	pass
	
@app.route('/e/a', methods=['POST'])
@app.route('/e/add', methods=['POST'])
@app.route('/event/a', methods=['POST'])
@app.route('/event/add', methods=['POST'])
def add_event():
	if not session.get('logged_in'):
		redirect('/login')
	else:
		#TODO: add code for adding event

@app.route('/s/a', methods=['POST'])
@app.route('/s/add', methods=['POST'])
@app.route('/suggestion/a', methods=['POST'])
@app.route('/suggestion/add', methods=['POST'])
def add_suggestion():
	if not session.get('logged_in'):
		redirect('/login')
	else:
		return 'suggestion was added placeholder'
		#TODO: add code for suggestion

@app.route('/login', methods=['GET','POST'])
def fake_login():
	if request.method == 'GET':
		return 'login form goes here' #FIXME: create login form
	elif request.method == 'POST':
		request.form['user'] 

if __name__ == '__main__':
	app.run()


@@ -295,12 +295,14 @@
 te('
-base
+login2
 .htm
@@ -658,16 +658,23 @@
 ng event
+%0A%09%09pass
 %0A%0A@app.r
@@ -997,16 +997,23 @@
 ggestion
+%0A%09%09pass
 %0A%0A@app.r

Tweak to run properly