Commit 8da22b99 authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Merge branch 'feature/sorting-event-admin' into 'master'

Add sorting to custom columns in event admin

Closes #710

See merge request !956
parents 8d3cb3be 7c529624
......@@ -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')
Markdown is supported
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