From 981a8636bb9b87d341254ef36da19e2ce7b799ac Mon Sep 17 00:00:00 2001 From: Jonathan Baecker Date: Mon, 4 May 2020 14:40:10 +0200 Subject: [PATCH] add messenger db to admin --- ffplayout/api_player/admin.py | 10 +++++++++- ffplayout/api_player/models.py | 10 +++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ffplayout/api_player/admin.py b/ffplayout/api_player/admin.py index 02e3c895..66d91ff0 100644 --- a/ffplayout/api_player/admin.py +++ b/ffplayout/api_player/admin.py @@ -1,4 +1,4 @@ -from api_player.models import GuiSettings +from api_player.models import GuiSettings, MessengePresets from django.contrib import admin @@ -9,4 +9,12 @@ class GuiSettingsAdmin(admin.ModelAdmin): fields = '__all__' +class MessengePresetsAdmin(admin.ModelAdmin): + + class Meta: + model = MessengePresets + fields = '__all__' + + admin.site.register(GuiSettings, GuiSettingsAdmin) +admin.site.register(MessengePresets, MessengePresetsAdmin) diff --git a/ffplayout/api_player/models.py b/ffplayout/api_player/models.py index 8c8abc05..03455ae2 100644 --- a/ffplayout/api_player/models.py +++ b/ffplayout/api_player/models.py @@ -26,7 +26,7 @@ class GuiSettings(models.Model): max_length=255, help_text="should be a mount point, for statistics", default='/') - extra_extensions = models.CharField( + extra_extensions = models.CharField( max_length=255, help_text="file extensions, that are only visible in GUI", blank=True, null=True, default='') @@ -44,15 +44,15 @@ class GuiSettings(models.Model): class MessengePresets(models.Model): - name = models.CharField(max_length=255, help_text="the preset name") + name = models.CharField(max_length=255, help_text="the preset name") - message = models.CharField( + message = models.CharField( max_length=1024, blank=True, null=True, default='') - x = models.CharField( + x = models.CharField( max_length=512, blank=True, null=True, default='') - y = models.CharField( + y = models.CharField( max_length=512, blank=True, null=True, default='') font_size = models.IntegerField(default=24)