Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Actually iterate over the admin action queryset to trigger the subscr…

…iption handling in `save()`.
  • Loading branch information...
commit f9367b378be3000cb0075c496e1c6503c6e79d42 1 parent 5f1c83d
@jezdez jezdez authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 django_website/aggregator/admin.py
View
10 django_website/aggregator/admin.py
@@ -5,13 +5,19 @@
def mark_approved(modeladmin, request, queryset):
- queryset.update(approval_status=APPROVED_FEED)
+ for item in queryset.iterator():
+ item.approval_status = APPROVED_FEED
+ item.save()
mark_approved.short_description = "Mark selected feeds as approved."
+
def mark_denied(modeladmin, request, queryset):
- queryset.update(approval_status=DENIED_FEED)
+ for item in queryset.iterator():
+ item.approval_status = DENIED_FEED
+ item.save()
mark_denied.short_description = "Mark selected feeds as denied."
+
admin.site.register(Feed,
list_display = ["title", "feed_type", "public_url", "approval_status"],
list_filter = ["feed_type", "is_defunct", "approval_status"],
Please sign in to comment.
Something went wrong with that request. Please try again.