Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fixes #207] Task: when uploading metadata from ORD received an error that abstract field only allows 2000 chars #212

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions geonode/base/migrations/0102_alter_resourcebase_abstract_and_more.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Generated by Django 4.2.9 on 2024-11-28 08:58

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("base", "0101_merge_20240924_1415"),
]

operations = [
migrations.AlterField(
model_name="resourcebase",
name="abstract",
field=models.CharField(
help_text="brief narrative summary of the content of the resource(s)",
max_length=6000,
verbose_name="Abstract",
),
),
migrations.AlterField(
model_name="resourcebase",
name="conformity_explanation",
field=models.CharField(
blank=True,
help_text="Give an Explanation about the conformity check. (e.g. See the referenced specification.",
max_length=4000,
verbose_name="Conformity Explanation",
),
),
migrations.AlterField(
model_name="resourcebase",
name="method_description",
field=models.TextField(
blank=True,
help_text="The methodology employed for the study or research",
max_length=6000,
verbose_name="Method Description",
),
),
migrations.AlterField(
model_name="resourcebase",
name="other_description",
field=models.TextField(
blank=True,
help_text="Other description information that does not fit into an existing category",
max_length=6000,
verbose_name="Other Description",
),
),
migrations.AlterField(
model_name="resourcebase",
name="purpose",
field=models.TextField(
blank=True,
help_text="summary of the intentions with which the resource(s) was developed",
max_length=1024,
null=True,
verbose_name="Purpose",
),
),
migrations.AlterField(
model_name="resourcebase",
name="series_information",
field=models.TextField(
blank=True,
help_text="Information about a repeating series, such as volumne, issue, number",
max_length=6000,
verbose_name="Series Information",
),
),
migrations.AlterField(
model_name="resourcebase",
name="subtitle",
field=models.TextField(
blank=True, help_text="subtitle of the dataset", max_length=1024, verbose_name="Subtitle"
),
),
migrations.AlterField(
model_name="resourcebase",
name="table_of_content",
field=models.TextField(
blank=True,
help_text="A listing of the Table of Contents",
max_length=6000,
verbose_name="Table of Content",
),
),
migrations.AlterField(
model_name="resourcebase",
name="technical_info",
field=models.TextField(
blank=True,
help_text="Detailed information that may be associated with design, implementation, operation, use, and/or maintenance of a process or system",
max_length=6000,
verbose_name="Technical Info",
),
),
migrations.AlterField(
model_name="resourcebase",
name="title",
field=models.CharField(
help_text="name by which the cited resource is known", max_length=512, verbose_name="Title"
),
),
migrations.AlterField(
model_name="resourcebase",
name="title_translated",
field=models.CharField(
blank=True,
help_text="german name by which the cited resource is known",
max_length=512,
verbose_name="Title Translated",
),
),
]
22 changes: 11 additions & 11 deletions geonode/base/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,32 +921,32 @@ class ResourceBase(PolymorphicModel, PermissionLevelMixin, ItemBase):

# internal fields
uuid = models.CharField(max_length=36, unique=True, default=uuid.uuid4)
title = models.CharField(_("Title"), max_length=255, help_text=title_help_text)
title = models.CharField(_("Title"), max_length=512, help_text=title_help_text)
title_translated = models.CharField(
_("Title Translated"), max_length=255, blank=True, help_text=title_translated_help_text
_("Title Translated"), max_length=512, blank=True, help_text=title_translated_help_text
)

abstract = models.CharField(_("Abstract"), max_length=2000, help_text=abstract_help_text)
abstract = models.CharField(_("Abstract"), max_length=6000, help_text=abstract_help_text)
abstract_translated = models.TextField(
_("Abstract Translated"), max_length=2000, help_text=abstract_translated_help_text
)

