diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-04-20 10:49:34 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-04-20 10:49:34 +0200 |
commit | 2933ed398c26c883645aabdf14aa99535828819f (patch) | |
tree | 355e349375460a11d40212969b12873d20e32f03 | |
parent | 80636d8cd2079d43bc69ff041409196798a0cf9b (diff) | |
download | Ishtar-2933ed398c26c883645aabdf14aa99535828819f.tar.bz2 Ishtar-2933ed398c26c883645aabdf14aa99535828819f.zip |
models: default str -> unicode
-rw-r--r-- | archaeological_finds/models_finds.py | 2 | ||||
-rw-r--r-- | ishtar_common/models.py | 36 |
2 files changed, 19 insertions, 19 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index b4579d4df..3248e2214 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -662,7 +662,7 @@ class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, null=True) previous_id = models.TextField(_(u"Previous ID"), blank=True, null=True) index = models.IntegerField(u"Index", default=0) - checked = models.CharField(_(u"Check"), max_length=2, default='NC', + checked = models.CharField(_(u"Check"), max_length=2, default=u'NC', choices=CHECK_CHOICES) check_date = models.DateField(_(u"Check date"), default=datetime.date.today) diff --git a/ishtar_common/models.py b/ishtar_common/models.py index a0ae1ce44..6c83c8bfb 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1153,30 +1153,30 @@ class IshtarSiteProfile(models.Model, Cached): description = models.TextField(_(u"Description"), null=True, blank=True) base_color = models.CharField( _(u"CSS color code for base module"), - default='rgba(0, 0, 0, 0)', max_length=200) + default=u'rgba(0, 0, 0, 0)', max_length=200) files = models.BooleanField(_(u"Files module"), default=False) files_color = models.CharField( _(u"CSS color code for files module"), - default='rgba(0, 32, 210, 0.1)', max_length=200) + default=u'rgba(0, 32, 210, 0.1)', max_length=200) context_record = models.BooleanField(_(u"Context records module"), default=False) context_record_color = models.CharField( _(u"CSS color code for context record module"), - default='rgba(210,200,0,0.2)', max_length=200) + default=u'rgba(210,200,0,0.2)', max_length=200) find = models.BooleanField(_(u"Finds module"), default=False, help_text=_(u"Need context records module")) find_color = models.CharField( _(u"CSS color code for find module"), - default='rgba(210,0,0,0.15)', max_length=200) + default=u'rgba(210,0,0,0.15)', max_length=200) warehouse = models.BooleanField( _(u"Warehouses module"), default=False, help_text=_(u"Need finds module")) warehouse_color = models.CharField( - _(u"CSS code for warehouse module"), default='rgba(10,20,200,0.15)', + _(u"CSS code for warehouse module"), default=u'rgba(10,20,200,0.15)', max_length=200) mapping = models.BooleanField(_(u"Mapping module"), default=False) mapping_color = models.CharField( - _(u"CSS code for mapping module"), default='rgba(72, 236, 0, 0.15)', + _(u"CSS code for mapping module"), default=u'rgba(72, 236, 0, 0.15)', max_length=200) homepage = models.TextField( _(u"Home page"), null=True, blank=True, @@ -1185,57 +1185,57 @@ class IshtarSiteProfile(models.Model, Cached): u"can be used to display a random image.")) file_external_id = models.TextField( _(u"File external id"), - default="{year}-{numeric_reference}", + default=u"{year}-{numeric_reference}", help_text=_(u"Formula to manage file external ID. " u"Change this with care. With incorrect formula, the " u"application might be unusable and import of external " u"data can be destructive.")) parcel_external_id = models.TextField( _(u"Parcel external id"), - default="{associated_file__external_id}{operation__code_patriarche}-" - "{town__numero_insee}-{section}{parcel_number}", + default=u"{associated_file__external_id}{operation__code_patriarche}-" + u"{town__numero_insee}-{section}{parcel_number}", help_text=_(u"Formula to manage parcel external ID. " u"Change this with care. With incorrect formula, the " u"application might be unusable and import of external " u"data can be destructive.")) context_record_external_id = models.TextField( _(u"Context record external id"), - default="{parcel__external_id}-{label}", + default=u"{parcel__external_id}-{label}", help_text=_(u"Formula to manage context record external ID. " u"Change this with care. With incorrect formula, the " u"application might be unusable and import of external " u"data can be destructive.")) base_find_external_id = models.TextField( _(u"Base find external id"), - default="{context_record__external_id}-{label}", + default=u"{context_record__external_id}-{label}", help_text=_(u"Formula to manage base find external ID. " u"Change this with care. With incorrect formula, the " u"application might be unusable and import of external " u"data can be destructive.")) find_external_id = models.TextField( _(u"Find external id"), - default="{get_first_base_find__context_record__external_id}-{label}", + default=u"{get_first_base_find__context_record__external_id}-{label}", help_text=_(u"Formula to manage find external ID. " u"Change this with care. With incorrect formula, the " u"application might be unusable and import of external " u"data can be destructive.")) container_external_id = models.TextField( _(u"Container external id"), - default="{responsible__external_id}-{index}", + default=u"{responsible__external_id}-{index}", help_text=_(u"Formula to manage container external ID. " u"Change this with care. With incorrect formula, the " u"application might be unusable and import of external " u"data can be destructive.")) warehouse_external_id = models.TextField( _(u"Warehouse external id"), - default="{name|slug}", + default=u"{name|slug}", help_text=_(u"Formula to manage warehouse external ID. " u"Change this with care. With incorrect formula, the " u"application might be unusable and import of external " u"data can be destructive.")) person_raw_name = models.TextField( _(u"Raw name for person"), - default="{name|upper} {surname}", + default=u"{name|upper} {surname}", help_text=_(u"Formula to manage person raw_name. " u"Change this with care. With incorrect formula, the " u"application might be unusable and import of external " @@ -2347,7 +2347,7 @@ class Import(models.Model): _(u"Associated images (zip file)"), upload_to="upload/imports/", blank=True, null=True, max_length=220) encoding = models.CharField(_(u"Encoding"), choices=ENCODINGS, - default='utf-8', max_length=15) + default=u'utf-8', max_length=15) skip_lines = models.IntegerField(_(u"Skip lines"), default=1) error_file = models.FileField(_(u"Error file"), upload_to="upload/imports/", @@ -2359,7 +2359,7 @@ class Import(models.Model): upload_to="upload/imports/", blank=True, null=True, max_length=255) state = models.CharField(_(u"State"), max_length=2, choices=IMPORT_STATE, - default='C') + default=u'C') conservative_import = models.BooleanField( _(u"Conservative import"), default=False, help_text='If set to true, do not overload existing values') @@ -3144,7 +3144,7 @@ post_delete.connect(post_save_cache, sender=OperationType) class SpatialReferenceSystem(GeneralType): order = models.IntegerField(_(u"Order"), default=10) auth_name = models.CharField( - _(u"Authority name"), default='EPSG', max_length=256) + _(u"Authority name"), default=u'EPSG', max_length=256) srid = models.IntegerField(_(u"Authority SRID")) class Meta: |