summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-02-04 18:54:48 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-02-28 12:15:24 +0100
commitfdea77fd9347638409ac56948c87e7f61af8847c (patch)
tree43fc3285486bace07d3ce0588c8960328664c52a /ishtar_common/models.py
parent8eebd435f302bacd6ad5a584cbed55919a55f4bf (diff)
downloadIshtar-fdea77fd9347638409ac56948c87e7f61af8847c.tar.bz2
Ishtar-fdea77fd9347638409ac56948c87e7f61af8847c.zip
Typo fix
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 3cecb1655..79fa8f6c0 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -796,11 +796,11 @@ class IshtarSiteProfile(models.Model, Cached):
"will appear. Use the markdown syntax. {random_image} "
"can be used to display a random image."))
operation_prefix = models.CharField(
- _("Main operation code prefix"), default=u'OA', null=True, blank=True,
+ _("Main operation code prefix"), default='OA', null=True, blank=True,
max_length=20
)
default_operation_prefix = models.CharField(
- _("Default operation code prefix"), default=u'OP', null=True,
+ _("Default operation code prefix"), default='OP', null=True,
blank=True, max_length=20
)
operation_region_code = models.CharField(
@@ -1575,7 +1575,7 @@ class DocumentTemplate(models.Model):
def publish(self, c_object):
tempdir = tempfile.mkdtemp("-ishtardocs")
output_name = tempdir + os.path.sep + \
- slugify(self.name.replace(' ', '_').lower()) + u'-' + \
+ slugify(self.name.replace(' ', '_').lower()) + '-' + \
datetime.date.today().strftime('%Y-%m-%d') + \
"." + self.template.name.split('.')[-1]
"""
@@ -1643,7 +1643,7 @@ class DocumentTemplate(models.Model):
return
tempdir = tempfile.mkdtemp("-ishtarlabels")
main_output_name = tempdir + os.path.sep + \
- slugify(self.name.replace(' ', '_').lower()) + u'-' + \
+ slugify(self.name.replace(' ', '_').lower()) + '-' + \
datetime.datetime.now().strftime('%Y-%m-%d-%H%M%S')
suffix = "." + self.template.name.split('.')[-1]
len_objects = len(objects)
@@ -1825,7 +1825,7 @@ class Organization(Address, Merge, OwnPerms, BaseGenderedType, ValueGetter,
}
QA_EDIT = QuickAction(
url="organization-qa-bulk-update", icon_class="fa fa-pencil",
- text=_(u"Bulk update"), target="many",
+ text=_("Bulk update"), target="many",
rights=['change_organization'])
QUICK_ACTIONS = [
QA_EDIT
@@ -2014,11 +2014,11 @@ class Person(Address, Merge, OwnPerms, ValueGetter, MainItem):
SLUG = "person"
_prefix = 'person_'
TYPE = (
- ('Mr', _(u'Mr')),
- ('Ms', _(u'Miss')),
- ('Mr and Miss', _(u'Mr and Mrs')),
- ('Md', _(u'Mrs')),
- ('Dr', _(u'Doctor')),
+ ('Mr', _('Mr')),
+ ('Ms', _('Miss')),
+ ('Mr and Miss', _('Mr and Mrs')),
+ ('Md', _('Mrs')),
+ ('Dr', _('Doctor')),
)
TABLE_COLS = ('name', 'surname', 'raw_name', 'email', 'person_types_list',
'attached_to', 'town')
@@ -2074,7 +2074,7 @@ class Person(Address, Merge, OwnPerms, ValueGetter, MainItem):
}
QA_EDIT = QuickAction(
url="person-qa-bulk-update", icon_class="fa fa-pencil",
- text=_(u"Bulk update"), target="many",
+ text=_("Bulk update"), target="many",
rights=['change_person'])
QUICK_ACTIONS = [
QA_EDIT
@@ -2195,7 +2195,7 @@ class Person(Address, Merge, OwnPerms, ValueGetter, MainItem):
if self.attached_to:
attached_to = str(self.attached_to)
if values:
- values.append(u'-')
+ values.append('-')
values.append(attached_to)
return " ".join(values)
@@ -2222,8 +2222,8 @@ class Person(Address, Merge, OwnPerms, ValueGetter, MainItem):
def generate_merge_key(self):
if self.name and self.name.strip():
self.merge_key = slugify(self.name.strip()) + \
- ((u'-' + slugify(self.surname.strip()))
- if self.surname else u'')
+ (('-' + slugify(self.surname.strip()))
+ if self.surname else '')
elif self.raw_name and self.raw_name.strip():
self.merge_key = slugify(self.raw_name.strip())
elif self.attached_to:
@@ -3170,7 +3170,7 @@ class Document(BaseHistorizedItem, CompleteIdentifierItem, OwnPerms, ImageModel,
}
QA_EDIT = QuickAction(
url="document-qa-bulk-update", icon_class="fa fa-pencil",
- text=_(u"Bulk update"), target="many",
+ text=_("Bulk update"), target="many",
rights=['change_document', 'change_own_document'])
QUICK_ACTIONS = [
QA_EDIT,