Skip to content
Snippets Groups Projects
Commit 14250509 authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

Fix default slot localization in admin interface

Make sure the more useful local times are displayed both in the form and on the list page
parent 96d59de6
No related branches found
No related tags found
1 merge request!153Fix default slot localization in admin interface
Pipeline #128848 passed with stage
in 1 minute and 9 seconds
......@@ -412,6 +412,12 @@ class DefaultSlotAdminForm(forms.ModelForm):
@admin.register(DefaultSlot)
class DefaultSlotAdmin(admin.ModelAdmin):
list_display = ['start', 'end', 'event']
list_display = ['start_simplified', 'end_simplified', 'event']
list_filter = ['event']
form = DefaultSlotAdminForm
def get_form(self, request, obj=None, change=False, **kwargs):
# Use timezone of event
if obj is not None:
timezone.activate(obj.event.timezone)
return super().get_form(request, obj, change, **kwargs)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment