Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hypha
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ots
hypha
Commits
26fc5d48
Commit
26fc5d48
authored
4 years ago
by
Vaibhav Mule
Browse files
Options
Downloads
Patches
Plain Diff
use context.update()
parent
f499d4fb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hypha/apply/dashboard/views.py
+9
-8
9 additions, 8 deletions
hypha/apply/dashboard/views.py
with
9 additions
and
8 deletions
hypha/apply/dashboard/views.py
+
9
−
8
View file @
26fc5d48
...
@@ -137,9 +137,10 @@ class MySubmission:
...
@@ -137,9 +137,10 @@ class MySubmission:
class
AdminDashboardView
(
BaseDashboardView
):
class
AdminDashboardView
(
BaseDashboardView
):
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
().
get_context_data
(
**
kwargs
)
submissions
=
ApplicationSubmission
.
objects
.
all
().
for_table
(
self
.
request
.
user
)
submissions
=
ApplicationSubmission
.
objects
.
all
().
for_table
(
self
.
request
.
user
)
extra_
context
=
{
context
.
update
(
{
'
active_payment_requests
'
:
self
.
active_payment_requests
(),
'
active_payment_requests
'
:
self
.
active_payment_requests
(),
'
awaiting_reviews
'
:
self
.
awaiting_reviews
(
submissions
),
'
awaiting_reviews
'
:
self
.
awaiting_reviews
(
submissions
),
'
my_reviewed
'
:
self
.
my_reviewed
(
submissions
),
'
my_reviewed
'
:
self
.
my_reviewed
(
submissions
),
...
@@ -147,9 +148,9 @@ class AdminDashboardView(BaseDashboardView):
...
@@ -147,9 +148,9 @@ class AdminDashboardView(BaseDashboardView):
'
projects_to_approve
'
:
self
.
projects_to_approve
(),
'
projects_to_approve
'
:
self
.
projects_to_approve
(),
'
rounds
'
:
self
.
rounds
(),
'
rounds
'
:
self
.
rounds
(),
'
my_flagged
'
:
self
.
my_flagged
(
submissions
),
'
my_flagged
'
:
self
.
my_flagged
(
submissions
),
}
}
)
current_context
=
super
().
get_context_data
(
**
kwargs
)
return
{
**
current_context
,
**
extra_context
}
return
context
class
ReviewerDashboardView
(
BaseDashboardView
,
MySubmission
):
class
ReviewerDashboardView
(
BaseDashboardView
,
MySubmission
):
...
@@ -174,20 +175,20 @@ class ReviewerDashboardView(BaseDashboardView, MySubmission):
...
@@ -174,20 +175,20 @@ class ReviewerDashboardView(BaseDashboardView, MySubmission):
data
=
self
.
request
.
GET
or
None
,
request
=
self
.
request
,
queryset
=
submissions
)
data
=
self
.
request
.
GET
or
None
,
request
=
self
.
request
,
queryset
=
submissions
)
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
().
get_context_data
(
**
kwargs
)
submissions
=
ApplicationSubmission
.
objects
.
all
().
for_table
(
self
.
request
.
user
)
submissions
=
ApplicationSubmission
.
objects
.
all
().
for_table
(
self
.
request
.
user
)
# Applications by reviewer
# Applications by reviewer
my_submissions
,
my_inactive_submissions
=
self
.
my_submissions
(
submissions
)
my_submissions
,
my_inactive_submissions
=
self
.
my_submissions
(
submissions
)
extra_
context
=
{
context
.
update
(
{
'
awaiting_reviews
'
:
self
.
awaiting_reviews
(
submissions
),
'
awaiting_reviews
'
:
self
.
awaiting_reviews
(
submissions
),
'
my_reviewed
'
:
self
.
my_reviewed
(
submissions
),
'
my_reviewed
'
:
self
.
my_reviewed
(
submissions
),
'
my_submissions
'
:
my_submissions
,
'
my_submissions
'
:
my_submissions
,
'
my_inactive_submissions
'
:
my_inactive_submissions
,
'
my_inactive_submissions
'
:
my_inactive_submissions
,
}
}
)
current_context
=
super
().
get_context_data
(
**
kwargs
)
return
context
return
{
**
current_context
,
**
extra_context
}
class
PartnerDashboardView
(
TemplateView
,
MySubmission
):
class
PartnerDashboardView
(
TemplateView
,
MySubmission
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment