Skip to content

Commit

Permalink
Merge pull request #948 from kartoza/patch-fix-actions-undefined
Browse files Browse the repository at this point in the history
patch: add download records to actions
  • Loading branch information
tinashechiraya authored Mar 4, 2024
2 parents 85fcb6e + ae74f78 commit 0c313e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion django_project/monitor/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ def download_records(self, request, queryset):
return response
download_records.short_description = "Download selected records"

actions = ['download_records']


class SiteImageInline(admin.TabularInline):
model = SiteImage
Expand All @@ -113,4 +115,3 @@ class SitesAdmin(admin.ModelAdmin):

admin.site.register(ObservationPestImage)
admin.site.register(Assessment, admin.ModelAdmin)
admin.site.add_action('download_records')

0 comments on commit 0c313e6

Please sign in to comment.