Commit da1b81db authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Added the browsable attirbute and made the bind optional in the Storage model.

parent 8825ed9e
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
# Generated by Django 2.2.1 on 2022-04-09 18:13

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('core_app', '0031_container_env_vars'),
    ]

    operations = [
        migrations.AddField(
            model_name='storage',
            name='browsable',
            field=models.BooleanField(default=False, verbose_name='Browsable in the file manager?'),
        ),
        migrations.AlterField(
            model_name='storage',
            name='bind_path',
            field=models.CharField(blank=True, max_length=4096, null=True, verbose_name='Bind path'),
        ),
    ]
+4 −1
Original line number Diff line number Diff line
@@ -383,7 +383,7 @@ class Storage(models.Model):
     
    # Paths
    base_path = models.CharField('Base path', max_length=4096, blank=False, null=False) 
    bind_path = models.CharField('Bind path', max_length=4096, blank=False, null=False) 
    bind_path = models.CharField('Bind path', max_length=4096, blank=True, null=True) 
 
    # Link with a computing resource
    computing = models.ForeignKey(Computing, related_name='storages', on_delete=models.CASCADE, blank=True, null=True) # Make optional?
@@ -393,6 +393,9 @@ class Storage(models.Model):
    # Configuration
    conf = JSONField(blank=True, null=True)
 
    # Include as browsable in the file manager?
    browsable = models.BooleanField('Browsable in the file manager?', default=False)

 
    class Meta:
        ordering = ['name']