diff options
Diffstat (limited to 'archaeological_files/models.py')
| -rw-r--r-- | archaeological_files/models.py | 27 | 
1 files changed, 13 insertions, 14 deletions
| diff --git a/archaeological_files/models.py b/archaeological_files/models.py index 23aea5b39..ddee0f6cc 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -257,9 +257,9 @@ class File(ClosedItem, DocumentItem, BaseHistorizedItem, CompleteIdentifierItem,      external_id = models.CharField(_(u"External ID"), blank=True, null=True,                                     max_length=120)      auto_external_id = models.BooleanField( -        _(u"External ID is set automatically"), default=False) -    name = models.TextField(_(u"Name"), blank=True, null=True) -    file_type = models.ForeignKey(FileType, verbose_name=_(u"File type")) +        _("External ID is set automatically"), default=False) +    name = models.TextField(_("Name"), blank=True, default="") +    file_type = models.ForeignKey(FileType, verbose_name=_("File type"))      in_charge = models.ForeignKey(Person, related_name='file_responsability',                                    verbose_name=_(u"Person in charge"),                                    on_delete=models.SET_NULL, @@ -293,9 +293,9 @@ class File(ClosedItem, DocumentItem, BaseHistorizedItem, CompleteIdentifierItem,          PermitType, verbose_name=_(u"Permit type"), blank=True, null=True,          on_delete=models.SET_NULL      ) -    permit_reference = models.TextField(_(u"Permit reference"), blank=True, -                                        null=True) -    end_date = models.DateField(_(u"Closing date"), null=True, blank=True) +    permit_reference = models.TextField( +        _("Permit reference"), blank=True, default="") +    end_date = models.DateField(_("Closing date"), null=True, blank=True)      main_town = models.ForeignKey(          Town, verbose_name=_(u"Main town"), null=True, blank=True,          related_name='file_main', @@ -325,10 +325,10 @@ class File(ClosedItem, DocumentItem, BaseHistorizedItem, CompleteIdentifierItem,          _(u"Total developed surface (m2)"), blank=True, null=True)      locality = models.CharField(_(u"Locality"),                                  max_length=100, null=True, blank=True) -    address = models.TextField(_(u"Main address"), null=True, blank=True) -    postal_code = models.CharField(_(u"Main address - postal code"), +    address = models.TextField(_("Main address"), blank=True, default="") +    postal_code = models.CharField(_("Main address - postal code"),                                     max_length=10, null=True, blank=True) -    comment = models.TextField(_(u"Comment"), null=True, blank=True) +    comment = models.TextField(_("Comment"), blank=True, default="")      # research archaeology -->      departments = models.ManyToManyField(          Department, verbose_name=_(u"Departments"), blank=True) @@ -342,8 +342,8 @@ class File(ClosedItem, DocumentItem, BaseHistorizedItem, CompleteIdentifierItem,      scientist = models.ForeignKey(          Person, blank=True, null=True, related_name='scientist',          on_delete=models.SET_NULL, verbose_name=_(u"Scientist in charge")) -    research_comment = models.TextField(_(u"Research archaeology comment"), -                                        null=True, blank=True) +    research_comment = models.TextField( +        _("Research archaeology comment"), blank=True, default="")      classified_area = models.NullBooleanField(          _(u"Classified area"), blank=True, null=True)      protected_area = models.NullBooleanField( @@ -362,11 +362,10 @@ class File(ClosedItem, DocumentItem, BaseHistorizedItem, CompleteIdentifierItem,          blank=True)      cached_label = models.TextField( -        _("Cached name"), null=True, blank=True, db_index=True, +        _("Cached name"), blank=True, default="", db_index=True,          help_text=_("Generated automatically - do not edit"),      ) -    imported_line = models.TextField(_(u"Imported line"), null=True, -                                     blank=True) +    imported_line = models.TextField(_("Imported line"), blank=True, default="")      history = HistoricalRecords(bases=[HistoryModel])      GET_VALUES_EXTRA = [ | 
