Skip to content

Commit

Permalink
Merge pull request #2052 from IFRCGo/fix/dref-add-missing-auto-fields…
Browse files Browse the repository at this point in the history
…-in-admin

Add missing DREF report autocomplete fields
  • Loading branch information
szabozoltan69 authored Feb 21, 2024
2 parents 2dc65aa + 95dff03 commit 2ab1b27
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions dref/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
IdentifiedNeed,
PlannedIntervention,
RiskSecurity,
SourceInformation,
)


Expand Down Expand Up @@ -62,6 +63,11 @@ class DrefFileAdmin(admin.ModelAdmin):
search_fields = ("file",)


@admin.register(SourceInformation)
class SourceInformationAdmin(admin.ModelAdmin):
search_fields = ("source_name",)


@admin.register(Dref)
class DrefAdmin(
CompareVersionAdmin,
Expand Down Expand Up @@ -202,6 +208,11 @@ class DrefFinalReportAdmin(
"cover_image",
"financial_report",
"risk_security",
"needs_identified",
"planned_interventions",
"users",
"national_society_actions",
"source_information",
)
list_filter = ["dref"]
search_fields = ["title", "national_society__name", "appeal_code"]
Expand Down

0 comments on commit 2ab1b27

Please sign in to comment.