# description type elements
subtitle = models.TextField(_("Subtitle"), max_length=400, blank=True, help_text=subtitle_help_text)
subtitle = models.TextField(_("Subtitle"), max_length=1024, blank=True, help_text=subtitle_help_text)
method_description = models.TextField(
_("Method Description"), max_length=2000, blank=True, help_text=method_description_help_text
_("Method Description"), max_length=6000, blank=True, help_text=method_description_help_text
)
series_information = models.TextField(
_("Series Information"), max_length=2000, blank=True, help_text=series_information_help_text
_("Series Information"), max_length=6000, blank=True, help_text=series_information_help_text
)
table_of_content = models.TextField(
_("Table of Content"), max_length=2000, blank=True, help_text=table_of_content_help_text
_("Table of Content"), max_length=6000, blank=True, help_text=table_of_content_help_text
)
technical_info = models.TextField(
_("Technical Info"), max_length=2000, blank=True, help_text=technical_info_help_text
_("Technical Info"), max_length=6000, blank=True, help_text=technical_info_help_text
)
other_description = models.TextField(
_("Other Description"), max_length=2000, blank=True, help_text=other_description_help_text
_("Other Description"), max_length=6000, blank=True, help_text=other_description_help_text
)

conformity_results = models.CharField(
Expand All @@ -957,7 +957,7 @@ class ResourceBase(PolymorphicModel, PermissionLevelMixin, ItemBase):
help_text=conformity_results_help_text,
)
conformity_explanation = models.CharField(
_("Conformity Explanation"), max_length=2000, blank=True, help_text=conformity_explanation_help_text
_("Conformity Explanation"), max_length=4000, blank=True, help_text=conformity_explanation_help_text
)
parent_identifier = models.ForeignKey(
"self",
Expand All @@ -983,7 +983,7 @@ class ResourceBase(PolymorphicModel, PermissionLevelMixin, ItemBase):
date_valid = models.DateField(_("Date Valid"), blank=True, null=True, help_text=date_valid_help_text)
date_issued = models.DateField(_("Date Issued"), blank=True, null=True, help_text=date_issued_help_text)

purpose = models.TextField(_("Purpose"), max_length=500, null=True, blank=True, help_text=purpose_help_text)
purpose = models.TextField(_("Purpose"), max_length=1024, null=True, blank=True, help_text=purpose_help_text)
owner = models.ForeignKey(
settings.AUTH_USER_MODEL, related_name="owned_resource", verbose_name=_("Owner"), on_delete=models.PROTECT
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Generated by Django 4.2.9 on 2024-11-28 08:58

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("documents", "0041_auto_20240909_1236"),
]

operations = [
migrations.AlterField(
model_name="document",
name="abstract_en",
field=models.CharField(
help_text="brief narrative summary of the content of the resource(s)",
max_length=6000,
null=True,
verbose_name="Abstract",
),
),
migrations.AlterField(
model_name="document",
name="purpose_en",
field=models.TextField(
blank=True,
help_text="summary of the intentions with which the resource(s) was developed",
max_length=1024,
null=True,
verbose_name="Purpose",
),
),
migrations.AlterField(
model_name="document",
name="title_en",
field=models.CharField(
help_text="name by which the cited resource is known", max_length=512, null=True, verbose_name="Title"
),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Generated by Django 4.2.9 on 2024-11-28 08:58

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("layers", "0050_alter_attribute_attribute_unit"),
]

operations = [
migrations.AlterField(
model_name="dataset",
name="abstract_en",
field=models.CharField(
help_text="brief narrative summary of the content of the resource(s)",
max_length=6000,
null=True,
verbose_name="Abstract",
),
),
migrations.AlterField(
model_name="dataset",
name="purpose_en",
field=models.TextField(
blank=True,
help_text="summary of the intentions with which the resource(s) was developed",
max_length=1024,
null=True,
verbose_name="Purpose",
),
),
migrations.AlterField(
model_name="dataset",
name="title_en",
field=models.CharField(
help_text="name by which the cited resource is known", max_length=512, null=True, verbose_name="Title"
),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Generated by Django 4.2.9 on 2024-11-28 08:58

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("maps", "0046_auto_20240909_1236"),
]

operations = [
migrations.AlterField(
model_name="map",
name="abstract_en",
field=models.CharField(
help_text="brief narrative summary of the content of the resource(s)",
max_length=6000,
null=True,
verbose_name="Abstract",
),
),
migrations.AlterField(
model_name="map",
name="purpose_en",
field=models.TextField(
blank=True,
help_text="summary of the intentions with which the resource(s) was developed",
max_length=1024,
null=True,
verbose_name="Purpose",
),
),
migrations.AlterField(
model_name="map",
name="title_en",
field=models.CharField(
help_text="name by which the cited resource is known", max_length=512, null=True, verbose_name="Title"
),
),
]