-
Notifications
You must be signed in to change notification settings - Fork 600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure generated file always contains a base name #861
Ensure generated file always contains a base name #861
Conversation
874a7b7
to
37ea2ca
Compare
…ash>.<ext> to <name>.<hash>.<ext> * The default name is set to output. This helps with Whitenoise integration as only files named as <name>.<hash>.<ext> will be considered immutable. * Use the block_name as the name if it's provided in the template tag. * When using single or multiple js/css files with no filters defined the basename of one of those files will be used for the name (this is existing behaviour). * Tests added and updated to support the name change.
37ea2ca
to
088efe2
Compare
hi! sorry for the late reply. i have rebased the branch and resolved the merge conflicts, and right now i'm updating more places in the documentation, i have just one question, see next comment... |
docs/usage.txt
Outdated
@@ -27,15 +27,15 @@ Which would be rendered something like: | |||
|
|||
.. code-block:: django | |||
|
|||
<link rel="stylesheet" href="/static/CACHE/css/f7c661b7a124.css" type="text/css" charset="utf-8"> | |||
<link rel="stylesheet" href="/static/CACHE/css/one.f7c661b7a124.css" type="text/css" charset="utf-8"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be output.
instead of one.
, right?
0e40280
to
42dea42
Compare
@mgjbroadbent thank you very much for your contribution! |
This changes the default output filename from [hash].[ext] to [name].[hash].[ext] in all cases.
This makes the output naming consistent with Whitenoise in all cases. This is because only files named as .. will be considered immutable, all other files will have the default 10 sec age set.
In addition, the user can customise the name using the block_name attribute.
This change was originally to solve #775, but this only changes the output naming convention.