diff options
Diffstat (limited to 'ishtar_common/management/commands')
| -rw-r--r-- | ishtar_common/management/commands/regenerate_qrcodes.py | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/ishtar_common/management/commands/regenerate_qrcodes.py b/ishtar_common/management/commands/regenerate_qrcodes.py index e56573b06..6c1ed8ecc 100644 --- a/ishtar_common/management/commands/regenerate_qrcodes.py +++ b/ishtar_common/management/commands/regenerate_qrcodes.py @@ -40,10 +40,15 @@ class Command(BaseCommand):          parser.add_argument('app_name', nargs='?', default=None,                              choices=APPS)          parser.add_argument('model_name', nargs='?', default=None) +        parser.add_argument( +            '--no-https', dest='no-https', action='store_true', +            default=False, +            help='Use this parameter if https is not available.')      def handle(self, *args, **options):          limit = options['app_name']          model_name = options['model_name'] +        secure = not options['no-https']          if model_name:              model_name = model_name.lower()          for app in APPS: @@ -68,6 +73,6 @@ class Command(BaseCommand):                      cmsg = u"\r{} {}/{}".format(msg, idx + 1, ln)                      sys.stdout.write(cmsg)                      sys.stdout.flush() -                    object.generate_qrcode(secure=False, tmpdir=tmpdir) +                    object.generate_qrcode(secure=secure, tmpdir=tmpdir)                  shutil.rmtree(tmpdir)                  sys.stdout.write("\n") | 
