From 0931f18b61e9ddec01a811af2bbed6205d34a6de Mon Sep 17 00:00:00 2001 From: KK Date: Tue, 2 Apr 2024 12:30:59 +0200 Subject: [PATCH] refactor(models): verbose names, help text Update verbose_name attribute of both Expression publication date fields; remove redundant help_text for ISO-formatted date field (field is set to uneditable). --- ...publication_date_iso_formatted_and_more.py | 35 +++++++++++++++++++ apis_ontology/models.py | 5 ++- 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 apis_ontology/migrations/0055_alter_expression_publication_date_iso_formatted_and_more.py diff --git a/apis_ontology/migrations/0055_alter_expression_publication_date_iso_formatted_and_more.py b/apis_ontology/migrations/0055_alter_expression_publication_date_iso_formatted_and_more.py new file mode 100644 index 0000000..8553f16 --- /dev/null +++ b/apis_ontology/migrations/0055_alter_expression_publication_date_iso_formatted_and_more.py @@ -0,0 +1,35 @@ +# Generated by Django 4.2.11 on 2024-04-02 10:29 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ( + "apis_ontology", + "0054_rename_publication_date_iso_expression_publication_date_iso_formatted", + ), + ] + + operations = [ + migrations.AlterField( + model_name="expression", + name="publication_date_iso_formatted", + field=models.DateField( + blank=True, + editable=False, + null=True, + verbose_name="Erscheinungsdatum (ISO-Format)", + ), + ), + migrations.AlterField( + model_name="expression", + name="publication_date_manual_input", + field=models.CharField( + blank=True, + default="", + help_text="Erlaubte Formatvariationen u.a. 1.1.1920, 12/2010, 1999-12-23,...", + verbose_name="Erscheinungsdatum (manuelle Eingabe)", + ), + ), + ] diff --git a/apis_ontology/models.py b/apis_ontology/models.py index ab5dcea..e3c3ffa 100644 --- a/apis_ontology/models.py +++ b/apis_ontology/models.py @@ -554,15 +554,14 @@ class EditionTypes(models.TextChoices): publication_date_iso_formatted = models.DateField( blank=True, null=True, - verbose_name=_("Erscheinungsdatum (ISO)"), - help_text=_("Format YYYY-MM-DD"), + verbose_name=_("Erscheinungsdatum (ISO-Format)"), editable=False, ) publication_date_manual_input = models.CharField( blank=True, default="", - verbose_name=_("Erscheinungsdatum"), + verbose_name=_("Erscheinungsdatum (manuelle Eingabe)"), help_text=_( "Erlaubte Formatvariationen u.a. 1.1.1920, 12/2010, 1999-12-23,..." ),