{{{
class Command(BaseCommand):
help = '''
Import a contract from tzkt.
Example usage:
./manage.py tzkt_import 'Tezos Mainnet'
KT1HTDtMBRCKoNHjfWEEvXneGQpCfPAt6BRe
'''
}}}
Help output is:
{{{
$ ./manage.py help tzkt_import
usage: manage.py tzkt_import [-h] [--api API] [--version] [-v {0,1,2,3}]
[--settings SETTINGS]
[--pythonpath PYTHONPATH] [--traceback]
[--no-color] [--force-color]
[--skip-checks]
blockchain target
Import a contract from tzkt Example usage: ./manage.py tzkt_import 'Tezos
Mainnet'
KT1HTDtMBRCKoNHjfWEEvXneGQpCfPAt6BRe
positional arguments:
blockchain Name of the blockchain to import into
target Id of the contract to import
}}}
When that was expected:
{{{
$ ./manage.py help tzkt_import
usage: manage.py tzkt_import [-h] [--api API] [--version] [-v {0,1,2,3}]
[--settings SETTINGS]
[--pythonpath PYTHONPATH] [--traceback]
[--no-color] [--force-color]
[--skip-checks]
blockchain target
Import a contract from tzkt
Example usage:
./manage.py tzkt_import 'Tezos Mainnet'
KT1HTDtMBRCKoNHjfWEEvXneGQpCfPAt6BRe
positional arguments:
blockchain Name of the blockchain to import into
target Id of the contract to import
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33657>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Tim Graham):
This seems no fault of Django but is rather
[https://docs.python.org/3/library/argparse.html#formatter-class the
default behavior] of `ArgumentParser` ("By default, `ArgumentParser`
objects line-wrap the description and epilog texts in command-line help
messages"). This can be changed by using a custom
[https://github.com/django/django/blob/ed0a2c3238aa0b9c0d01c436d5bcd70930d696b0/django/core/management/base.py#L292
formatter_class], though Django already specifies a custom one
([https://github.com/django/django/blob/ed0a2c3238aa0b9c0d01c436d5bcd70930d696b0/django/core/management/base.py#L105-L131
DjangoHelpFormatter]).
--
Ticket URL: <https://code.djangoproject.com/ticket/33657#comment:1>