def test(): u = User.login("arjun", "password") # print predictBills(6, 'arjun') print getMonthlyRates("arjun") return render_template('test.html', u="blah")
def getMonthlyRate(): username = request.args.get('username', None) # TODO authentication to make sure this user # has permission to do this if username is None: return json.dumps({"status": "fail", "reason": "Must include username."}) rate = getMonthlyRates(username) return json.dumps({'monthlyRate': rate})