summaryrefslogtreecommitdiff
path: root/archaeological_operations
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations')
-rw-r--r--archaeological_operations/forms.py8
-rw-r--r--archaeological_operations/models.py12
-rw-r--r--archaeological_operations/utils.py10
-rw-r--r--archaeological_operations/widgets.py2
4 files changed, 16 insertions, 16 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index b54a081d8..2d462c252 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -179,7 +179,7 @@ class ParcelForm(IshtarForm):
grouped = []
for keys, parcel_grp in groupby(parcels, key=sortkeyfn):
keys = list(keys)
- keys.append([u' '.join([str(gp[-2]), str(gp[-1])])
+ keys.append([' '.join([str(gp[-2]), str(gp[-1])])
for gp in parcel_grp])
grouped.append(keys)
res = ''
@@ -191,11 +191,11 @@ class ParcelForm(IshtarForm):
c_section = ''
if idx:
res += " ; "
- res += town + u' : '
+ res += town + ' : '
if c_section:
res += " / "
c_section = section
- res += section + u' '
+ res += section + ' '
res += ", ".join(parcel_numbers)
if year:
res += " (%s)" % str(year)
@@ -1825,7 +1825,7 @@ class GenerateDocForm(IshtarForm):
if 'choices' in kwargs:
choices = kwargs.pop('choices')
super(GenerateDocForm, self).__init__(*args, **kwargs)
- self.fields['doc_generation'].choices = [('', u'-' * 9)] + \
+ self.fields['doc_generation'].choices = [('', '-' * 9)] + \
[(choice.pk, str(choice)) for choice in choices]
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index 014d1071b..b7841450c 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -315,7 +315,7 @@ class ArchaeologicalSite(DocumentItem, BaseHistorizedItem, CompleteIdentifierIte
null=True, blank=True)
periods = models.ManyToManyField(Period, verbose_name=_("Periods"),
blank=True)
- remains = models.ManyToManyField("RemainType", verbose_name=_(u'Remains'),
+ remains = models.ManyToManyField("RemainType", verbose_name=_('Remains'),
blank=True)
cultural_attributions = models.ManyToManyField(
"CulturalAttributionType", verbose_name=_("Cultural attribution"),
@@ -1073,7 +1073,7 @@ class Operation(ClosedItem, DocumentItem, BaseHistorizedItem,
operation_type = models.ForeignKey(OperationType, related_name='+',
verbose_name=_("Operation type"))
surface = models.IntegerField(_("Surface (m2)"), blank=True, null=True)
- remains = models.ManyToManyField("RemainType", verbose_name=_(u'Remains'),
+ remains = models.ManyToManyField("RemainType", verbose_name=_('Remains'),
blank=True)
towns = models.ManyToManyField(Town, verbose_name=_("Towns"),
related_name='operations')
@@ -1887,10 +1887,10 @@ class OperationByDepartment(models.Model):
class ActType(GeneralType):
- TYPE = (('F', _(u'Archaeological file')),
- ('O', _(u'Operation')),
- ('TF', _(u'Treatment request')),
- ('T', _(u'Treatment')),
+ TYPE = (('F', _('Archaeological file')),
+ ('O', _('Operation')),
+ ('TF', _('Treatment request')),
+ ('T', _('Treatment')),
)
SERIALIZATION_EXCLUDE = ["associated_template"]
intented_to = models.CharField(_("Intended to"), max_length=2,
diff --git a/archaeological_operations/utils.py b/archaeological_operations/utils.py
index 55fb9ef76..bf38a675a 100644
--- a/archaeological_operations/utils.py
+++ b/archaeological_operations/utils.py
@@ -66,7 +66,7 @@ def _init_ope_types():
ot, created = OperationType.objects.get_or_create(
txt_idx=settings.ISHTAR_OPE_TYPES[k][0],
defaults={'label': settings.ISHTAR_OPE_TYPES[k][1],
- 'preventive': k[0] == u'préventive'})
+ 'preventive': k[0] == 'préventive'})
ope_types[k] = ot
@@ -109,8 +109,8 @@ def parse_period(value):
if not periods:
_init_period()
if not value:
- return [periods[u'']]
- period, old_val = [], u''
+ return [periods['']]
+ period, old_val = [], ''
while value and old_val != value:
old_val = value
for k in periods_keys:
@@ -133,8 +133,8 @@ def parse_period_name(value):
_init_period()
value = parse_string(value)
if not value:
- return [period_names[u'']]
- period, old_val = [], u''
+ return [period_names['']]
+ period, old_val = [], ''
value = slugify(value)
while value and old_val != value:
old_val = value
diff --git a/archaeological_operations/widgets.py b/archaeological_operations/widgets.py
index fa7306208..247fafba5 100644
--- a/archaeological_operations/widgets.py
+++ b/archaeological_operations/widgets.py
@@ -46,7 +46,7 @@ class ParcelWidget(widgets.MultiWidget):
return [None, None]
def format_output(self, rendered_widgets):
- return u' / '.join(rendered_widgets)
+ return ' / '.join(rendered_widgets)
class SelectParcelWidget(widgets.TextInput):