Skip to content
Snippets Groups Projects
Commit de00c1c8 authored by Andreas Hubel's avatar Andreas Hubel
Browse files

chore(admin): allow to duplicate Room + Event entites

parent 9d708baf
No related branches found
No related tags found
No related merge requests found
...@@ -657,13 +657,14 @@ class EventAdmin(admin.ModelAdmin): ...@@ -657,13 +657,14 @@ class EventAdmin(admin.ModelAdmin):
] ]
list_display_links = ['name'] list_display_links = ['name']
list_filter = ['conference', 'track', 'is_public', 'kind', 'room', IsImportedListFilter] list_filter = ['conference', 'track', 'is_public', 'kind', 'room', IsImportedListFilter]
save_as = True
search_fields = ['name', 'abstract', 'description_de', 'description_en'] search_fields = ['name', 'abstract', 'description_de', 'description_en']
inlines = [ inlines = [
TagsInline, TagsInline,
EventAttachmentInline, EventAttachmentInline,
EventParticipantInline, EventParticipantInline,
] ]
readonly_fields = ['id', 'conference', 'get_is_imported'] readonly_fields = ['id', 'get_is_imported']
fieldsets = ( fieldsets = (
( (
...@@ -751,9 +752,10 @@ class RoomAdmin(admin.ModelAdmin): ...@@ -751,9 +752,10 @@ class RoomAdmin(admin.ModelAdmin):
list_display = ['conference', 'assembly', 'name', 'room_type', 'blocked'] list_display = ['conference', 'assembly', 'name', 'room_type', 'blocked']
list_display_links = ['name'] list_display_links = ['name']
list_filter = ['conference', 'room_type', 'backend_status', 'blocked', 'is_official', 'is_public_fahrplan'] list_filter = ['conference', 'room_type', 'backend_status', 'blocked', 'is_official', 'is_public_fahrplan']
save_as = True
search_fields = ['assembly__name', 'name', 'slug'] search_fields = ['assembly__name', 'name', 'slug']
inlines = [RoomLinkInline, RoomShareInline, TagsInline] inlines = [RoomLinkInline, RoomShareInline, TagsInline]
readonly_fields = ['id', 'conference', 'occupants', 'reserve_capacity'] readonly_fields = ['id', 'occupants', 'reserve_capacity']
ordering = ('-conference__id', F('assembly__is_official').desc(nulls_last=True), 'assembly__name', F('capacity').desc(nulls_last=True), 'name') ordering = ('-conference__id', F('assembly__is_official').desc(nulls_last=True), 'assembly__name', F('capacity').desc(nulls_last=True), 'name')
fieldsets = ( fieldsets = (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment