Skip to content

Commit

Permalink
refactor(models): verbose names, help text
Browse files Browse the repository at this point in the history
Update verbose_name attribute of both
Expression publication date fields; remove
redundant help_text for ISO-formatted
date field (field is set to uneditable).
  • Loading branch information
koeaw committed Apr 2, 2024
1 parent 400e893 commit 0931f18
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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)",
),
),
]
5 changes: 2 additions & 3 deletions apis_ontology/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,..."
),
Expand Down

0 comments on commit 0931f18

Please sign in to comment.