nephila / django-app-helper

Helper for Django applications development
https://django-app-helper.readthedocs.io
GNU General Public License v2.0
30 stars 17 forks source link

Fix DEFAULT_FILE_STORAGE/STATICFILES_STORAGE in django 4.2 #256

Closed yakky closed 9 months ago

yakky commented 10 months ago

Description

Describe:

DEFAULT_FILE_STORAGE / STATICFILES_STORAGE are deprecated on django 4.2+

When using pytest-django (and in other circumstances) django settings are basically evaluated twice: one when triggering app_helper.utils._make_settings and one by pytest-django.

Adding legacy and new settings in the exclusion list in pytest compatibility function, we ensure only one setting is evaluated

References

Fix #255

Checklist

codecov[bot] commented 10 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (8adb36e) 92.24% compared to head (b1bf4ee) 92.30%.

Files Patch % Lines
app_helper/utils.py 96.42% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #256 +/- ## =========================================== + Coverage 92.24% 92.30% +0.06% =========================================== Files 10 10 Lines 799 806 +7 Branches 126 126 =========================================== + Hits 737 744 +7 Misses 24 24 Partials 38 38 ``` | [Flag](https://app.codecov.io/gh/nephila/django-app-helper/pull/256/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nephila) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/nephila/django-app-helper/pull/256/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nephila) | `92.30% <96.55%> (+0.06%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nephila#carryforward-flags-in-the-pull-request-comment) to find out more.

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