from django.contrib import admin from guardian.admin import GuardedModelAdmin from config.models import TranscodingProfile, Stream, Restream, Pull, Recorder, LocalRecordingStorage, S3RecordingStorage, SRSNode, SRSStreamInstance @admin.register(LocalRecordingStorage) class LocalRecordingStorageAdmin(GuardedModelAdmin): pass @admin.register(S3RecordingStorage) class S3RecordingStorageAdmin(GuardedModelAdmin): pass @admin.register(Recorder) class RecorderAdmin(GuardedModelAdmin): pass @admin.register(TranscodingProfile) class TranscodingProfileAdmin(GuardedModelAdmin): pass @admin.register(Stream) class StreamAdmin(GuardedModelAdmin): pass @admin.register(Restream) class RestreamAdmin(GuardedModelAdmin): pass @admin.register(Pull) class PullAdmin(GuardedModelAdmin): pass @admin.register(SRSNode) class SRSNodeAdmin(GuardedModelAdmin): pass @admin.register(SRSStreamInstance) class SRSStreamInstanceAdmin(GuardedModelAdmin): fields = ['stream', 'node'] # Stream Instances are just representations of the streams on the SRS server, # and should not be addable/editable. Deleting them can be useful though. def has_change_permission(self, request, obj=None): return False def has_add_permission(self, request): return False