Reinstated EventAdmin fieldsets and added some options. Filled out the page requireme...
[philo.git] / contrib / julian / admin.py
index a822e1d..f976e82 100644 (file)
@@ -1,6 +1,6 @@
 from django.contrib import admin
-from philo.admin import EntityAdmin
-from philo.contrib.julian.models import Location, Event, Calendar
+from philo.admin import EntityAdmin, COLLAPSE_CLASSES
+from philo.contrib.julian.models import Location, Event, Calendar, ICalendarFeedView
 
 
 class LocationAdmin(EntityAdmin):
@@ -10,24 +10,35 @@ class LocationAdmin(EntityAdmin):
 class EventAdmin(EntityAdmin):
        fieldsets = (
                (None, {
-                       'fields': ('title', 'description', 'tags', 'parent_event', 'owner')
+                       'fields': ('name', 'slug', 'description', 'tags', 'owner')
                }),
                ('Location', {
                        'fields': ('location_content_type', 'location_pk')
                }),
                ('Time', {
                        'fields': (('start_date', 'start_time'), ('end_date', 'end_time'),),
+               }),
+               ('Advanced', {
+                       'fields': ('parent_event', 'uuid',),
+                       'classes': COLLAPSE_CLASSES
                })
        )
        related_lookup_fields = {
                'generic': [["location_content_type", "location_pk"]]
        }
+       filter_horizontal = ['tags']
+       raw_id_fields = ['parent_event']
 
 
 class CalendarAdmin(EntityAdmin):
        pass
 
 
+class ICalendarFeedViewAdmin(EntityAdmin):
+       pass
+
+
 admin.site.register(Location, LocationAdmin)
 admin.site.register(Event, EventAdmin)
-admin.site.register(Calendar, CalendarAdmin)
\ No newline at end of file
+admin.site.register(Calendar, CalendarAdmin)
+admin.site.register(ICalendarFeedView, ICalendarFeedViewAdmin)
\ No newline at end of file