summaryrefslogtreecommitdiff
path: root/django/contrib/staticfiles
AgeCommit message (Collapse)Author
2026-03-06Fixed #36968 -- Improved error message when collectstatic can't find a ↵James Bligh
referenced file.
2026-03-04Fixed #21080 -- Ignored urls inside comments during collectstatic.James Bligh
Thanks Mariusz Felisiak for the review. Co-authored-by: Nathan Gaberel <nathan@gnab.fr>
2025-09-17Refs #22712 -- Removed all parameter from ↵Jacob Walls
django.contrib.staticfiles.finders.find(). Per deprecation timeline.
2025-08-08Fixed #36525 -- Silenced individual deleted file messages in collectstatic ↵James Bligh
--clear's default verbosity.
2025-08-05Fixed #26583 -- Silenced individual clashing name warnings in ↵James Bligh
collectstatic's default verbosity. Made collectstatic report individual destination conflicts only at verbosity 2+. Made verbosity level 1 report a summary count of skipped files.
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-07-01Fixed #35846 -- Ensured consistent path ordering in ↵Matthew Stell
ManifestStaticFilesStorage manifest files. This change reuses the existing sorting of `hashed_files` in `ManifestStaticFilesStorage.save_manifest` to also store a sorted `paths` mapping in the manifest file. This ensures stable manifest output that does not change unnecessarily.
2025-06-11Removed default value for app_configs in system check functions.Adam Johnson
The documentation[0] encourages users to write functions without a default for `app_configs`, and checks are always passed the argument. [0] https://docs.djangoproject.com/en/5.2/topics/checks/
2025-05-16Fixed #36348 -- Fixed handling multiple nested url()s in ↵Samuel Cormier-Iijima
ManifestStaticFilesStorage. Signed-off-by: Samuel Cormier-Iijima <samuel@cormier-iijima.com>
2024-10-29Fixed #35868 -- Removed unneeded AttributeError catching in collectstatic's ↵Peter Ruszel
delete_file().
2024-08-30Fixed #35669 -- Improved max post-process passes exceeded error message in ↵SaJH
HashedFilesMixin. Signed-off-by: SaJH <wogur981208@gmail.com>
2024-08-28Refs #22712 -- Adjusted deprecation warning stacklevel in staticfiles finders.Simon Charette
2024-08-07Fixed #35553 -- Handled import*as in HashedFilesMixin.Farhan
2024-06-28Refs #22712 -- Corrected deprecation of "all" argument in ↵Mariusz Felisiak
django.contrib.staticfiles.finders.find(). Features deprecated in Django 5.2 should be removed in Django 6.1.
2024-06-27Fixed #22712 -- Avoided name shadowing of "all" in ↵Andreu Vallbona
django.contrib.staticfiles.finders. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2024-05-29Fixed 35467 -- Replaced urlparse with urlsplit where appropriate.Jake Howard
This work should not generate any change of functionality, and `urlsplit` is approximately 6x faster. Most use cases of `urlparse` didn't touch the path, so they can be converted to `urlsplit` without any issue. Most of those which do use `.path`, simply parse the URL, mutate the querystring, then put them back together, which is also fine (so long as urlunsplit is used).
2024-02-28Fixed #29022 -- Fixed handling protocol-relative URLs in ↵Adam Zapletal
ManifestStaticFilesStorage when STATIC_URL is set to /.
2024-01-26Applied Black's 2024 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/24.1.0
2023-08-31Refs #34712 -- Added system check for staticfiles storage in STORAGES setting.Bruno Alla
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Natalia Bidart <124304+nessita@users.noreply.github.com>
2023-08-02Removed unneeded escapes in regexes.Mariusz Felisiak
Special characters lose their special meaning inside sets of characters. "-" lose its special meaning if it's placed as the first or last character. Follow up to 7c6b66383da5f9a67142334cd2ed2d769739e8f1.
2023-04-21Fixed #34496 -- Fixed handling source maps with data URI in ↵Hielke Walinga
ManifestStaticFilesStorage. Regression in 781b44240a06f0c868254f40f36ce46c927f56d1.
2023-03-21Fixed #34428 -- Made ASGIStaticFilesHandler adapt response to async iterator.Carlton Gibson
Bug in 0bd2c0c9015b53c41394a1c0989afbfd94dc2830.
2023-03-18Fixed #34322 -- Made ES module support to ManifestStaticFilesStorage optional.Mariusz Felisiak
Co-authored-by: Author: Claude Paroz <claude@2xlibre.net>
2023-03-12Fixed #34407 -- Reported filename when decoding fails in collectstatic's ↵Claude Paroz
post_process.
2023-01-18Refs #34233 -- Used @functools.cache.Nick Pope
Python 3.9+ supports @functools.cache as an alias for @functools.lru_cache(maxsize=None).
2023-01-18Refs #34233 -- Used str.removeprefix()/removesuffix().Mariusz Felisiak
2023-01-18Fixed #34233 -- Dropped support for Python 3.8 and 3.9.Mariusz Felisiak
2023-01-12Refs #26029 -- Deprecated DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings.Jarosław Wygoda
2023-01-02Fixed #34235 -- Added ManifestFilesMixin.manifest_hash attribute.Florian Apolloner
This adds ManifestFilesMixin.manifest_hash attribute exposing a "hash" of the full manifest. This allows applications to determine when their static files have changed.
2022-12-07Fixed #32319 -- Added ES module support to ManifestStaticFilesStorage.James Bligh
Co-authored-by: James Bligh <james.bligh@silvercloudhealth.com>
2022-06-23Made HashedFilesMixin ignore URLs without a path.Florian Apolloner
2022-06-09Fixed #33755 -- Moved ASGI body-file cleanup into request class.Jonas Lundberg
2022-03-04Refs #33446 -- Allowed variable whitespace in CSS source map references.Adam Johnson
Follow up to dc8bb35e39388d41b1f38b6c5d0181224e075f16. The Webpack default is to output CSS source map comments like `/*# sourceMappingURL=main.css.map*/`. Also, Chromium allows tabs.
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2022-02-03Refs #33476 -- Refactored problematic code before reformatting by Black.Mariusz Felisiak
In these cases Black produces unexpected results, e.g. def make_random_password( self, length=10, allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789', ): or cursor.execute(""" SELECT ... """, [table name], )
2022-01-18Fixed #33446 -- Added CSS source map support to ManifestStaticFilesStorage.Adam Johnson
2021-11-05Fixed #33253 -- Reverted "Fixed #32319 -- Added ES module support to ↵Mariusz Felisiak
ManifestStaticFilesStorage." This reverts commit 91e21836f667c784a8a63ab1f18d81f553e679cb. `export` and `import` directives have several syntax variants and not all of them were properly covered. Thanks Hervé Le Roy for the report.
2021-11-04Fixed #33237 -- Fixed detecting source maps in ManifestStaticFilesStorage ↵Carlton Gibson
for multiline files. Switched regex to multiline mode in order to match per-line, rather than against the whole file. Thanks to Joseph Abrahams for the report. Regression in 781b44240a06f0c868254f40f36ce46c927f56d1.
2021-10-12Fixed #28401 -- Allowed hashlib.md5() calls to work with FIPS kernels.Ade Lee
md5 is not an approved algorithm in FIPS mode, and trying to instantiate a hashlib.md5() will fail when the system is running in FIPS mode. md5 is allowed when in a non-security context. There is a plan to add a keyword parameter (usedforsecurity) to hashlib.md5() to annotate whether or not the instance is being used in a security context. In the case where it is not, the instantiation of md5 will be allowed. See https://bugs.python.org/issue9216 for more details. Some downstream python versions already support this parameter. To support these versions, a new encapsulation of md5() has been added. This encapsulation will pass through the usedforsecurity parameter in the case where the parameter is supported, and strip it if it is not. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-08-05Fixed #27590 -- Allowed customizing a manifest file storage in ↵Jarosław Wygoda
ManifestFilesMixin.
2021-07-29Fixed 32956 -- Lowercased spelling of "web" and "web framework" where ↵David Smith
appropriate.
2021-06-07Fixed #32716 -- Fixed ManifestStaticFilesStorage crash when ↵aryabartar
max_post_process_passes is 0.
2021-05-31Fixed #32319 -- Added ES module support to ManifestStaticFilesStorage.Gildardo Adrian Maravilla Jacome
2021-05-31Refs #32319 -- Changed HashedFilesMixin to use named groups in patterns.Gildardo Adrian Maravilla Jacome
2021-04-02Fixed #32383 -- Added source map support to ManifestStaticFilesStorage.Adam Johnson
2021-03-03Fixed #27854 -- Added system check for nonexistent directories in ↵Jacob Walls
STATICFILES_DIRS setting.
2021-03-03Refs #27854 -- Skipped subsequent checks if STATICFILES_DIRS is not a list ↵Jacob Walls
or tuple.
2021-03-01Refs #23919 -- Removed unneeded AttributeError catching in collectstatic's ↵Jacob Walls
link_file(). os.symlink() exists always on Python 3.2+.
2021-02-26Fixed #28607 -- Prevented duplicates in HashedFilesMixin post-processing ↵Jacob Walls
results. Thanks Ed Morley for the implementation idea.