dm.management.commands.dump module

class dm.management.commands.dump.Command(stdout=None, stderr=None, no_color=False, force_color=False)[源代码]

基类:BaseCommand

add_arguments(parser)[源代码]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[源代码]

The actual logic of the command. Subclasses must implement this method.

help = '导出数据'
dm.management.commands.dump.complete_filename(filename: str = None) str[源代码]

处理缺省的文件名和没有后缀的文件名

参数:

filename (str, optional) -- 待处理的文件名, defaults to None

返回:

处理后的文件名

返回类型:

str

dm.management.commands.dump.extend_group_label(labels: List[str], extend_dict: dict) set[源代码]

Extend label to low-level, atomic tasks. Currently no support to recur

参数:
  • labels (List[str]) -- labels to be extended

  • extend_dict (dict) --

    ...

返回:

set of atomic tasks

返回类型:

set

dm.management.commands.dump.valid_datetime(s: str) datetime[源代码]

Generate valid datetime from str

参数:

s (str) -- time str

抛出:

ValueError -- Unexpected time format

返回:

datetime

返回类型:

datetime