当前位置: 首页>>代码示例>>Python>>正文


Python CommandParser.formatter_class方法代码示例

本文整理汇总了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
开发者ID:BakerWang,项目名称:zulip,代码行数:27,代码来源:import.py

示例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
开发者ID:gregmccoy,项目名称:zulip,代码行数:12,代码来源:convert_hipchat_data.py

示例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
开发者ID:joydeep1701,项目名称:zulip,代码行数:14,代码来源:convert_slack_data.py

示例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
开发者ID:akashnimare,项目名称:zulip,代码行数:18,代码来源:convert_gitter_data.py

示例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
开发者ID:gnprice,项目名称:zulip,代码行数:19,代码来源:import.py

示例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
开发者ID:284928489,项目名称:zulip,代码行数:21,代码来源:convert_slack_data.py

示例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
开发者ID:BakerWang,项目名称:zulip,代码行数:25,代码来源:convert_hipchat_data.py


注:本文中的django.core.management.base.CommandParser.formatter_class方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。