diff --git a/geonode/base/api/serializers.py b/geonode/base/api/serializers.py index dd0871597e1..2ea5dae4231 100644 --- a/geonode/base/api/serializers.py +++ b/geonode/base/api/serializers.py @@ -717,6 +717,7 @@ def __init__(self, *args, **kwargs): RestrictionCodeTypeSerializer, embed=True, many=True ) self.fields["license"] = ComplexDynamicRelationField(LicenseSerializer, embed=True, many=False) + self.fields["metadata_license"] = ComplexDynamicRelationField(LicenseSerializer, embed=True, many=False) self.fields["spatial_representation_type"] = ComplexDynamicRelationField( SpatialRepresentationTypeSerializer, embed=True, many=False ) diff --git a/geonode/base/migrations/0097_resourcebase_metadata_license.py b/geonode/base/migrations/0097_resourcebase_metadata_license.py new file mode 100644 index 00000000000..4fac38aacbc --- /dev/null +++ b/geonode/base/migrations/0097_resourcebase_metadata_license.py @@ -0,0 +1,19 @@ +# Generated by Django 3.2.23 on 2024-06-18 14:01 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('base', '0096_merge_0088_auto_20231019_1244_0095_auto_20230331_0923'), + ] + + operations = [ + migrations.AddField( + model_name='resourcebase', + name='metadata_license', + field=models.ForeignKey(blank=True, help_text='license of the metadata', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='metadata_license', to='base.license', verbose_name='Metadata License'), + ), + ] diff --git a/geonode/base/models.py b/geonode/base/models.py index eb2e635cb81..90d666e4251 100644 --- a/geonode/base/models.py +++ b/geonode/base/models.py @@ -781,6 +781,7 @@ class ResourceBase(PolymorphicModel, PermissionLevelMixin, ItemBase): "other restrictions and legal prerequisites for accessing and using the resource or" " metadata" ) license_help_text = _("license of the dataset") + metadata_license_help_text = _("license of the metadata") language_help_text = _("language used within the dataset") category_help_text = _( "high-level geographic data thematic classification to assist in the grouping and search of " @@ -964,6 +965,16 @@ class ResourceBase(PolymorphicModel, PermissionLevelMixin, ItemBase): help_text=license_help_text, on_delete=models.SET_NULL, ) + + metadata_license = models.ForeignKey( + License, + null=True, + blank=True, + related_name="metadata_license", + verbose_name=_("Metadata License"), + help_text=metadata_license_help_text, + on_delete=models.SET_NULL, + ) language = models.CharField( _("language"), max_length=3, choices=enumerations.ALL_LANGUAGES, default="eng", help_text=language_help_text ) diff --git a/geonode/documents/migrations/0039_alter_document_abstract_en.py b/geonode/documents/migrations/0039_alter_document_abstract_en.py new file mode 100644 index 00000000000..18ecd5811d4 --- /dev/null +++ b/geonode/documents/migrations/0039_alter_document_abstract_en.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.23 on 2024-06-18 14:01 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('documents', '0038_alter_document_doc_url'), + ] + + operations = [ + migrations.AlterField( + model_name='document', + name='abstract_en', + field=models.TextField(help_text='brief narrative summary of the content of the resource(s)', max_length=2000, null=True, verbose_name='abstract'), + ), + ] diff --git a/geonode/layers/migrations/0045_alter_dataset_abstract_en.py b/geonode/layers/migrations/0045_alter_dataset_abstract_en.py new file mode 100644 index 00000000000..fbc58ccf624 --- /dev/null +++ b/geonode/layers/migrations/0045_alter_dataset_abstract_en.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.23 on 2024-06-18 14:01 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('layers', '0044_alter_dataset_unique_together'), + ] + + operations = [ + migrations.AlterField( + model_name='dataset', + name='abstract_en', + field=models.TextField(help_text='brief narrative summary of the content of the resource(s)', max_length=2000, null=True, verbose_name='abstract'), + ), + ] diff --git a/geonode/maps/migrations/0044_alter_map_abstract_en.py b/geonode/maps/migrations/0044_alter_map_abstract_en.py new file mode 100644 index 00000000000..55a2dfea478 --- /dev/null +++ b/geonode/maps/migrations/0044_alter_map_abstract_en.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.23 on 2024-06-18 14:01 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('maps', '0043_auto_20230807_1234'), + ] + + operations = [ + migrations.AlterField( + model_name='map', + name='abstract_en', + field=models.TextField(help_text='brief narrative summary of the content of the resource(s)', max_length=2000, null=True, verbose_name='abstract'), + ), + ]