Commit b92a4d5a authored by Daniel W Bond's avatar Daniel W Bond

added initial action as a demonstration of sorts-- removes all special...

added initial action as a demonstration of sorts-- removes all special schedules for selected facilities
parent ec5b0b71
Pipeline #2141 passed with stage
in 1 minute and 31 seconds
......@@ -20,6 +20,12 @@ class FacilityAdmin(admin.ModelAdmin):
Allows admins to create new facilities through the admin interface.
"""
def drop_special_schedules(modeladmin, request, queryset):
for facility in queryset:
facility.special_schedules.clear()
actions = [drop_special_schedules, ]
# Allow filtering by the following fields
list_filter = ['facility_category', 'facility_location']
# Modify the rendered layout of the "create a new facility" page
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment