def make_django_command(name, django_command=None, help=None):
 if (django_command is None):
  django_command = name
 @click.command(name=name, help=help, add_help_option=False, context_settings=dict(ignore_unknown_options=True))
 @click.argument('management_args', nargs=(-1), type=click.UNPROCESSED)
 @click.pass_context
 def inner(ctx, management_args):
  from sentry.runner.commands.django import django
  ctx.params['management_args'] = ((django_command,) + management_args)
  ctx.forward(django)
 return inner

def make_django_command ( name , django_command = None , help = None ) : if ( django_command is None ) : django_command = name @ click . command ( name = name , help = help , add_help_option = False , context_settings = dict ( ignore_unknown_options = True ) ) @ click . argument ( 'management_args' , nargs = ( - 1 ) , type = click . UNPROCESSED ) @ click . pass_context def inner ( ctx , management_args ) : from sentry . runner . commands . django import django ctx . params [ 'management_args' ] = ( ( django_command , ) + management_args ) ctx . forward ( django ) return inner
a wrapper to convert a django subcommand a click command .