Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Pariksha
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roshan Rabinarayan
Pariksha
Commits
1264bed4
Commit
1264bed4
authored
Nov 15, 2020
by
Samarth Joshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Signup.html Redirect to homepage if user already signed in
parent
64685e29
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
quiz/templates/submissions.html
quiz/templates/submissions.html
+3
-0
quiz/views.py
quiz/views.py
+3
-3
No files found.
quiz/templates/submissions.html
View file @
1264bed4
...
...
@@ -44,6 +44,9 @@
flex-direction
:
column
;
align-items
:
center
;
}
.emptiness
>
img
{
height
:
200px
;
}
.heading
{
width
:
400px
;
margin
:
50px
auto
;
...
...
quiz/views.py
View file @
1264bed4
...
...
@@ -231,6 +231,8 @@ def create_quiz(request):
#login functionality
def
sign_up
(
request
):
"""This function renders the sign up page for the users"""
if
request
.
user
.
is_authenticated
:
return
HttpResponseRedirect
(
'/'
)
context
=
{}
form
=
UserCreationForm
(
request
.
POST
or
None
)
if
request
.
method
==
"POST"
:
...
...
@@ -241,9 +243,7 @@ def sign_up(request):
if
role
==
"P"
:
p
=
Permission
(
userId
=
request
.
user
,
role
=
"P"
)
p
.
save
()
return
render
(
request
,
'professor.html'
)
else
:
return
render
(
request
,
'student.html'
)
return
HttpResponseRedirect
(
'/'
)
context
[
'form'
]
=
form
return
render
(
request
,
'registration/signup.html'
,
context
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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