mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-22 15:51:19 +00:00
Upgrade black and format accordingly
This commit is contained in:
parent
f485178422
commit
f34f5fe693
@ -1490,7 +1490,9 @@ class OperationLog(models.Model):
|
|||||||
User, related_name="logs", on_delete=models.SET_NULL, null=True
|
User, related_name="logs", on_delete=models.SET_NULL, null=True
|
||||||
)
|
)
|
||||||
operation_type = models.CharField(
|
operation_type = models.CharField(
|
||||||
_("operation type"), max_length=40, choices=settings.SITH_LOG_OPERATION_TYPE,
|
_("operation type"),
|
||||||
|
max_length=40,
|
||||||
|
choices=settings.SITH_LOG_OPERATION_TYPE,
|
||||||
)
|
)
|
||||||
|
|
||||||
def is_owned_by(self, user):
|
def is_owned_by(self, user):
|
||||||
|
@ -114,14 +114,11 @@ class SelectFile(TextInput):
|
|||||||
attrs["class"] = "select_file"
|
attrs["class"] = "select_file"
|
||||||
else:
|
else:
|
||||||
attrs = {"class": "select_file"}
|
attrs = {"class": "select_file"}
|
||||||
output = (
|
output = '%(content)s<div name="%(name)s" class="choose_file_widget" title="%(title)s"></div>' % {
|
||||||
'%(content)s<div name="%(name)s" class="choose_file_widget" title="%(title)s"></div>'
|
|
||||||
% {
|
|
||||||
"content": super(SelectFile, self).render(name, value, attrs, renderer),
|
"content": super(SelectFile, self).render(name, value, attrs, renderer),
|
||||||
"title": _("Choose file"),
|
"title": _("Choose file"),
|
||||||
"name": name,
|
"name": name,
|
||||||
}
|
}
|
||||||
)
|
|
||||||
output += (
|
output += (
|
||||||
'<span name="'
|
'<span name="'
|
||||||
+ name
|
+ name
|
||||||
@ -138,14 +135,11 @@ class SelectUser(TextInput):
|
|||||||
attrs["class"] = "select_user"
|
attrs["class"] = "select_user"
|
||||||
else:
|
else:
|
||||||
attrs = {"class": "select_user"}
|
attrs = {"class": "select_user"}
|
||||||
output = (
|
output = '%(content)s<div name="%(name)s" class="choose_user_widget" title="%(title)s"></div>' % {
|
||||||
'%(content)s<div name="%(name)s" class="choose_user_widget" title="%(title)s"></div>'
|
|
||||||
% {
|
|
||||||
"content": super(SelectUser, self).render(name, value, attrs, renderer),
|
"content": super(SelectUser, self).render(name, value, attrs, renderer),
|
||||||
"title": _("Choose user"),
|
"title": _("Choose user"),
|
||||||
"name": name,
|
"name": name,
|
||||||
}
|
}
|
||||||
)
|
|
||||||
output += (
|
output += (
|
||||||
'<span name="'
|
'<span name="'
|
||||||
+ name
|
+ name
|
||||||
|
@ -55,7 +55,9 @@ def write_log(instance, operation_type):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
log = OperationLog(
|
log = OperationLog(
|
||||||
label=str(instance), operator=get_user(), operation_type=operation_type,
|
label=str(instance),
|
||||||
|
operator=get_user(),
|
||||||
|
operation_type=operation_type,
|
||||||
).save()
|
).save()
|
||||||
|
|
||||||
|
|
||||||
|
@ -120,8 +120,7 @@ class ShoppingList(models.Model):
|
|||||||
|
|
||||||
|
|
||||||
class ShoppingListItem(models.Model):
|
class ShoppingListItem(models.Model):
|
||||||
"""
|
""""""
|
||||||
"""
|
|
||||||
|
|
||||||
shopping_lists = models.ManyToManyField(
|
shopping_lists = models.ManyToManyField(
|
||||||
ShoppingList,
|
ShoppingList,
|
||||||
|
Loading…
Reference in New Issue
Block a user