Add status filter into search
This commit is contained in:
parent
977b13b556
commit
fc7cac3184
2 changed files with 10 additions and 2 deletions
|
|
@ -9,6 +9,7 @@ from .models import (
|
|||
GovernmentPlanSection,
|
||||
GovernmentPlanSectionsCMSPlugin,
|
||||
GovernmentPlanUpdatesCMSPlugin,
|
||||
PlanStatus,
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -25,6 +26,7 @@ class GovernmentPlansPlugin(CMSPluginBase):
|
|||
def render(self, context, instance, placeholder):
|
||||
context = super().render(context, instance, placeholder)
|
||||
context["plugin"] = instance
|
||||
context["status_list"] = PlanStatus.choices
|
||||
context["object_list"] = instance.get_plans(
|
||||
context["request"], published_only=False
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue