2020-04-23 21:08:39 +02:00
|
|
|
from django.contrib import admin
|
2020-05-01 12:38:57 +02:00
|
|
|
from guardian.admin import GuardedModelAdmin
|
2020-04-23 21:08:39 +02:00
|
|
|
from .models import Application, Stream
|
|
|
|
|
|
|
|
|
2020-05-01 12:38:57 +02:00
|
|
|
class ApplicationAdmin(GuardedModelAdmin):
|
2020-04-23 21:08:39 +02:00
|
|
|
fields = ['name']
|
|
|
|
|
|
|
|
|
2020-05-01 12:38:57 +02:00
|
|
|
class StreamAdmin(GuardedModelAdmin):
|
2020-04-26 19:46:58 +02:00
|
|
|
fields = ['application', 'stream', 'name', 'publish_counter']
|
2020-04-23 21:08:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
admin.site.register(Application, ApplicationAdmin)
|
|
|
|
admin.site.register(Stream, StreamAdmin)
|