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
0c85db36
Commit
0c85db36
authored
7 years ago
by
Todd Dembrey
Browse files
Options
Downloads
Patches
Plain Diff
fixup! Make querying over wagtail objects easier
parent
31b4389a
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
opentech/apply/dashboard/tables.py
+2
-2
2 additions, 2 deletions
opentech/apply/dashboard/tables.py
with
2 additions
and
2 deletions
opentech/apply/dashboard/tables.py
+
2
−
2
View file @
0c85db36
...
@@ -58,7 +58,7 @@ class Select2ModelMultipleChoiceFilter(Select2MultipleChoiceFilter, filters.Mode
...
@@ -58,7 +58,7 @@ class Select2ModelMultipleChoiceFilter(Select2MultipleChoiceFilter, filters.Mode
pass
pass
class
WagtailMul
i
tChoiceFilter
(
Select2ModelMultipleChoiceFilter
):
class
WagtailMult
i
ChoiceFilter
(
Select2ModelMultipleChoiceFilter
):
@property
@property
def
wagtail_query
(
self
):
def
wagtail_query
(
self
):
# Queries on related pages will first attempt to query through the Page object
# Queries on related pages will first attempt to query through the Page object
...
@@ -86,7 +86,7 @@ class SubmissionFilter(filters.FilterSet):
...
@@ -86,7 +86,7 @@ class SubmissionFilter(filters.FilterSet):
round
=
Select2ModelMultipleChoiceFilter
(
queryset
=
get_used_rounds
,
label
=
'
Rounds
'
)
round
=
Select2ModelMultipleChoiceFilter
(
queryset
=
get_used_rounds
,
label
=
'
Rounds
'
)
funds
=
Select2ModelMultipleChoiceFilter
(
name
=
'
page
'
,
queryset
=
get_used_funds
,
label
=
'
Funds
'
)
funds
=
Select2ModelMultipleChoiceFilter
(
name
=
'
page
'
,
queryset
=
get_used_funds
,
label
=
'
Funds
'
)
status
=
Select2MultipleChoiceFilter
(
name
=
'
status__contains
'
,
choices
=
status_options
,
label
=
'
Status
'
)
status
=
Select2MultipleChoiceFilter
(
name
=
'
status__contains
'
,
choices
=
status_options
,
label
=
'
Status
'
)
lead
=
WagtailMul
i
tChoiceFilter
(
name
=
'
round__lead
'
,
queryset
=
get_round_leads
,
label
=
'
Lead
'
)
lead
=
WagtailMult
i
ChoiceFilter
(
name
=
'
round__lead
'
,
queryset
=
get_round_leads
,
label
=
'
Lead
'
)
class
Meta
:
class
Meta
:
model
=
ApplicationSubmission
model
=
ApplicationSubmission
...
...
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