django-admin-interface icon indicating copy to clipboard operation
django-admin-interface copied to clipboard

384: Make nocache optional

Open jcarizza opened this issue 1 year ago • 3 comments


name: Make nocache optional about: Ignore nocache based in a settings flag to not corrupt the S3 querysting signed URL assignees: fabiocaccamo


Describe your changes

  • Added a setting flag
  • Change templates to not include md5 hash

Related issue https://github.com/fabiocaccamo/django-admin-interface/issues/384

Checklist before requesting a review

  • [x] I have performed a self-review of my code.
  • [x] I have added tests for the proposed changes.
  • [x] I have run the tests and there are not errors.

jcarizza avatar Apr 25 '24 18:04 jcarizza

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.39%. Comparing base (3293bea) to head (566bc8b). Report is 18 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #385      +/-   ##
==========================================
+ Coverage   97.35%   97.39%   +0.04%     
==========================================
  Files          38       38              
  Lines         416      423       +7     
==========================================
+ Hits          405      412       +7     
  Misses         11       11              
Flag Coverage Δ
unittests 97.39% <100.00%> (+0.04%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 25 '24 18:04 codecov[bot]

Hi @fabiocaccamo

Sorry I sent the PR before a previous discussion, I needed to fix that ASAP in my application.

I think this solution would be less intrusive and simpliest.

The new template tag will check if the files are the default django storage or if they start with STATIC_URL and add or remove the nocache tag.

jcarizza avatar May 20 '24 19:05 jcarizza

@jcarizza any update?

fabiocaccamo avatar Jun 23 '24 14:06 fabiocaccamo