Please enter a password for your new Curious Greg account.
+
+
+
+{% include 'footer.html' %}
+
+
\ No newline at end of file
diff --git a/web.py b/web.py
index 832ed34..f037a48 100755
--- a/web.py
+++ b/web.py
@@ -34,6 +34,22 @@ def home():
else:
return redirect(url_for('main'))
+
+@app.route('/debug') #TODO: remove this before making the site live ;p
+def print_debug_info():
+ return json.dumps(session._get_current_object())
+
+@app.route('/login')
+def log_in():
+ if 'acct' in session:
+ #user is probably already logged in. if they aren't, home() will handle things and redirect them back here
+ return redirect(url_for('home'))
+ return render_template("login.html")
+
+ # return(json.dumps(client_info))
+
+#internal stuff
+
@app.route('/internal/auth_a')
def internal_auth_a():
@@ -70,16 +86,15 @@ def internal_auth_b():
if c.execute("SELECT COUNT(*) FROM data WHERE username LIKE ? AND instance LIKE ?", (session['username'], session['instance_url'])).fetchone()[0] > 0:
#user already has an account with CG
return redirect(url_for('log_in'))
+
c.execute("INSERT INTO data (username, instance, secret, appid, appsecret) VALUES (?, ?, ?, ?, ?)", (session['username'], session['instance_url'], session['secret'], session['client_id'], session['client_secret']))
db.commit()
return redirect(url_for('home'))
-@app.route('/debug')
-def print_debug_info():
- return json.dumps(session._get_current_object())
+@app.route('/internal/do_login')
+def do_login():
+ pass
-@app.route('/login')
-def log_in():
- return render_template("login.html")
-
- # return(json.dumps(client_info))
+@app.route('/create_password')
+def create_password():
+ return render_template("create_password.html")
\ No newline at end of file