diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-12-03 14:54:20 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-02-28 12:15:22 +0100 |
commit | d9844aa5f16efbdf82516bc00d473410bfe729f5 (patch) | |
tree | cd95c65028eeac282b12d435e4a5c44045123575 /archaeological_context_records | |
parent | 1a86dfe4ab25013f64f6028d8e09cc0ce0a1fcd8 (diff) | |
download | Ishtar-d9844aa5f16efbdf82516bc00d473410bfe729f5.tar.bz2 Ishtar-d9844aa5f16efbdf82516bc00d473410bfe729f5.zip |
TextField: blank=True, null=True -> blank=True, default=""
Diffstat (limited to 'archaeological_context_records')
-rw-r--r-- | archaeological_context_records/migrations/0105_auto_20201203_1453.py | 171 | ||||
-rw-r--r-- | archaeological_context_records/models.py | 28 |
2 files changed, 185 insertions, 14 deletions
diff --git a/archaeological_context_records/migrations/0105_auto_20201203_1453.py b/archaeological_context_records/migrations/0105_auto_20201203_1453.py new file mode 100644 index 000000000..89e66f38d --- /dev/null +++ b/archaeological_context_records/migrations/0105_auto_20201203_1453.py @@ -0,0 +1,171 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.27 on 2020-12-03 14:53 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + atomic = False + + dependencies = [ + ('archaeological_context_records', '0104_auto_20201201_1533'), + ] + + operations = [ + migrations.AlterField( + model_name='activitytype', + name='comment', + field=models.TextField(blank=True, default='', verbose_name='Comment'), + ), + migrations.AlterField( + model_name='contextrecord', + name='cached_label', + field=models.TextField(blank=True, db_index=True, default='', verbose_name='Cached name'), + ), + migrations.AlterField( + model_name='contextrecord', + name='cached_periods', + field=models.TextField(blank=True, default='', help_text='Generated automatically - do not edit', verbose_name='Cached periods label'), + ), + migrations.AlterField( + model_name='contextrecord', + name='cached_related_context_records', + field=models.TextField(blank=True, default='', help_text='Generated automatically - do not edit', verbose_name='Cached related context records'), + ), + migrations.AlterField( + model_name='contextrecord', + name='comment', + field=models.TextField(blank=True, default='', verbose_name='General comment'), + ), + migrations.AlterField( + model_name='contextrecord', + name='complete_identifier', + field=models.TextField(blank=True, default='', verbose_name='Complete identifier'), + ), + migrations.AlterField( + model_name='contextrecord', + name='datings_comment', + field=models.TextField(blank=True, default='', verbose_name='Comment on datings'), + ), + migrations.AlterField( + model_name='contextrecord', + name='description', + field=models.TextField(blank=True, default='', verbose_name='Description'), + ), + migrations.AlterField( + model_name='contextrecord', + name='external_id', + field=models.TextField(blank=True, default='', verbose_name='External ID'), + ), + migrations.AlterField( + model_name='contextrecord', + name='filling', + field=models.TextField(blank=True, default='', verbose_name='Filling'), + ), + migrations.AlterField( + model_name='contextrecord', + name='interpretation', + field=models.TextField(blank=True, default='', verbose_name='Interpretation'), + ), + migrations.AlterField( + model_name='contextrecord', + name='location', + field=models.TextField(blank=True, default='', help_text='A short description of the location of the context record', verbose_name='Location'), + ), + migrations.AlterField( + model_name='dating', + name='precise_dating', + field=models.TextField(blank=True, default='', verbose_name='Precise dating'), + ), + migrations.AlterField( + model_name='datingquality', + name='comment', + field=models.TextField(blank=True, default='', verbose_name='Comment'), + ), + migrations.AlterField( + model_name='datingtype', + name='comment', + field=models.TextField(blank=True, default='', verbose_name='Comment'), + ), + migrations.AlterField( + model_name='documentationtype', + name='comment', + field=models.TextField(blank=True, default='', verbose_name='Comment'), + ), + migrations.AlterField( + model_name='excavationtechnictype', + name='comment', + field=models.TextField(blank=True, default='', verbose_name='Comment'), + ), + migrations.AlterField( + model_name='historicalcontextrecord', + name='cached_label', + field=models.TextField(blank=True, db_index=True, default='', verbose_name='Cached name'), + ), + migrations.AlterField( + model_name='historicalcontextrecord', + name='cached_periods', + field=models.TextField(blank=True, default='', help_text='Generated automatically - do not edit', verbose_name='Cached periods label'), + ), + migrations.AlterField( + model_name='historicalcontextrecord', + name='cached_related_context_records', + field=models.TextField(blank=True, default='', help_text='Generated automatically - do not edit', verbose_name='Cached related context records'), + ), + migrations.AlterField( + model_name='historicalcontextrecord', + name='comment', + field=models.TextField(blank=True, default='', verbose_name='General comment'), + ), + migrations.AlterField( + model_name='historicalcontextrecord', + name='complete_identifier', + field=models.TextField(blank=True, default='', verbose_name='Complete identifier'), + ), + migrations.AlterField( + model_name='historicalcontextrecord', + name='datings_comment', + field=models.TextField(blank=True, default='', verbose_name='Comment on datings'), + ), + migrations.AlterField( + model_name='historicalcontextrecord', + name='description', + field=models.TextField(blank=True, default='', verbose_name='Description'), + ), + migrations.AlterField( + model_name='historicalcontextrecord', + name='external_id', + field=models.TextField(blank=True, default='', verbose_name='External ID'), + ), + migrations.AlterField( + model_name='historicalcontextrecord', + name='filling', + field=models.TextField(blank=True, default='', verbose_name='Filling'), + ), + migrations.AlterField( + model_name='historicalcontextrecord', + name='interpretation', + field=models.TextField(blank=True, default='', verbose_name='Interpretation'), + ), + migrations.AlterField( + model_name='historicalcontextrecord', + name='location', + field=models.TextField(blank=True, default='', help_text='A short description of the location of the context record', verbose_name='Location'), + ), + migrations.AlterField( + model_name='identificationtype', + name='comment', + field=models.TextField(blank=True, default='', verbose_name='Comment'), + ), + migrations.AlterField( + model_name='relationtype', + name='comment', + field=models.TextField(blank=True, default='', verbose_name='Comment'), + ), + migrations.AlterField( + model_name='unit', + name='comment', + field=models.TextField(blank=True, default='', verbose_name='Comment'), + ), + ] diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 715e6286c..56dc66340 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -81,8 +81,8 @@ class Dating(models.Model): quality = models.ForeignKey(DatingQuality, verbose_name=_("Quality"), on_delete=models.SET_NULL, blank=True, null=True) - precise_dating = models.TextField(_("Precise dating"), blank=True, - null=True) + precise_dating = models.TextField( + _("Precise dating"), blank=True, default="") objects = UUIDModelManager() ASSOCIATED_ALT_NAMES = { 'datings__period': SearchAltName( @@ -530,7 +530,7 @@ class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem, # fields uuid = models.UUIDField(default=uuid.uuid4) - external_id = models.TextField(_("External ID"), blank=True, null=True) + external_id = models.TextField(_("External ID"), blank=True, default="") auto_external_id = models.BooleanField( _("External ID is set automatically"), default=False) parcel = models.ForeignKey( @@ -546,8 +546,8 @@ class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem, on_delete=models.SET_NULL, blank=True, null=True, related_name='context_records') label = models.CharField(_("ID"), max_length=200) - description = models.TextField(_("Description"), blank=True, null=True) - comment = models.TextField(_("General comment"), blank=True, null=True) + description = models.TextField(_("Description"), blank=True, default="") + comment = models.TextField(_("General comment"), blank=True, default="") opening_date = models.DateField(_("Opening date"), blank=True, null=True) closing_date = models.DateField(_("Closing date"), blank=True, null=True) @@ -561,19 +561,19 @@ class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem, _("Depth of appearance (m)"), blank=True, null=True) surface = models.IntegerField(_("Surface (m2)"), blank=True, null=True) location = models.TextField( - _("Location"), blank=True, null=True, + _("Location"), blank=True, default="", help_text=_("A short description of the location of the context " "record")) datings = models.ManyToManyField(Dating, related_name='context_records') documentations = models.ManyToManyField(DocumentationType, blank=True) - datings_comment = models.TextField(_("Comment on datings"), blank=True, - null=True) + datings_comment = models.TextField( + _("Comment on datings"), blank=True, default="") unit = models.ForeignKey(Unit, verbose_name=_("Context record type"), on_delete=models.SET_NULL, related_name='+', blank=True, null=True) - filling = models.TextField(_("Filling"), blank=True, null=True) - interpretation = models.TextField(_("Interpretation"), blank=True, - null=True) + filling = models.TextField(_("Filling"), blank=True, default="") + interpretation = models.TextField( + _("Interpretation"), blank=True, default="") taq = models.IntegerField( _("TAQ"), blank=True, null=True, help_text=_("\"Terminus Ante Quem\" the context record can't have " @@ -608,14 +608,14 @@ class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem, Document, related_name='main_image_context_records', on_delete=models.SET_NULL, verbose_name=_("Main image"), blank=True, null=True) - cached_label = models.TextField(_("Cached name"), null=True, blank=True, + cached_label = models.TextField(_("Cached name"), blank=True, default="", db_index=True) cached_periods = models.TextField( - _("Cached periods label"), blank=True, null=True, + _("Cached periods label"), blank=True, default="", help_text=_("Generated automatically - do not edit") ) cached_related_context_records = models.TextField( - _("Cached related context records"), blank=True, null=True, + _("Cached related context records"), blank=True, default="", help_text=_("Generated automatically - do not edit") ) |