Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Krish Moodbidri
user-reg-cleanup
Commits
69aef159
Commit
69aef159
authored
Mar 04, 2020
by
Mitchell Moore
Committed by
Krish Moodbidri
Apr 10, 2020
Browse files
Use username in place of test username created.
parent
74c915c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/__init__.py
View file @
69aef159
...
...
@@ -12,20 +12,18 @@ import random
def
create_app
(
config_name
):
app
=
Flask
(
__name__
)
@
app
.
route
(
'/'
,
methods
=
[
'GET'
,
'POST'
])
# initial route to display the reg page
def
index
():
global
return_url
if
'username'
not
in
session
:
session
[
'username'
]
=
"name_test"
+
str
(
random
.
randint
(
0
,
10000
))
# session['username'] = request.remote_user
if
'uid'
not
in
session
:
session
[
'uid'
]
=
str
(
uuid
.
uuid4
())
if
"redir"
in
request
.
args
and
return_url
==
""
:
# check for redir arg in url
return_url
=
request
.
args
.
get
(
"redir"
)
or
"/pun/sys/dashboard"
if
"redir"
in
request
.
args
and
'
return_url
'
not
in
session
:
# check for redir arg in url
session
[
'
return_url
'
]
=
request
.
args
.
get
(
"redir"
)
or
"/pun/sys/dashboard"
return
render_template
(
'auth/SignUp.html'
,
user
=
session
[
'username'
],
room_id
=
session
[
'uid'
])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment