Commit 390e1257 authored by Mitchell Moore's avatar Mitchell Moore Committed by Krish Moodbidri
Browse files

Make unique test username for debugging

parent 8fd86e4a
......@@ -7,6 +7,7 @@ from __future__ import print_function
import uuid
from flask import Flask, redirect, url_for, request, render_template, flash, session
from flask_bootstrap import Bootstrap
import random
def create_app(config_name):
......@@ -16,7 +17,9 @@ def create_app(config_name):
@app.route('/', methods=['GET', 'POST']) # initial route to display the reg page
def index():
global return_url
username = "name_test"
if 'username' not in session:
session['username'] = "name_test" + str(random.randint(0, 10000))
if 'uid' not in session:
session['uid']=str(uuid.uuid4())
......@@ -24,7 +27,7 @@ def create_app(config_name):
if "redir" in request.args and return_url == "": # check for redir arg in url
return_url = request.args.get("redir") or "/pun/sys/dashboard"
return render_template("auth/SignUp.html")
return render_template('auth/SignUp.html', user=session['username'], room_id=session['uid'])
@app.errorhandler(403)
def forbidden(error):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment