class documentation

class Command(BaseCommand):

View In Hierarchy

Copies or symlinks static files from different locations to the settings.STATIC_ROOT.
Method __init__ Undocumented
Method add​_arguments Entry point for subclassed commands to add custom arguments.
Method clear​_dir Delete the given relative path using the destination storage backend.
Method collect Perform the bulk of the work of collectstatic.
Method copy​_file Attempt to copy path with storage
Method delete​_file Check if the target file should be deleted if it already exists.
Method handle The actual logic of the command. Subclasses must implement this method.
Method is​_local​_storage Undocumented
Method link​_file Attempt to link path
Method log Small log helper
Method set​_options Set instance variables based on an options dict
Class Variable help Undocumented
Class Variable requires​_system​_checks Undocumented
Instance Variable clear Undocumented
Instance Variable copied​_files Undocumented
Instance Variable dry​_run Undocumented
Instance Variable ignore​_patterns Undocumented
Instance Variable interactive Undocumented
Instance Variable post​_process Undocumented
Instance Variable post​_processed​_files Undocumented
Instance Variable storage Undocumented
Instance Variable style Undocumented
Instance Variable symlink Undocumented
Instance Variable symlinked​_files Undocumented
Instance Variable unmodified​_files Undocumented
Instance Variable verbosity Undocumented
Property local Undocumented

Inherited from BaseCommand:

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 stderr Undocumented
Instance Variable stdout Undocumented
def __init__(self, *args, **kwargs):
def add_arguments(self, parser):
Entry point for subclassed commands to add custom arguments.
def clear_dir(self, path):
Delete the given relative path using the destination storage backend.
def collect(self):

Perform the bulk of the work of collectstatic.

Split off from handle() to facilitate testing.

def copy_file(self, path, prefixed_path, source_storage):
Attempt to copy path with storage
def delete_file(self, path, prefixed_path, source_storage):
Check if the target file should be deleted if it already exists.
def handle(self, **options):
The actual logic of the command. Subclasses must implement this method.
def is_local_storage(self):

Undocumented

def link_file(self, path, prefixed_path, source_storage):
Attempt to link path
def log(self, msg, level=2):
Small log helper
def set_options(self, **options):
Set instance variables based on an options dict
help: str =
requires_system_checks =
clear =

Undocumented

copied_files: list =

Undocumented

dry_run =

Undocumented

ignore_patterns =

Undocumented

interactive =

Undocumented

post_process =

Undocumented

post_processed_files: list =

Undocumented

storage =

Undocumented

symlink =

Undocumented

symlinked_files: list =

Undocumented

unmodified_files: list =

Undocumented

verbosity =

Undocumented

@cached_property
local =

Undocumented