diff options
Diffstat (limited to 'ishtar_common/management/commands/regenerate_qrcodes.py')
-rw-r--r-- | ishtar_common/management/commands/regenerate_qrcodes.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ishtar_common/management/commands/regenerate_qrcodes.py b/ishtar_common/management/commands/regenerate_qrcodes.py index 6c1ed8ecc..d915d2e21 100644 --- a/ishtar_common/management/commands/regenerate_qrcodes.py +++ b/ishtar_common/management/commands/regenerate_qrcodes.py @@ -54,7 +54,7 @@ class Command(BaseCommand): for app in APPS: if limit and app != limit: continue - print(u"* app: {}".format(app)) + print("* app: {}".format(app)) for model in apps.get_app_config(app).get_models(): if model_name and model.__name__.lower() != model_name: continue @@ -64,13 +64,13 @@ class Command(BaseCommand): model._meta.get_field('qrcode') except FieldDoesNotExist: continue - msg = u"-> processing {}: ".format(model._meta.verbose_name) + msg = "-> processing {}: ".format(model._meta.verbose_name) ln = model.objects.count() tmpdir = tempfile.mkdtemp("-qrcode") for idx, object in enumerate(model.objects.all()): object.skip_history_when_saving = True object._no_move = True - cmsg = u"\r{} {}/{}".format(msg, idx + 1, ln) + cmsg = "\r{} {}/{}".format(msg, idx + 1, ln) sys.stdout.write(cmsg) sys.stdout.flush() object.generate_qrcode(secure=secure, tmpdir=tmpdir) |