Skip to content

Commit 79c3d96

Browse files
committed
Add ability to see and filter by team access on events admin
1 parent 671208e commit 79c3d96

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

events/admin.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,13 +279,15 @@ class EventAdmin(admin.ModelAdmin):
279279
raw_id_fields = ("place", "created_by", "sponsors")
280280
list_display = (
281281
"__str__",
282+
"access",
282283
"open_link",
283284
"attendee_count",
284285
"start_time",
285286
"created_by",
286287
"created_time",
287288
)
288289
list_filter = (
290+
"team__access",
289291
"created_time",
290292
"start_time",
291293
countFilter("attendee"),
@@ -321,6 +323,9 @@ def open_link(self, event):
321323

322324
open_link.short_description = "Link"
323325

326+
def access(self, event):
327+
return Team.TYPES[event.team.access][1]
328+
324329

325330
admin.site.register(Event, EventAdmin)
326331

0 commit comments

Comments
 (0)