Output duplicates on the same line
This commit is contained in:
parent
af798e3fcc
commit
0b0eb49459
1 changed files with 5 additions and 5 deletions
|
|
@ -30,12 +30,12 @@ class Command(BaseCommand):
|
||||||
# Find duplicates in all galleries
|
# Find duplicates in all galleries
|
||||||
for gallery in galleries:
|
for gallery in galleries:
|
||||||
duplicates = find_duplicate(gallery)
|
duplicates = find_duplicate(gallery)
|
||||||
self.stdout.write('Gallery {} :'.format(gallery.slug))
|
self.stdout.write(f"Gallery {gallery.slug}:")
|
||||||
for (original, copies) in duplicates:
|
for original, copies in duplicates:
|
||||||
self.stdout.write(
|
self.stdout.write(f" {original.slug} is duplicated:", ending='')
|
||||||
' {} has following duplicate(s) :'.format(original.slug))
|
|
||||||
for copy in copies:
|
for copy in copies:
|
||||||
self.stdout.write(' {}'.format(copy.slug))
|
self.stdout.write(f" {copy.slug}")
|
||||||
|
|
||||||
# Delete them if --delete
|
# Delete them if --delete
|
||||||
if options['delete']:
|
if options['delete']:
|
||||||
self.stdout.write(
|
self.stdout.write(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue