old_contents: from django.contrib import admin
  from metaci.plan.models import Plan, PlanRepository, PlanRepositoryTrigger
  from guardian.admin import GuardedModelAdmin
  
  
  class PlanRepositoryInline(admin.TabularInline):
      model = PlanRepository
      extra = 1
  
  
  class PlanAdmin(admin.ModelAdmin):
      list_display = ("name", "trigger", "role", "flows", "org", "regex", "active")
      list_filter = ("active", "trigger", "role", "org", "repos")
      inlines = [PlanRepositoryInline]
  
  
  admin.site.register(Plan, PlanAdmin)
  
  
  class PlanRepositoryAdmin(GuardedModelAdmin):
      list_display = ("repo", "plan", "active")
      list_filter = ("repo", "plan", "active")
  
  
  admin.site.register(PlanRepository, PlanRepositoryAdmin)
  
  
  class PlanRepositoryTriggerAdmin(GuardedModelAdmin):
      list_display = ("target_plan_repo", "source_plan_repo")
      list_filter = ("target_plan_repo", "source_plan_repo")
  
  
  admin.site.register(PlanRepositoryTrigger, PlanRepositoryTriggerAdmin)
  
new_contents: from django.contrib import admin
  from metaci.plan.models import Plan, PlanRepository, PlanRepositoryTrigger, PlanSchedule
  from guardian.admin import GuardedModelAdmin
  
  
  class PlanRepositoryInline(admin.TabularInline):
      model = PlanRepository
      extra = 1
  
  
  class PlanAdmin(admin.ModelAdmin):
      list_display = ("name", "trigger", "role", "flows", "org", "regex", "active")
      list_filter = ("active", "trigger", "role", "org", "repos")
      inlines = [PlanRepositoryInline]
  
  
  admin.site.register(Plan, PlanAdmin)
  
  
  class PlanRepositoryAdmin(GuardedModelAdmin):
      list_display = ("repo", "plan", "active")
      list_filter = ("repo", "plan", "active")
  
  
  admin.site.register(PlanRepository, PlanRepositoryAdmin)
  
  
  class PlanRepositoryTriggerAdmin(GuardedModelAdmin):
      list_display = ("target_plan_repo", "source_plan_repo")
      list_filter = ("target_plan_repo", "source_plan_repo")
  
  
  admin.site.register(PlanRepositoryTrigger, PlanRepositoryTriggerAdmin)
  
  
  class PlanScheduleAdmin(GuardedModelAdmin):
      list_display = ("plan", "branch", "schedule")
      list_filter = ("plan", "branch", "schedule")
  
  
  admin.site.register(PlanSchedule, PlanScheduleAdmin)
  
subject: Add admin interface for plan schedules.