Skip to content

Deduplicate staticfiles #2155

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

Merged
merged 2 commits into from
Jul 15, 2025

Conversation

matthiask
Copy link
Member

@matthiask matthiask commented Jul 15, 2025

Description

Currently, the staticfiles panel contains one entry per static() call. That's not the same thing as used staticfiles, since assets can be deduplicated in multiple ways, e.g. through forms.Media or because the browser actually understands that it should load <script type="module"> once only.

I think it makes more sense to show a deduplicated and sorted list of static files used.

Refs matthiask/django-prose-editor#48

Checklist:

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

Copy link
Member

@tim-schilling tim-schilling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense and looks good!

@matthiask matthiask merged commit afd5e7e into django-commons:main Jul 15, 2025
25 checks passed
@matthiask
Copy link
Member Author

Thanks!

@matthiask matthiask deleted the mk/staticfile-deduplication branch July 15, 2025 11:02
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.

2 participants