diff options
| -rw-r--r-- | ishtar_common/migrations/0023_excludedfield.py | 28 | ||||
| -rw-r--r-- | ishtar_common/models.py | 9 | 
2 files changed, 37 insertions, 0 deletions
| diff --git a/ishtar_common/migrations/0023_excludedfield.py b/ishtar_common/migrations/0023_excludedfield.py new file mode 100644 index 000000000..2573219ae --- /dev/null +++ b/ishtar_common/migrations/0023_excludedfield.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-11-17 17:37 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + +    dependencies = [ +        ('ishtar_common', '0022_customform'), +    ] + +    operations = [ +        migrations.CreateModel( +            name='ExcludedField', +            fields=[ +                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), +                ('field', models.CharField(max_length=250, verbose_name='Field')), +                ('custom_form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='excluded_fields', to='ishtar_common.CustomForm')), +            ], +            options={ +                'verbose_name': 'Custom form - excluded field', +                'verbose_name_plural': 'Custom form - excluded fields', +            }, +        ), +    ] diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 1562280ef..a5a3d96c1 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1648,6 +1648,15 @@ class CustomForm(models.Model):          ordering = ['name', 'form'] +class ExcludedField(models.Model): +    custom_form = models.ForeignKey(CustomForm, related_name='excluded_fields') +    field = models.CharField(_(u"Field"), max_length=250) + +    class Meta: +        verbose_name = _(u"Custom form - excluded field") +        verbose_name_plural = _(u"Custom form - excluded fields") + +  class GlobalVar(models.Model, Cached):      slug = models.SlugField(_(u"Variable name"), unique=True)      description = models.TextField(_(u"Description of the variable"), | 
