diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-09-09 09:12:11 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-09-09 09:12:11 +0200 |
commit | a854fb0090f0deb674e83011c45a2e6c4ff0caee (patch) | |
tree | 0e943c82ea96146ae0987314abaa3e8f487c8c23 /archaeological_operations | |
parent | 8801ab7b7e655d8b831e535381eeea8adc091989 (diff) | |
parent | 2ad59aa6f6f4506d86c205f78a99ed5e47992156 (diff) | |
download | Ishtar-a854fb0090f0deb674e83011c45a2e6c4ff0caee.tar.bz2 Ishtar-a854fb0090f0deb674e83011c45a2e6c4ff0caee.zip |
Merge branch 'master' into v0.9
Diffstat (limited to 'archaeological_operations')
-rw-r--r-- | archaeological_operations/forms.py | 6 | ||||
-rw-r--r-- | archaeological_operations/locale/django.pot | 14 | ||||
-rw-r--r-- | archaeological_operations/utils.py | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 058e637f4..e3e287d24 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -61,7 +61,7 @@ class ParcelField(forms.MultiValueField): self.widget = ParcelWidget() return super(ParcelField, self).__init__(*args, **kwargs) - def compress(data_list): + def compress(self, data_list): return u"-".join(data_list) @@ -72,7 +72,7 @@ class ParcelForm(forms.Form): town = forms.ChoiceField(label=_("Town"), choices=(), required=False, validators=[valid_id(models.Town)]) year = forms.IntegerField(label=_("Year"), required=False, - validators=[validators.MinValueValidator(1600), + validators=[validators.MinValueValidator(1000), validators.MaxValueValidator(2100)]) section = forms.CharField(label=_(u"Section"), required=False, validators=[validators.MaxLengthValidator(4)]) @@ -784,7 +784,7 @@ class OperationFormGeneral(ManageOldType, forms.Form): choices=[]) year = forms.IntegerField(label=_(u"Year"), initial=lambda: datetime.datetime.now().year, - validators=[validators.MinValueValidator(1600), + validators=[validators.MinValueValidator(1000), validators.MaxValueValidator(2100)]) old_code = forms.CharField( label=_(u"Old code"), required=False, diff --git a/archaeological_operations/locale/django.pot b/archaeological_operations/locale/django.pot index 60d14f5a4..8373fb24c 100644 --- a/archaeological_operations/locale/django.pot +++ b/archaeological_operations/locale/django.pot @@ -535,7 +535,7 @@ msgstr "" msgid "Object" msgstr "" -#: forms.py:1359 views.py:350 +#: forms.py:1359 views.py:354 msgid "Administrative act search" msgstr "" @@ -578,7 +578,7 @@ msgstr "" msgid "Generate the associated doc?" msgstr "" -#: forms.py:1523 ishtar_menu.py:123 views.py:403 +#: forms.py:1523 ishtar_menu.py:123 views.py:407 msgctxt "admin act register" msgid "Register" msgstr "" @@ -1083,23 +1083,23 @@ msgstr "" msgid "Operation: source creation" msgstr "" -#: views.py:329 +#: views.py:333 msgid "Operation: source modification" msgstr "" -#: views.py:344 +#: views.py:348 msgid "Operation: source deletion" msgstr "" -#: views.py:363 +#: views.py:367 msgid "Operation: new administrative act" msgstr "" -#: views.py:373 +#: views.py:377 msgid "Operation: administrative act modification" msgstr "" -#: views.py:397 +#: views.py:401 msgid "Operation: administrative act deletion" msgstr "" diff --git a/archaeological_operations/utils.py b/archaeological_operations/utils.py index 40ca71c05..3a5057cd5 100644 --- a/archaeological_operations/utils.py +++ b/archaeological_operations/utils.py @@ -256,7 +256,7 @@ def parse_year(value): yr = int(value) except ValueError: return None - if yr < 1600 or yr > 2100: + if yr < 1000 or yr > 2100: return None return yr @@ -268,7 +268,7 @@ def parse_trunc_patriarche(value): value = value.replace(' ', '') try: int(value) - except: + except ValueError: return return '18' + unicode(value) |