class documentation

class Command(BaseCommand):

View In Hierarchy

Undocumented

Method add​_arguments Entry point for subclassed commands to add custom arguments.
Method find​_fixture​_files​_in​_dir Undocumented
Method find​_fixtures Find fixture files for a given label.
Method get​_fixture​_name​_and​_dirs Undocumented
Method get​_targets Undocumented
Method handle The actual logic of the command. Subclasses must implement this method.
Method load​_label Load fixtures files for a given label.
Method loaddata Undocumented
Method parse​_name Split fixture name in name, serialization format, compression format.
Method reset​_sequences Reset database sequences for the given connection and models.
Method save​_obj Save an object if permitted.
Class Variable help Undocumented
Class Variable missing​_args​_message Undocumented
Instance Variable app​_label Undocumented
Instance Variable excluded​_apps Undocumented
Instance Variable excluded​_models Undocumented
Instance Variable fixture​_count Undocumented
Instance Variable fixture​_object​_count Undocumented
Instance Variable format Undocumented
Instance Variable ignore Undocumented
Instance Variable loaded​_object​_count Undocumented
Instance Variable models Undocumented
Instance Variable objs​_with​_deferred​_fields Undocumented
Instance Variable serialization​_formats Undocumented
Instance Variable using Undocumented
Instance Variable verbosity Undocumented
Property compression​_formats A dict mapping format names to (open function, mode arg) tuples.
Property fixture​_dirs Return a list of fixture directories.

Inherited from BaseCommand:

Method __init__ Undocumented
Method add​_base​_argument Call the parser's add_argument() method, suppressing the help text according to BaseCommand.suppressed_base_arguments.
Method check No summary
Method check​_migrations Print a warning if the set of migrations on disk don't match the migrations in the database.
Method create​_parser Create and return the ArgumentParser which will be used to parse the arguments to this command.
Method execute Try to execute this command, performing system checks if needed (as controlled by the requires_system_checks attribute, except if force-skipped).
Method get​_version Return the Django version, which should be correct for all built-in Django commands. User-supplied commands can override this method to return their own version.
Method print​_help Print the help message for this command, derived from self.usage().
Method run​_from​_argv No summary
Class Variable base​_stealth​_options Undocumented
Class Variable output​_transaction Undocumented
Class Variable requires​_migrations​_checks Undocumented
Class Variable stealth​_options Undocumented
Class Variable suppressed​_base​_arguments Undocumented
Instance Variable ​_called​_from​_command​_line Undocumented
Instance Variable requires​_system​_checks Undocumented
Instance Variable stderr Undocumented
Instance Variable stdout Undocumented
Instance Variable style Undocumented
def add_arguments(self, parser):
Entry point for subclassed commands to add custom arguments.
def find_fixture_files_in_dir(self, fixture_dir, fixture_name, targets):

Undocumented

@functools.lru_cache(maxsize=None)
def find_fixtures(self, fixture_label):
Find fixture files for a given label.
def get_fixture_name_and_dirs(self, fixture_name):

Undocumented

def get_targets(self, fixture_name, ser_fmt, cmp_fmt):

Undocumented

def handle(self, *fixture_labels, **options):
The actual logic of the command. Subclasses must implement this method.
def load_label(self, fixture_label):
Load fixtures files for a given label.
def loaddata(self, fixture_labels):

Undocumented

def parse_name(self, fixture_name):
Split fixture name in name, serialization format, compression format.
def reset_sequences(self, connection, models):
Reset database sequences for the given connection and models.
def save_obj(self, obj):
Save an object if permitted.
help: str =
missing_args_message: str =

Undocumented

app_label =

Undocumented

excluded_apps =

Undocumented

excluded_models =

Undocumented

fixture_count: int =

Undocumented

fixture_object_count: int =

Undocumented

format =

Undocumented

ignore =

Undocumented

loaded_object_count: int =

Undocumented

models: set =

Undocumented

objs_with_deferred_fields: list =

Undocumented

serialization_formats =

Undocumented

using =

Undocumented

verbosity =

Undocumented

@cached_property
compression_formats =
A dict mapping format names to (open function, mode arg) tuples.
@cached_property
fixture_dirs =

Return a list of fixture directories.

The list contains the 'fixtures' subdirectory of each installed application, if it exists, the directories in FIXTURE_DIRS, and the current directory.