Skip to content
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

Refs #2068: Do not reinstantiate staticfiles storage classes #2069

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

matthiask
Copy link
Member

@matthiask matthiask commented Feb 6, 2025

Description

This change might address an issue where reinstantiating the staticfiles class inside our staticfiles panel would lose some attributes of the storage instance.

Fixes #2068

Checklist:

  • I have added the relevant tests for this change.
  • I have added an item to the Pending section of docs/changes.rst.

@tim-schilling
Copy link
Member

@matthiask would it be possible to wrap the url method on the storage class without having to create a new class?

@matthiask
Copy link
Member Author

@tim-schilling Yes, I think we could directly monkey-patch the url method on the static files storage instance. Do you think that would be preferrable to the Mixin injection? I can see how a straightforward monkeypatch might be easier to understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Version 5.0 breaks collectstatic when using some storage backends
2 participants