categories.management.commands.import_categories.Command

Command#

class categories.management.commands.import_categories.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]#

Import category trees from a file.

Methods

add_arguments(parser)

Entry point for subclassed commands to add custom arguments.

check([app_configs, tags, ...])

Use the system check framework to validate entire Django project.

check_migrations()

Print a warning if the set of migrations on disk don't match the migrations in the database.

create_parser(prog_name, subcommand, **kwargs)

Create and return the ArgumentParser which will be used to parse the arguments to this command.

execute(*args, **options)

Try to execute this command, performing system checks if needed (as controlled by the requires_system_checks attribute, except if force-skipped).

get_indent(string)

Look through the string and count the spaces.

get_version()

Return the Django version, which should be correct for all built-in Django commands.

handle(*file_paths, **options)

Handle the basic import.

make_category(string[, parent, order])

Make and save a category object from a string.

parse_lines(lines)

Do the work of parsing each line.

print_help(prog_name, subcommand)

Print the help message for this command, derived from self.usage().

run_from_argv(argv)

Set up any environment changes requested (e.g., Python path and Django settings), then run this command.

Attributes

args

base_stealth_options

help

output_transaction

requires_migrations_checks

requires_system_checks

stealth_options