Skip to content

Commit

Permalink
List_display and list_filter to SurgeAlertAdmin
Browse files Browse the repository at this point in the history
  • Loading branch information
szabozoltan69 committed Mar 19, 2024
1 parent 659b667 commit 1bd8c4e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions notifications/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,19 @@


class SurgeAlertAdmin(CompareVersionAdmin, RegionRestrictedAdmin, TranslationAdmin):

@admin.display(description="std")
def std(self, obj):
return obj.is_stood_down

std.boolean = True
country_in = 'event__countries__in'
region_in = 'event__regions__in'
autocomplete_fields = ('event',)
search_fields = ('operation', 'message', 'event__name',)
readonly_fields = ('molnix_id', 'is_stood_down')
list_display = ('__str__', 'message', 'start', 'molnix_id', 'molnix_status', 'status', 'std')
list_filter = ('molnix_status', 'status', 'is_stood_down')


class SubscriptionAdmin(CompareVersionAdmin):
Expand Down

0 comments on commit 1bd8c4e

Please sign in to comment.