Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GAP
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Darshan Prabhu
GAP
Commits
1229c12a
Commit
1229c12a
authored
Nov 18, 2020
by
Darshan Prabhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated views file to sort data in ascending order
parent
85e6dc13
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
8 deletions
+31
-8
db.sqlite3
db.sqlite3
+0
-0
guideAllocationPortal/__pycache__/views.cpython-36.pyc
guideAllocationPortal/__pycache__/views.cpython-36.pyc
+0
-0
guideAllocationPortal/static/guideAllocationPortal/allocationResults.pdf
...Portal/static/guideAllocationPortal/allocationResults.pdf
+0
-0
guideAllocationPortal/static/guideAllocationPortal/allocationResults.tex
...Portal/static/guideAllocationPortal/allocationResults.tex
+27
-6
guideAllocationPortal/static/resume-uploads/student-2/(www.entrance-exam.net)-GRE Sample Paper 10.pdf
...student-2/(www.entrance-exam.net)-GRE Sample Paper 10.pdf
+0
-0
guideAllocationPortal/views.py
guideAllocationPortal/views.py
+4
-2
No files found.
db.sqlite3
View file @
1229c12a
No preview for this file type
guideAllocationPortal/__pycache__/views.cpython-36.pyc
View file @
1229c12a
No preview for this file type
guideAllocationPortal/static/guideAllocationPortal/allocationResults.pdf
View file @
1229c12a
No preview for this file type
guideAllocationPortal/static/guideAllocationPortal/allocationResults.tex
View file @
1229c12a
...
@@ -25,9 +25,9 @@
...
@@ -25,9 +25,9 @@
\setlength
{
\tabcolsep
}{
1in
}
%
\setlength
{
\tabcolsep
}{
1in
}
%
\begin{longtabu}
{
|c c|
}
%
\begin{longtabu}
{
|c c|
}
%
\hline
%
\hline
%
\textbf
{
No. of Students applied
}&
3
\\
%
\textbf
{
No. of Students applied
}&
4
\\
%
\textbf
{
No. of Slots Offered
}&
4
\\
%
\textbf
{
No. of Slots Offered
}&
16
\\
%
\textbf
{
No. of Students alloted
}&
2
\\
%
\textbf
{
No. of Students alloted
}&
3
\\
%
\hline
%
\hline
%
\end{longtabu}
%
\end{longtabu}
%
\renewcommand
{
\arraystretch
}{
2.0
}
%
\renewcommand
{
\arraystretch
}{
2.0
}
%
...
@@ -37,7 +37,9 @@
...
@@ -37,7 +37,9 @@
\textbf
{
Guide Name
}&
\textbf
{
Requirements
}&
\textbf
{
Alloted
}
\\
%
\textbf
{
Guide Name
}&
\textbf
{
Requirements
}&
\textbf
{
Alloted
}
\\
%
\hline
%
\hline
%
\hline
%
\hline
%
Faculty 1
&
4
&
\textbf
{
2
}
\\
%
Faculty 1
&
11
&
\textbf
{
3
}
\\
%
\hline
%
Faculty 2
&
5
&
\textbf
{
0
}
\\
%
\hline
%
\hline
%
\end{longtabu}
%
\end{longtabu}
%
\begin{center}
%
\begin{center}
%
...
@@ -54,17 +56,36 @@ Faculty 1&4&\textbf{2}\\%
...
@@ -54,17 +56,36 @@ Faculty 1&4&\textbf{2}\\%
\midrule
%
\midrule
%
\midrule
%
\midrule
%
\endhead
%
\endhead
%
\multirow
{
2
}{
*
}{
Faculty 1
}&
\multirow
{
2
}{
*
}{
1
}&
1
&
darshan
\\
%
\multirow
{
3
}{
*
}{
Faculty 1
}&
\multirow
{
2
}{
*
}{
1
}&
3
&
student
{
-
}
2
\\
%
\cmidrule
{
3
%
\cmidrule
{
3
%
-
%
-
%
4
}
%
4
}
%
&&
2
&
student
{
-
}
1
\\
%
&&
6
&
student
{
-
}
3
\\
%
\cmidrule
{
3
%
-
%
4
}
%
\cmidrule
{
2
%
-
%
4
}
%
&
\multirow
{
1
}{
*
}{
2
}&
2
&
student
{
-
}
4
\\
%
\cmidrule
{
3
%
\cmidrule
{
3
%
-
%
-
%
4
}
%
4
}
%
\cmidrule
{
2
%
\cmidrule
{
2
%
-
%
-
%
4
}
%
4
}
%
\cmidrule
{
2
%
-
%
4
}
%
\cmidrule
{
1
%
-
%
4
}
%
\cmidrule
{
2
%
-
%
4
}
%
\cmidrule
{
2
%
-
%
4
}
%
\cmidrule
{
1
%
\cmidrule
{
1
%
-
%
-
%
4
}
\bottomrule
%
4
}
\bottomrule
%
...
...
guideAllocationPortal/static/resume-uploads/student-2/(www.entrance-exam.net)-GRE Sample Paper 10.pdf
0 → 100644
View file @
1229c12a
File added
guideAllocationPortal/views.py
View file @
1229c12a
...
@@ -296,8 +296,9 @@ def updatePriorityView(request):
...
@@ -296,8 +296,9 @@ def updatePriorityView(request):
project_id
=
request
.
POST
.
get
(
'projectId'
)
project_id
=
request
.
POST
.
get
(
'projectId'
)
clauses
=
' '
.
join
([
'WHEN student_id={} THEN {}'
.
format
(
pk
,
i
)
for
i
,
pk
in
enumerate
(
priority_list
)])
clauses
=
' '
.
join
([
'WHEN student_id={} THEN {}'
.
format
(
pk
,
i
)
for
i
,
pk
in
enumerate
(
priority_list
)])
ordering
=
'CASE {} END'
.
format
(
clauses
)
ordering
=
'CASE {} END'
.
format
(
clauses
)
print
(
clauses
)
priorities
=
ProjectPriorities
.
objects
.
filter
(
project_id
=
project_id
)
.
extra
(
select
=
{
'ordering'
:
ordering
},
order_by
=
(
'ordering'
,))
priorities
=
ProjectPriorities
.
objects
.
filter
(
project_id
=
project_id
)
.
extra
(
select
=
{
'ordering'
:
ordering
},
order_by
=
(
'ordering'
,))
print
(
priorities
)
if
priorities
.
exists
():
if
priorities
.
exists
():
for
index
,
priority
in
enumerate
(
priorities
):
for
index
,
priority
in
enumerate
(
priorities
):
# Update priorities
# Update priorities
...
@@ -439,6 +440,7 @@ def get_context(user_type,request):
...
@@ -439,6 +440,7 @@ def get_context(user_type,request):
current_round
=
RoundDetailsModel
.
objects
.
latest
(
'roundNo'
)
current_round
=
RoundDetailsModel
.
objects
.
latest
(
'roundNo'
)
context
[
'current_round'
]
=
current_round
context
[
'current_round'
]
=
current_round
if
user_type
==
'student'
:
if
user_type
==
'student'
:
print
(
request
.
POST
)
# Get student context details
# Get student context details
# User application with all student details
# User application with all student details
...
@@ -508,7 +510,7 @@ def get_context(user_type,request):
...
@@ -508,7 +510,7 @@ def get_context(user_type,request):
# List of all priorities associated with each project
# List of all priorities associated with each project
priority_groups
=
dict
()
priority_groups
=
dict
()
for
priority
in
ProjectPriorities
.
objects
.
filter
(
project__in
=
context
[
'availablePositions'
])
.
order_by
(
'
-
current_priority'
):
for
priority
in
ProjectPriorities
.
objects
.
filter
(
project__in
=
context
[
'availablePositions'
])
.
order_by
(
'current_priority'
):
priority_groups
.
setdefault
(
priority
.
project
,[])
.
append
(
priority
)
priority_groups
.
setdefault
(
priority
.
project
,[])
.
append
(
priority
)
context
[
'ProjectWiseShortlistedApplications'
]
=
list
(
priority_groups
.
values
())
context
[
'ProjectWiseShortlistedApplications'
]
=
list
(
priority_groups
.
values
())
...
...
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