from django.contrib import admin

from .models import Event

admin.site.site_header = 'Business Calendar Admin'
admin.site.site_title = 'Business Calendar'
admin.site.index_title = 'Manage your event schedule'


@admin.register(Event)
class EventAdmin(admin.ModelAdmin):
    list_display = ('name', 'location', 'start', 'end', 'is_published')
    list_filter = ('is_published', 'start')
    search_fields = ('name', 'location', 'summary')
    readonly_fields = ('created_at', 'updated_at')
    ordering = ('start',)
