class documentation

class HashedFilesMixin:

Known subclasses: django.contrib.staticfiles.storage.ManifestFilesMixin

View In Hierarchy

Undocumented

Method __init__ Undocumented
Method ​_post​_process Undocumented
Method ​_stored​_name Undocumented
Method ​_url Return the non-hashed URL in DEBUG mode.
Method clean​_name Undocumented
Method file​_hash Return a hash of the file with the given name and optional content.
Method hash​_key Undocumented
Method hashed​_name Undocumented
Method post​_process Post process the given dictionary of files (called from collectstatic).
Method stored​_name Undocumented
Method url Return the non-hashed URL in DEBUG mode.
Method url​_converter Return the custom URL converter for the given file name.
Class Variable default​_template Undocumented
Class Variable keep​_intermediate​_files Undocumented
Class Variable max​_post​_process​_passes Undocumented
Class Variable patterns Undocumented
Instance Variable ​_patterns Undocumented
Instance Variable hashed​_files Undocumented
def __init__(self, *args, **kwargs):
def _post_process(self, paths, adjustable_paths, hashed_files):

Undocumented

def _stored_name(self, name, hashed_files):

Undocumented

def _url(self, hashed_name_func, name, force=False, hashed_files=None):
Return the non-hashed URL in DEBUG mode.
def clean_name(self, name):

Undocumented

def file_hash(self, name, content=None):
Return a hash of the file with the given name and optional content.
def hash_key(self, name):

Undocumented

def hashed_name(self, name, content=None, filename=None):

Undocumented

def post_process(self, paths, dry_run=False, **options):

Post process the given dictionary of files (called from collectstatic).

Processing is actually two separate operations:

  1. renaming files to include a hash of their content for cache-busting, and copying those files to the target storage.
  2. adjusting files which contain references to other files so they refer to the cache-busting filenames.

If either of these are performed on a file, then that file is considered post-processed.

def stored_name(self, name):
def url(self, name, force=False):
Return the non-hashed URL in DEBUG mode.
def url_converter(self, name, hashed_files, template=None):
Return the custom URL converter for the given file name.
default_template: str =

Undocumented

keep_intermediate_files: bool =
max_post_process_passes: int =

Undocumented

patterns: tuple[tuple, ...] =

Undocumented

_patterns: dict =

Undocumented

hashed_files: dict =