summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2016-05-27 18:57:13 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-05-27 19:44:36 (GMT)
commitfd2b1751a5b0b334fd5f280ba54e30ed81c96c08 (patch)
treefa3106b412513980972afd5b55a98d7638716ee3 /program
parent1ac4db5369b990d020d2ec59209952a641dedaf5 (diff)
exclude id
Diffstat (limited to 'program')
-rw-r--r--program/admin.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/program/admin.py b/program/admin.py
index 1323697..fee5d4e 100644
--- a/program/admin.py
+++ b/program/admin.py
@@ -102,6 +102,12 @@ class ShowAdmin(admin.ModelAdmin):
'musicfocus',
)
+ def formfield_for_foreignkey(self, db_field, request=None, **kwargs):
+ if db_field.name == 'predecessor':
+ kwargs['queryset'] = Show.objects.exclude(pk=352) # FIXME!
+
+ return super(ShowAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs)
+
admin.site.register(BroadcastFormat, BroadcastFormatAdmin)
admin.site.register(MusicFocus, MusicFocusAdmin)
admin.site.register(ShowInformation, ShowInformationAdmin)