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
ace4cad7
Commit
ace4cad7
authored
6 years ago
by
Todd Dembrey
Browse files
Options
Downloads
Patches
Plain Diff
Correctly limit the table data without affecting activity
parent
97ec2096
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
opentech/apply/funds/views.py
+3
-3
3 additions, 3 deletions
opentech/apply/funds/views.py
with
3 additions
and
3 deletions
opentech/apply/funds/views.py
+
3
−
3
View file @
ace4cad7
...
@@ -3,7 +3,7 @@ from copy import copy
...
@@ -3,7 +3,7 @@ from copy import copy
from
django.contrib.auth.decorators
import
login_required
from
django.contrib.auth.decorators
import
login_required
from
django.contrib
import
messages
from
django.contrib
import
messages
from
django.core.exceptions
import
PermissionDenied
from
django.core.exceptions
import
PermissionDenied
from
django.db.models
import
Q
from
django.db.models
import
F
,
Q
from
django.http
import
HttpResponseRedirect
,
Http404
from
django.http
import
HttpResponseRedirect
,
Http404
from
django.shortcuts
import
get_object_or_404
from
django.shortcuts
import
get_object_or_404
from
django.urls
import
reverse_lazy
from
django.urls
import
reverse_lazy
...
@@ -85,8 +85,8 @@ class SubmissionOverviewView(AllActivityContextMixin, BaseAdminSubmissionsTable)
...
@@ -85,8 +85,8 @@ class SubmissionOverviewView(AllActivityContextMixin, BaseAdminSubmissionsTable)
table_pagination
=
False
table_pagination
=
False
filter_action
=
reverse_lazy
(
'
funds:submissions:list
'
)
filter_action
=
reverse_lazy
(
'
funds:submissions:list
'
)
def
get_
queryset
(
self
):
def
get_
table_data
(
self
):
return
super
().
get_
queryset
(
)[:
5
]
return
super
().
get_
table_data
().
order_by
(
F
(
'
last_update
'
).
desc
(
nulls_last
=
True
)
)[:
5
]
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
base_query
=
RoundsAndLabs
.
objects
.
with_progress
().
order_by
(
'
end_date
'
)
base_query
=
RoundsAndLabs
.
objects
.
with_progress
().
order_by
(
'
end_date
'
)
...
...
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