<s> from django . contrib import admin <EOL> from cms . admin import ContentManageableModelAdmin , NameSlugAdmin <EOL> from . models import Calendar , EventCategory , Event , OccurringRule , RecurringRule , Alarm , EventLocation <EOL> class EventInline ( admin . StackedInline ) : <EOL> model = Event <EOL> extra = <NUM_LIT:0> <EOL> class CalendarAdmin ( ContentManageableModelAdmin ) : <EOL> pass <EOL> class OccurringRuleInline ( admin . StackedInline ) : <EOL> model = OccurringRule <EOL> extra = <NUM_LIT:0> <EOL> max_num = <NUM_LIT:1> <EOL> class RecurringRuleInline ( admin . StackedInline ) : <EOL> model = RecurringRule <EOL> extra = <NUM_LIT:0> <EOL> class AlarmInline ( admin . StackedInline ) : <EOL> model = Alarm <EOL> extra = <NUM_LIT:0> <EOL> class EventAdmin ( ContentManageableModelAdmin ) : <EOL> inlines = [ OccurringRuleInline , RecurringRuleInline , AlarmInline ] <EOL> list_display = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> list_filter = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> search_fields = [ '<STR_LIT:title>' ] <EOL> class EventLocationAdmin ( admin . ModelAdmin ) : <EOL> list_filter = [ '<STR_LIT>' ] <EOL> admin . site . register ( Calendar , CalendarAdmin ) <EOL> admin . site . register ( EventCategory , NameSlugAdmin ) <EOL> admin . site . register ( Event , EventAdmin ) <EOL> admin . site . register ( OccurringRule ) <EOL> admin . site . register ( RecurringRule ) <EOL> admin . site . register ( Alarm , ContentManageableModelAdmin ) <EOL> admin . site . register ( EventLocation , EventLocationAdmin ) </s>
