Verified Commit 7c529624 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Add sorting to custom columns in event admin

parent c77b1407
......@@ -131,6 +131,7 @@ class EventAdmin(DoNextModelAdmin):
event_date = timezone.make_naive(obj.start)
return _date(event_date, "l d b Y, G:i")
event_date.short_description = _('Event Date')
event_date.admin_order_field = 'start'
def registration_date(self, obj):
if obj.registration_start is not None:
......@@ -140,6 +141,7 @@ class EventAdmin(DoNextModelAdmin):
return _date(start_date, "l d b Y, G:i")
registration_date.short_description = _('Registration Start')
registration_date.admin_order_field = 'registration_start'
def edit_link(self, obj):
return _('Edit')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment