1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00
Commit Graph

190 Commits

Author SHA1 Message Date
Tom Carrick
7264d7f750 Fixed syntax of CSS file used in tests. 2024-07-11 08:03:21 +02:00
Mariusz Felisiak
8719a6181e
Refs #22712 -- Corrected deprecation of "all" argument in django.contrib.staticfiles.finders.find().
Features deprecated in Django 5.2 should be removed in Django 6.1.
2024-06-28 08:39:55 -03:00
Andreu Vallbona
0fdcf1029c Fixed #22712 -- Avoided name shadowing of "all" in django.contrib.staticfiles.finders.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2024-06-27 23:37:12 -03:00
Adam Zapletal
107aa76bcf Fixed #29022 -- Fixed handling protocol-relative URLs in ManifestStaticFilesStorage when STATIC_URL is set to /. 2024-02-28 06:24:24 +01:00
Mariusz Felisiak
0c5456ef37
Used enterClassContext() where appropriate. 2024-01-04 05:55:29 +01:00
Mariusz Felisiak
d88ec42bd0
Used addCleanup() in tests where appropriate. 2023-12-31 10:01:31 +01:00
Mariusz Felisiak
f72f420f17 Refs #26029 -- Removed DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings.
This also removes django.core.files.storage.get_storage_class().

Per deprecation timeline.
2023-09-18 22:12:40 +02:00
Bruno Alla
4c4536f744 Refs #34712 -- Added system check for staticfiles storage in STORAGES setting.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Natalia Bidart <124304+nessita@users.noreply.github.com>
2023-08-31 08:21:44 +02:00
Hielke Walinga
fb535e0a90 Fixed #34496 -- Fixed handling source maps with data URI in ManifestStaticFilesStorage.
Regression in 781b44240a.
2023-04-21 05:42:06 +02:00
Mariusz Felisiak
e10c1688f9
Fixed #34322 -- Made ES module support to ManifestStaticFilesStorage optional.
Co-authored-by: Author: Claude Paroz <claude@2xlibre.net>
2023-03-18 14:05:41 +01:00
Claude Paroz
03bc92af97 Fixed #34407 -- Reported filename when decoding fails in collectstatic's post_process. 2023-03-12 16:54:20 +01:00
David Smith
097e3a70c1 Refs #33476 -- Applied Black's 2023 stable style.
Black 23.1.0 is released which, as the first release of the year,
introduces the 2023 stable style. This incorporates most of last year's
preview style.

https://github.com/psf/black/releases/tag/23.1.0
2023-02-01 11:04:38 +01:00
Jarosław Wygoda
32940d390a Refs #26029 -- Deprecated DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings. 2023-01-12 09:58:36 +01:00
Florian Apolloner
afa2e28205 Fixed #34235 -- Added ManifestFilesMixin.manifest_hash attribute.
This adds ManifestFilesMixin.manifest_hash attribute exposing a "hash"
of the full manifest. This allows applications to determine when their
static files have changed.
2023-01-02 09:53:52 +01:00
James Bligh
e44d348c99
Fixed #32319 -- Added ES module support to ManifestStaticFilesStorage.
Co-authored-by: James Bligh <james.bligh@silvercloudhealth.com>
2022-12-07 10:56:00 +01:00
Carlton Gibson
88e67a54b7 Added test for non-HTTP request on ASGIStaticFilesHandler. 2022-08-08 07:27:32 +02:00
Mariusz Felisiak
c18861804f Fixed warnings per flake8 5.0.0. 2022-07-31 08:16:19 +02:00
Florian Apolloner
e6f36ea0a9 Made HashedFilesMixin ignore URLs without a path. 2022-06-23 08:59:49 +02:00
Adam Johnson
00639dbd6d Refs #33765 -- Added tests for trailing whitespace in JavaScript source map references. 2022-06-03 20:07:35 +02:00
Carlton Gibson
bb61f0186d Refs #32365 -- Removed internal uses of utils.timezone.utc alias.
Remaining test case ensures that uses of the alias are mapped
canonically by the migration writer.
2022-03-24 06:29:50 +01:00
Adam Johnson
b811364421 Refs #33446 -- Allowed variable whitespace in CSS source map references.
Follow up to dc8bb35e39.

The Webpack default is to output CSS source map comments like
`/*# sourceMappingURL=main.css.map*/`. Also, Chromium allows tabs.
2022-03-04 06:22:28 +01:00
Mariusz Felisiak
7119f40c98 Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
django-bot
9c19aff7c7 Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
Claude Paroz
7c4f396509 Stopped including type="text/css" attributes for CSS link tags. 2022-01-22 16:38:14 +01:00
Adam Johnson
dc8bb35e39 Fixed #33446 -- Added CSS source map support to ManifestStaticFilesStorage. 2022-01-18 12:53:14 +01:00
Mariusz Felisiak
ba9ced3e9a
Fixed #33253 -- Reverted "Fixed #32319 -- Added ES module support to ManifestStaticFilesStorage."
This reverts commit 91e21836f6.

`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-05 12:11:18 +01:00
Carlton Gibson
4816dc9428 Fixed #33237 -- Fixed detecting source maps in ManifestStaticFilesStorage 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 781b44240a.
2021-11-04 20:28:35 +01:00
Jacob Walls
def09bf412 Fixed #27079 -- Avoided multiple setUpClass()/tearDownClass() calls in LiveServerTestCase tests. 2021-10-26 07:47:40 +02:00
Chris Jerdonek
faf6d48590 Removed reference to nonexistent collectstatic --exclude-dirs option. 2021-08-19 12:49:46 +02:00
Jarosław Wygoda
d3c4696596 Fixed #27590 -- Allowed customizing a manifest file storage in ManifestFilesMixin. 2021-08-05 12:40:34 +02:00
aryabartar
651e527f9b Fixed #32716 -- Fixed ManifestStaticFilesStorage crash when max_post_process_passes is 0. 2021-06-07 07:56:20 +02:00
Chris Jerdonek
7272e1963f Fixed #32821 -- Updated os.scandir() uses to use a context manager. 2021-06-07 06:52:42 +02:00
Gildardo Adrian Maravilla Jacome
91e21836f6 Fixed #32319 -- Added ES module support to ManifestStaticFilesStorage. 2021-05-31 11:09:48 +02:00
Gildardo Adrian Maravilla Jacome
781b44240a Refs #32319 -- Changed HashedFilesMixin to use named groups in patterns. 2021-05-31 10:40:21 +02:00
Mariusz Felisiak
65a9d0013d
Removed unused TestHashedFiles._max_post_process_passes.
Unused since f1894bae30
2021-05-06 12:26:25 +02:00
Adam Johnson
e32722d160 Fixed #32383 -- Added source map support to ManifestStaticFilesStorage. 2021-04-02 12:21:21 +02:00
Jacob Walls
b23232b6ab Fixed #27854 -- Added system check for nonexistent directories in STATICFILES_DIRS setting. 2021-03-03 11:27:08 +01:00
Mariusz Felisiak
7186c536c4 Used CollectionTestCase in FindersCheckTests tests. 2021-03-03 11:20:13 +01:00
Jacob Walls
337cd652a5 Fixed #28607 -- Prevented duplicates in HashedFilesMixin post-processing results.
Thanks Ed Morley for the implementation idea.
2021-02-26 11:38:32 +01:00
Chris Jerdonek
fc0069bfa5 Refs #32417 -- Improved cleaning up and fixed isolation of staticfiles_tests tests. 2021-02-15 10:23:54 +01:00
Markus Holtermann
50a5f8840f Refs #32394 -- Changed STATIC_URL/MEDIA_URL to relative paths in tests and docs where appropriate. 2021-02-06 13:41:35 +01:00
Mariusz Felisiak
8d7271578d Fixed CVE-2020-24583, #31921 -- Fixed permissions on intermediate-level static and storage directories on Python 3.7+.
Thanks WhiteSage for the report.
2020-09-01 09:17:23 +02:00
Joshua Massover
92309e53d9 Fixed #31594 -- Added ASGIStaticFilesHandler.get_response_async(). 2020-06-08 12:52:26 +02:00
Mariusz Felisiak
0668164b4a
Fixed E128, E741 flake8 warnings. 2020-05-12 08:52:23 +02:00
Hasan Ramezani
87faeee4e0 Fixed #31528 -- Made collectstatic management command run staticfiles checks. 2020-05-08 12:47:57 +02:00
Richard Campen
67b334fbaf Fixed #31517 -- Fixed HashedFilesMixin.hashed_name() if hash of the file is None. 2020-04-28 08:25:07 +02:00
Jon Dufresne
e703b93a65 Fixed #31080 -- Removed redundant type="text/javascript" attribute from <script> tags. 2019-12-11 09:49:54 +01:00
Jon Dufresne
77aa74cb70 Refs #29983 -- Added support for using pathlib.Path in all settings. 2019-11-07 10:26:22 +01:00
Jon Dufresne
39791c8e6d Harmonized Windows checks in tests to a single style. 2019-11-06 15:14:30 +01:00
pablo
fa8fe09e4e Fixed #30802 -- Prevented manifest creation when running collectstatic in dry run mode. 2019-09-27 23:01:41 +02:00