Replace ... by …
Signed-off-by: Emmy D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
86bc2d2698
commit
48d9a8b5d2
|
@ -50,7 +50,7 @@
|
|||
* `--bus BUS` : filtre par bus, en récupérant uniquement les inscriptions sur un bus. Par défaut, on affiche
|
||||
tous les bus.
|
||||
* `--team TEAM` : filtre par équipe, en récupérant uniquement les inscriptions sur une équipe. Par défaut, on
|
||||
affiche toutes les équipes. Entrer `"none"` filtre les inscriptions sans équipe (chefs de bus, ...)
|
||||
affiche toutes les équipes. Entrer `"none"` filtre les inscriptions sans équipe (chefs de bus,…)
|
||||
* `--sep` : définit le caractère de séparation des colonnes du fichier CSV. Par défaut, il s'agit du caractère `|`.
|
||||
Merci de ne pas rentrer plus d'un caractère.
|
||||
|
||||
|
|
|
@ -57,13 +57,13 @@ class Command(BaseCommand):
|
|||
if user_id.isnumeric():
|
||||
qs = User.objects.filter(pk=int(user_id))
|
||||
if not qs.exists():
|
||||
self.stderr.write(self.style.WARNING(f"User {user_id} was not found. Ignoring..."))
|
||||
self.stderr.write(self.style.WARNING(f"User {user_id} was not found. Ignoring…"))
|
||||
continue
|
||||
user = qs.get()
|
||||
else:
|
||||
qs = Alias.objects.filter(normalized_name=Alias.normalize(user_id), note__noteuser__isnull=False)
|
||||
if not qs.exists():
|
||||
self.stderr.write(self.style.WARNING(f"User {user_id} was not found. Ignoring..."))
|
||||
self.stderr.write(self.style.WARNING(f"User {user_id} was not found. Ignoring…"))
|
||||
continue
|
||||
user = qs.get().note.user
|
||||
|
||||
|
@ -80,7 +80,7 @@ class Command(BaseCommand):
|
|||
local_deleted += list(transactions)
|
||||
for tr in transactions:
|
||||
if kwargs['verbosity'] >= 1:
|
||||
self.stdout.write(f"Removing {tr}...")
|
||||
self.stdout.write(f"Removing {tr}…")
|
||||
if force:
|
||||
tr.delete()
|
||||
|
||||
|
@ -89,7 +89,7 @@ class Command(BaseCommand):
|
|||
local_deleted += list(memberships)
|
||||
if kwargs['verbosity'] >= 1:
|
||||
for membership in memberships:
|
||||
self.stdout.write(f"Removing {membership}...")
|
||||
self.stdout.write(f"Removing {membership}…")
|
||||
if force:
|
||||
memberships.delete()
|
||||
|
||||
|
@ -98,7 +98,7 @@ class Command(BaseCommand):
|
|||
local_deleted += list(alias_set)
|
||||
if kwargs['verbosity'] >= 1:
|
||||
for alias in alias_set:
|
||||
self.stdout.write(f"Removing alias {alias}...")
|
||||
self.stdout.write(f"Removing alias {alias}…")
|
||||
if force:
|
||||
alias_set.delete()
|
||||
|
||||
|
@ -110,7 +110,7 @@ class Command(BaseCommand):
|
|||
local_deleted += list(entries)
|
||||
if kwargs['verbosity'] >= 1:
|
||||
for entry in entries:
|
||||
self.stdout.write(f"Removing {entry}...")
|
||||
self.stdout.write(f"Removing {entry}…")
|
||||
if force:
|
||||
entries.delete()
|
||||
|
||||
|
@ -119,7 +119,7 @@ class Command(BaseCommand):
|
|||
local_deleted += list(guests)
|
||||
if kwargs['verbosity'] >= 1:
|
||||
for guest in guests:
|
||||
self.stdout.write(f"Removing guest {guest}...")
|
||||
self.stdout.write(f"Removing guest {guest}…")
|
||||
if force:
|
||||
guests.delete()
|
||||
|
||||
|
@ -131,7 +131,7 @@ class Command(BaseCommand):
|
|||
local_deleted += list(credits)
|
||||
if kwargs['verbosity'] >= 1:
|
||||
for credit in credits:
|
||||
self.stdout.write(f"Removing {credit}...")
|
||||
self.stdout.write(f"Removing {credit}…")
|
||||
if force:
|
||||
credits.delete()
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ class Command(ImportCommand):
|
|||
pk_alias = Alias.objects.order_by('-id').first().id + 1
|
||||
for idx, row in enumerate(cur):
|
||||
alias_name = row["alias"]
|
||||
alias_name = (alias_name[:252] + '...') if len(alias_name) > 255 else alias_name
|
||||
alias_name = (alias_name[:254] + '…') if len(alias_name) > 255 else alias_name
|
||||
alias_norm = Alias.normalize(alias_name)
|
||||
self.update_line(idx, n, alias_norm)
|
||||
# clean pseudo (normalized pseudo must be unique)
|
||||
|
|
|
@ -102,7 +102,7 @@ class Command(ImportCommand):
|
|||
|
||||
def _basic_transaction(self, row, obj_dict, child_dict):
|
||||
if len(row["description"]) > 255:
|
||||
obj_dict["reason"] = obj_dict["reason"][:250] + "...)"
|
||||
obj_dict["reason"] = obj_dict["reason"][:252] + "…)"
|
||||
return obj_dict, None, None
|
||||
|
||||
def _template_transaction(self, row, obj_dict, child_dict):
|
||||
|
@ -221,7 +221,7 @@ class Command(ImportCommand):
|
|||
"valid": row["valide"],
|
||||
}
|
||||
if len(obj_dict["reason"]) > 255:
|
||||
obj_dict["reason"] = obj_dict["reason"][:252] + "..."
|
||||
obj_dict["reason"] = obj_dict["reason"][:254] + "…"
|
||||
# for child transaction Models
|
||||
child_dict = {"pk": pk_transaction}
|
||||
ttype = row["type"]
|
||||
|
|
|
@ -17,10 +17,10 @@ class Command(BaseCommand):
|
|||
user.is_active = True
|
||||
if kwargs['STAFF']:
|
||||
if kwargs['verbosity'] > 0:
|
||||
self.stdout.write(f"Add {user} to staff users...")
|
||||
self.stdout.write(f"Add {user} to staff users…")
|
||||
user.is_staff = True
|
||||
if kwargs['SUPER']:
|
||||
if kwargs['verbosity'] > 0:
|
||||
self.stdout.write(f"Add {user} to superusers...")
|
||||
self.stdout.write(f"Add {user} to superusers…")
|
||||
user.is_superuser = True
|
||||
user.save()
|
||||
|
|
Loading…
Reference in New Issue