<commit_before>from __future__ import unicode_literals
from django.contrib import admin

from symposion.schedule.models import Schedule, Day, Room, SlotKind, Slot, SlotRoom, Presentation


class DayInline(admin.StackedInline):
    model = Day
    extra = 2


class SlotKindInline(admin.StackedInline):
    model = SlotKind


class ScheduleAdmin(admin.ModelAdmin):
    model = Schedule
    inlines = [DayInline, SlotKindInline, ]


class SlotRoomInline(admin.TabularInline):
    model = SlotRoom
    extra = 1


class SlotAdmin(admin.ModelAdmin):
    list_filter = ("day", "kind")
    list_display = ("day", "start", "end", "kind", "content")
    inlines = [SlotRoomInline, ]


class RoomAdmin(admin.ModelAdmin):
    list_filter=("schedule",)
    list_display=("name", "order", "schedule"),
    inlines = [SlotRoomInline, ]


class PresentationAdmin(admin.ModelAdmin):
    model = Presentation
    list_filter = ("section", "cancelled", "slot")


admin.site.register(Schedule, ScheduleAdmin)
admin.site.register(Room, RoomAdmin)
admin.site.register(Slot, SlotAdmin)
admin.site.register(Presentation, PresentationAdmin)
<commit_msg>schedule admin improvement<commit_after>from __future__ import unicode_literals
from django.contrib import admin

from symposion.schedule.models import Schedule, Day, Room, SlotKind, Slot, SlotRoom, Presentation


class DayInline(admin.StackedInline):
    model = Day
    extra = 2


class SlotKindInline(admin.StackedInline):
    model = SlotKind


class ScheduleAdmin(admin.ModelAdmin):
    model = Schedule
    inlines = [DayInline, SlotKindInline, ]


class SlotRoomInline(admin.TabularInline):
    model = SlotRoom
    extra = 1


class SlotAdmin(admin.ModelAdmin):
    list_filter = ("day", "kind")
    list_display = ("day", "start", "end", "kind", "content")
    inlines = [SlotRoomInline, ]


class RoomAdmin(admin.ModelAdmin):
    inlines = [SlotRoomInline, ]


class PresentationAdmin(admin.ModelAdmin):
    model = Presentation
    list_filter = ("section", "cancelled", "slot")
    readonly_fields = ("title", "speaker", "abstract", "description")
    fieldsets = (
        (None, {
          'fields': ("section", "slot", "proposal_base")
        }),
        ('Proposal Details', {
          'fields': ("title", "speaker", "abstract", "description")
        }),
    )


admin.site.register(Schedule, ScheduleAdmin)
admin.site.register(Room, RoomAdmin)
admin.site.register(Slot, SlotAdmin)
admin.site.register(Presentation, PresentationAdmin)

{'fraction_non_alphanumeric': 0.1246983105390185, 'fraction_numerical': 0.0016090104585679806, 'mean_word_length': 4.4183006535947715, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6409607', 'n_tokens_mistral': 773, 'n_tokens_neox': 770, 'n_words': 172}