from django.contrib import admin

from .models import Region, City, GatheringCenter, Resource


admin.site.register(Region)
admin.site.register(City)
admin.site.register(GatheringCenter)
admin.site.register(Resource)


@@ -88,17 +88,16 @@
 source%0A%0A
-%0A
 admin.si
@@ -146,44 +146,761 @@
 ty)%0A
-admin.site.register(GatheringCenter)
+%0A%0Aclass PublishMixin(object):%0A    actions = ('publish', 'unpublish')%0A%0A    def publish(self, request, queryset):%0A        queryset.update(published=True)%0A%0A    def unpublish(self, request, queryset):%0A        queryset.update(published=False)%0A%0A%0Aclass GatheringCenterAdmin(PublishMixin, admin.ModelAdmin):%0A    list_filter = ('published', 'city')%0A    list_editable = ('published', )%0A    list_display = ('location_name', 'published', 'author', 'city')%0A    raw_id_fields = ('author', )%0A%0Aadmin.site.register(GatheringCenter, GatheringCenterAdmin)%0A%0A%0Aclass ResourceAdmin(PublishMixin, admin.ModelAdmin):%0A    list_filter = ('published', )%0A    list_editable = ('published', )%0A    list_display = ('name', 'published', 'author', 'url')%0A    raw_id_fields = ('author', )%0A
 %0Aadm
@@ -924,11 +924,27 @@
 Resource
-)
+, ResourceAdmin)%0A
 %0A%0A

Add filters and actions for listing admin