本文整理汇总了Python中django.core.management.base.CommandParser.formatter_class方法的典型用法代码示例。如果您正苦于以下问题:Python CommandParser.formatter_class方法的具体用法?Python CommandParser.formatter_class怎么用?Python CommandParser.formatter_class使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类django.core.management.base.CommandParser
的用法示例。
在下文中一共展示了CommandParser.formatter_class方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: add_arguments
# 需要导入模块: from django.core.management.base import CommandParser [as 别名]
# 或者: from django.core.management.base.CommandParser import formatter_class [as 别名]
def add_arguments(self, parser: CommandParser) -> None:
parser.add_argument('--destroy-rebuild-database',
dest='destroy_rebuild_database',
default=False,
action="store_true",
help='Destroys and rebuilds the databases prior to import.')
parser.add_argument('--import-into-nonempty',
dest='import_into_nonempty',
default=False,
action="store_true",
help='Import into an existing nonempty database.')
parser.add_argument('subdomain', metavar='<subdomain>',
type=str, help="Subdomain")
parser.add_argument('export_paths', nargs='+',
metavar='<export path>',
help="list of export directories to import")
parser.add_argument('--processes',
dest='processes',
action="store",
default=6,
help='Number of processes to use for uploading Avatars to S3 in parallel')
parser.formatter_class = argparse.RawTextHelpFormatter
示例2: add_arguments
# 需要导入模块: from django.core.management.base import CommandParser [as 别名]
# 或者: from django.core.management.base.CommandParser import formatter_class [as 别名]
def add_arguments(self, parser: CommandParser) -> None:
parser.add_argument('hipchat_tar', nargs='+',
metavar='<hipchat data tarfile>',
help="tar of Hipchat data")
parser.add_argument('--output', dest='output_dir',
action="store",
help='Directory to write exported data to.')
parser.formatter_class = argparse.RawTextHelpFormatter
示例3: add_arguments
# 需要导入模块: from django.core.management.base import CommandParser [as 别名]
# 或者: from django.core.management.base.CommandParser import formatter_class [as 别名]
def add_arguments(self, parser: CommandParser) -> None:
parser.add_argument('slack_data_zip', nargs='+',
metavar='<slack data zip>',
help="Zipped slack data")
parser.add_argument('realm_name', metavar='<realm_name>',
type=str, help="Realm Name")
parser.add_argument('--output', dest='output_dir',
action="store", default=None,
help='Directory to write exported data to.')
parser.formatter_class = argparse.RawTextHelpFormatter
示例4: add_arguments
# 需要导入模块: from django.core.management.base import CommandParser [as 别名]
# 或者: from django.core.management.base.CommandParser import formatter_class [as 别名]
def add_arguments(self, parser: CommandParser) -> None:
parser.add_argument('gitter_data', nargs='+',
metavar='<gitter data>',
help="Gitter data in json format")
parser.add_argument('--output', dest='output_dir',
action="store", default=None,
help='Directory to write exported data to.')
parser.add_argument('--threads',
dest='threads',
action="store",
default=6,
help='Threads to download avatars and attachments faster')
parser.formatter_class = argparse.RawTextHelpFormatter
示例5: add_arguments
# 需要导入模块: from django.core.management.base import CommandParser [as 别名]
# 或者: from django.core.management.base.CommandParser import formatter_class [as 别名]
def add_arguments(self, parser: CommandParser) -> None:
parser.add_argument('--destroy-rebuild-database',
dest='destroy_rebuild_database',
default=False,
action="store_true",
help='Destroys and rebuilds the databases prior to import.')
parser.add_argument('--import-into-nonempty',
dest='import_into_nonempty',
default=False,
action="store_true",
help='Import into an existing nonempty database.')
parser.add_argument('export_files', nargs='+',
metavar='<export file>',
help="list of JSON exports to import")
parser.formatter_class = argparse.RawTextHelpFormatter
示例6: add_arguments
# 需要导入模块: from django.core.management.base import CommandParser [as 别名]
# 或者: from django.core.management.base.CommandParser import formatter_class [as 别名]
def add_arguments(self, parser: CommandParser) -> None:
parser.add_argument('slack_data_zip', nargs='+',
metavar='<slack data zip>',
help="Zipped slack data")
parser.add_argument('--token', metavar='<slack_token>',
type=str, help='Slack legacy token of the organsation')
parser.add_argument('--output', dest='output_dir',
action="store", default=None,
help='Directory to write exported data to.')
parser.add_argument('--threads',
dest='threads',
action="store",
default=6,
help='Threads to use in exporting UserMessage objects in parallel')
parser.formatter_class = argparse.RawTextHelpFormatter
示例7: add_arguments
# 需要导入模块: from django.core.management.base import CommandParser [as 别名]
# 或者: from django.core.management.base.CommandParser import formatter_class [as 别名]
def add_arguments(self, parser: CommandParser) -> None:
parser.add_argument('hipchat_tar', nargs='+',
metavar='<hipchat data tarfile>',
help="tar of Hipchat data")
parser.add_argument('--output', dest='output_dir',
action="store",
help='Directory to write exported data to.')
parser.add_argument('--mask', dest='masking_content',
action="store_true",
help='Mask the content for privacy during QA.')
parser.add_argument('--slim-mode', dest='slim_mode',
action="store_true",
help="Default to no public stream subscriptions if no token is available." +
" See import docs for details.")
parser.add_argument('--token', dest='api_token',
action="store",
help='API token for the HipChat API for fetching subscribers.')
parser.formatter_class = argparse.RawTextHelpFormatter