20542 update doc string

This commit is contained in:
Arthur
2025-10-10 10:46:46 -07:00
parent e5174bb723
commit afa25607ed

View File

@@ -139,9 +139,14 @@ def static_with_params(path, **params):
""" """
Generate a static URL with properly appended query parameters. Generate a static URL with properly appended query parameters.
This template tag handles the case where static files are served from AWS S3 or other The original Django static tag doesn't properly handle appending new parameters to URLs
CDNs that already include query parameters in the URL. It properly appends additional that already contain query parameters, which can result in malformed URLs with double
query parameters without creating double question marks. question marks. This template tag handles the case where static files are served from
AWS S3 or other CDNs that automatically append query parameters to URLs.
This implementation correctly appends new parameters to existing URLs and checks for
parameter conflicts. A warning will be logged if any of the provided parameters
conflict with existing parameters in the URL.
Args: Args:
path: The static file path (e.g., 'setmode.js') path: The static file path (e.g., 'setmode.js')
@@ -149,6 +154,10 @@ def static_with_params(path, **params):
Returns: Returns:
A properly formatted URL with query parameters. A properly formatted URL with query parameters.
Note:
If any provided parameters conflict with existing URL parameters, a warning
will be logged and the new parameter value will override the existing one.
""" """
# Get the base static URL # Get the base static URL
static_url = static(path) static_url = static(path)