new db init
This commit is contained in:
parent
293acd84d5
commit
5cdd35ea82
@ -1,4 +1,4 @@
|
||||
# Generated by Django 3.0.5 on 2020-04-15 08:38
|
||||
# Generated by Django 3.0.5 on 2020-04-16 09:27
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
@ -15,10 +15,11 @@ class Migration(migrations.Migration):
|
||||
name='GuiSettings',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('playerUrl', models.CharField(max_length=255)),
|
||||
('playoutConfig', models.CharField(max_length=255)),
|
||||
('netInterface', models.CharField(max_length=20)),
|
||||
('mediaDisk', models.CharField(max_length=255)),
|
||||
('player_url', models.CharField(max_length=255)),
|
||||
('playout_config', models.CharField(default='/etc/ffplayout/ffplayout.yml', max_length=255)),
|
||||
('net_interface', models.CharField(choices=[('lo', 'lo'), ('br0', 'br0'), ('virbr0', 'virbr0'), ('eno1', 'eno1'), ('virbr0-nic', 'virbr0-nic')], default=None, max_length=20)),
|
||||
('media_disk', models.CharField(default='/', help_text='should be a mount point, for statistics', max_length=255)),
|
||||
('extra_extensions', models.CharField(blank=True, default='', help_text='file extensions, that are only visible in GUI', max_length=255, null=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'guisettings',
|
||||
|
@ -1,33 +0,0 @@
|
||||
# Generated by Django 3.0.5 on 2020-04-15 12:32
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='guisettings',
|
||||
old_name='mediaDisk',
|
||||
new_name='media_disk',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='guisettings',
|
||||
old_name='netInterface',
|
||||
new_name='net_interface',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='guisettings',
|
||||
old_name='playerUrl',
|
||||
new_name='player_url',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='guisettings',
|
||||
old_name='playoutConfig',
|
||||
new_name='playout_config',
|
||||
),
|
||||
]
|
@ -14,16 +14,25 @@ class GuiSettings(models.Model):
|
||||
addrs = [(i, i) for i in addrs.keys()]
|
||||
|
||||
player_url = models.CharField(max_length=255)
|
||||
playout_config = models.CharField(max_length=255)
|
||||
playout_config = models.CharField(
|
||||
max_length=255,
|
||||
default='/etc/ffplayout/ffplayout.yml')
|
||||
net_interface = models.CharField(
|
||||
max_length=20,
|
||||
choices=addrs,
|
||||
default=None,
|
||||
)
|
||||
media_disk = models.CharField(max_length=255)
|
||||
media_disk = models.CharField(
|
||||
max_length=255,
|
||||
help_text="should be a mount point, for statistics",
|
||||
default='/')
|
||||
extra_extensions = models.CharField(
|
||||
max_length=255,
|
||||
help_text="file extensions, that are only visible in GUI",
|
||||
blank=True, null=True, default='')
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
if self.pk is not None:
|
||||
if self.pk is not None or GuiSettings.objects.count() == 0:
|
||||
super(GuiSettings, self).save(*args, **kwargs)
|
||||
|
||||
def delete(self, *args, **kwargs):
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user