diff --git a/app/migrations/0028_alter_organization_category.py b/app/migrations/0028_alter_organization_category.py new file mode 100644 index 0000000..757a32a --- /dev/null +++ b/app/migrations/0028_alter_organization_category.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.5 on 2021-11-26 14:05 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('app', '0027_auto_20211126_1252'), + ] + + operations = [ + migrations.AlterField( + model_name='organization', + name='category', + field=models.TextField(blank=True, choices=[('Independent', 'Independent'), ('Public administration > Research Institution', 'Public administration > Research Institution'), ('Academia > University > Institute', 'Academia > University > Institute'), ('Academia > University', 'Academia > University'), ('Public administration > Other Agency', 'Public administration > Other Agency'), ('Private > NGO (not for profit)', 'Private > NGO (not for profit)'), ('Academia > Academy of Sciences', 'Academia > Academy of Sciences'), ('Academia > Academy of Sciences > Institute', 'Academia > Academy of Sciences > Institute'), ('Public administration > Government', 'Public administration > Government'), ('Intergovernmental Agency > Research Institution', 'Intergovernmental Agency > Research Institution'), ('Intergovernmental Agency', 'Intergovernmental Agency '), ('Private > Research Institution', 'Private > Research Institution'), ('Collection > Museum', 'Collection > Museum'), ('Private > Business', 'Private > Business'), ('Education > Graduate', 'Education > Graduate'), ('Collection > Botanical Garden', 'Collection > Botanical Garden'), ('Other', 'Other')], null=True), + ), + ] diff --git a/app/models.py b/app/models.py index 8178d39..95f0084 100644 --- a/app/models.py +++ b/app/models.py @@ -344,6 +344,24 @@ class GMBA_function(models.Model): class Organization(models.Model): + CATEGORY_CHOICES = ( + ('Independent', 'Independent'), + ('Public administration > Research Institution', 'Public administration > Research Institution'), + ('Academia > University > Institute', 'Academia > University > Institute'), + ('Academia > University', 'Academia > University'), + ('Public administration > Other Agency', 'Public administration > Other Agency'), + ('Private > NGO (not for profit)', 'Private > NGO (not for profit)'), + ('Academia > Academy of Sciences', 'Academia > Academy of Sciences'), + ('Academia > Academy of Sciences > Institute', 'Academia > Academy of Sciences > Institute'), + ('Public administration > Government', 'Public administration > Government'), + ('Intergovernmental Agency > Research Institution', 'Intergovernmental Agency > Research Institution'), + ('Intergovernmental Agency', 'Intergovernmental Agency '), + ('Private > Research Institution', 'Private > Research Institution'), + ('Collection > Museum', 'Collection > Museum'), + ('Private > Business', 'Private > Business'), + ('Education > Graduate', 'Education > Graduate'), + ('Collection > Botanical Garden', 'Collection > Botanical Garden'), + ('Other', 'Other'),) org_num1 = models.AutoField(primary_key=True) organisation_search = models.TextField(blank=True, null=True) org_alpha_search = models.TextField(blank=True, null=True) @@ -367,7 +385,7 @@ class Organization(models.Model): description = models.TextField(blank=True, null=True) northing = models.TextField(blank=True, null=True) easting = models.TextField(blank=True, null=True) - category = models.TextField(blank=True, null=True) + category = models.TextField(blank=True, null=True, choices=CATEGORY_CHOICES) subject = models.TextField(blank=True, null=True) def __str__(self):