mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-22 07:41:14 +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
|
||||
)
|
||||
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):
|
||||
|
@ -114,14 +114,11 @@ class SelectFile(TextInput):
|
||||
attrs["class"] = "select_file"
|
||||
else:
|
||||
attrs = {"class": "select_file"}
|
||||
output = (
|
||||
'%(content)s<div name="%(name)s" class="choose_file_widget" title="%(title)s"></div>'
|
||||
% {
|
||||
output = '%(content)s<div name="%(name)s" class="choose_file_widget" title="%(title)s"></div>' % {
|
||||
"content": super(SelectFile, self).render(name, value, attrs, renderer),
|
||||
"title": _("Choose file"),
|
||||
"name": name,
|
||||
}
|
||||
)
|
||||
output += (
|
||||
'<span name="'
|
||||
+ name
|
||||
@ -138,14 +135,11 @@ class SelectUser(TextInput):
|
||||
attrs["class"] = "select_user"
|
||||
else:
|
||||
attrs = {"class": "select_user"}
|
||||
output = (
|
||||
'%(content)s<div name="%(name)s" class="choose_user_widget" title="%(title)s"></div>'
|
||||
% {
|
||||
output = '%(content)s<div name="%(name)s" class="choose_user_widget" title="%(title)s"></div>' % {
|
||||
"content": super(SelectUser, self).render(name, value, attrs, renderer),
|
||||
"title": _("Choose user"),
|
||||
"name": name,
|
||||
}
|
||||
)
|
||||
output += (
|
||||
'<span name="'
|
||||
+ name
|
||||
|
@ -55,7 +55,9 @@ def write_log(instance, operation_type):
|
||||
return None
|
||||
|
||||
log = OperationLog(
|
||||
label=str(instance), operator=get_user(), operation_type=operation_type,
|
||||
label=str(instance),
|
||||
operator=get_user(),
|
||||
operation_type=operation_type,
|
||||
).save()
|
||||
|
||||
|
||||
|
@ -120,8 +120,7 @@ class ShoppingList(models.Model):
|
||||
|
||||
|
||||
class ShoppingListItem(models.Model):
|
||||
"""
|
||||
"""
|
||||
""""""
|
||||
|
||||
shopping_lists = models.ManyToManyField(
|
||||
ShoppingList,
|
||||
|
Loading…
Reference in New Issue
Block a user