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

fix: make template_loader consider tuples for STATICFILES_DIRS #489

Conversation

alexandreMartinEcl
Copy link
Contributor

@alexandreMartinEcl alexandreMartinEcl commented May 7, 2024

fixes #476

Hoping to fix issue here

I suggested to use logger.warning and simply not to consider the STATICFILES_DIR value if the value is incorrect. But depends on your preference.

@alexandreMartinEcl alexandreMartinEcl force-pushed the fix/read-all-staticfiles-dir branch from 13c03fe to b851a34 Compare May 7, 2024 15:34
@JuroOravec
Copy link
Collaborator

@alexandreMartinEcl Looks good to me! I pushed one fix for a typing error.

One thing that remains - the tests fail for Python 3.8-3.10 somewhere around where we've added MagicMock or @patch()

See logs https://github.com/EmilStenstrom/django-components/actions/runs/8990294238/job/24695481406?pr=489

@alexandreMartinEcl
Copy link
Contributor Author

alexandreMartinEcl commented May 7, 2024

Indeed older version of python does not seem to appreciate my way to mock. It returns
'django_components.logger' is not a package on @patch("django_components.logger.logger.warning")

I'm trying another way, but did not find a quick way to test on python3.8

HAve you maybe also experienced a difficulty with mocking on old versions of python ?

edit : I spoke too fast, just found about pyenv in the readme

@JuroOravec JuroOravec merged commit d18aefc into EmilStenstrom:master May 7, 2024
6 checks passed
@JuroOravec
Copy link
Collaborator

@alexandreMartinEcl Thanks again, tests have been fixed, so I've merged it :) It is now avaiable in https://github.com/EmilStenstrom/django-components/releases/tag/0.73

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.

template_loader blocks on STATICFILES_DIRS if there are tuples
2 participants