-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
[feature] Added a Custom Static Storage #172
[feature] Added a Custom Static Storage #172
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Arsh0023 you will have to add django-compress-staticfiles~=1.0.1b
dependency in setup.py, here
Line 44 in 2f9066e
install_requires=['django-model-utils>=4.0.0,<4.1.0'], |
@Arsh0023 link the respective issue in the PR description. Also read the commit message style guidelines of OpenWISP.
Dependencies installed in |
@pandafy i have added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good progress @Arsh0023!
I am not entirely convinced the testing methodology here. But, I can't think of something better at the moment. I will share them later, but meanwhile you can address following requested changes.
Thanks @pandafy @nemesisdesign for the review i have tried to address the requested changes |
c38a79b
to
cadeb7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think only this is remaining: #172 (comment)
The rest looks good, what do you think @pandafy?
…P_STATICFILES_VERSIONED_EXCLUDE Fixed merging conflicts with the master
…#166 Ported changes from storage.py in ansible-openwisp2 to storage.py in openwisp_utils/. Created test_storage in tests/test_project/tests , The test creates a temporary folder and 2 text files in it and then runs collectstatic in that folder and checks whether the file hashed is correct or not and later deletes that folder.
…#166 Ported changes from storage.py in ansible-openwisp2 to storage.py in openwisp_utils/ Created test_storage in tests/test_project/tests , The test creates a temporary folder and 2 text files in it and then runs collectstatic in that folder and checks whether the file hashed is correct or not and later deletes that folder. Fixes openwisp#166
…#166 Ported changes from storage.py in ansible-openwisp2 to storage.py in openwisp_utils/ Created test_storage in tests/test_project/tests , The test creates a temporary folder and 2 text files in it and then runs collectstatic in that folder and checks whether the file hashed is correct or not and later deletes that folder. Fixes openwisp#166
Ported changes from storage.py in ansible-openwisp2 to storage.py in openwisp_utils/ . Added documentation and written test for CompressStaticFilesStorage in openwisp_utils.storage In documentation created a separate storage utilities section and in settings added OPENWISP_STATICFILES_VERSIONED_EXCLUDE. Created test_storage in tests/test_project/tests , The test creates a temporary folder and 2 text files in it and then runs collectstatic in that folder and checks whether the file hashed is correct or not and later deletes that folder. Added django-compress-staticfiles~=1.0.1b in install_requires in setup.py. Fixes openwisp#166
Co-authored-by: Gagan Deep <the.one.above.all.titan@gmail.com>
Co-authored-by: Gagan Deep <the.one.above.all.titan@gmail.com>
Ported changes from storage.py in ansible-openwisp2 to storage.py in openwisp_utils/ . Added documentation and written test for `CompressStaticFilesStorage` in openwisp_utils.storage In documentation created a separate storage utilities section and in settings added `OPENWISP_STATICFILES_VERSIONED_EXCLUDE`. Created test_storage in tests/test_project/tests , The test creates a temporary folder and 2 text files in it and then runs collectstatic in that folder and checks whether the file hashed is correct or not and later deletes that folder. Added `django-compress-staticfiles~=1.0.1b` in install_requires in setup.py. Fixes openwisp#166
Ported changes from storage.py in ansible-openwisp2 to storage.py in openwisp_utils/ . Added documentation and written test for `CompressStaticFilesStorage` in openwisp_utils.storage In documentation created a separate storage utilities section and in settings added `OPENWISP_STATICFILES_VERSIONED_EXCLUDE`. Created test_storage in tests/test_project/tests , The test creates a temporary folder and 2 text files in it and then runs collectstatic in that folder and checks whether the file hashed is correct or not and later deletes that folder. Added `django-compress-staticfiles~=1.0.1b` in install_requires in setup.py. Updated with requested changes. Fixes openwisp#166
Ported changes from storage.py in ansible-openwisp2 to storage.py in openwisp_utils/ That is added class CompressStaticFilesStorage which can exclude files based on OPENWISP_STATICFILES_VERSIONED_EXCLUDE. Added documentation and written test for CompressStaticFilesStorage in openwisp_utils.storage In documentation created a separate storage utilities section and in settings added OPENWISP_STATICFILES_VERSIONED_EXCLUDE. Created test_storage in tests/test_project/tests , The test creates a temporary folder and 2 text files in it and then runs collectstatic in that folder and checks whether the file hashed is correct or not and later deletes that folder. Added django-compress-staticfiles~=1.0.1b in install_requires in setup.py. Fixes openwisp#166
cadeb7a
to
9e11834
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @Arsh0023!
I have some minor request for changes, see my comment below, and one request for the commit message: such long commit messages are not needed for minor features like these.
Please make it shorter, and use [feature]
for the prefix, since we're adding new functionality to the module and we are adopting conventional commit style messages.
`CompressStaticFilesStorage` is added in storage.py which can exclude files based on `OPENWISP_STATICFILES_VERSIONED_EXCLUDE`. Added Documetation and tests for the above. Fixes openwisp#166
ba067f9
to
c976c1c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @nemesisdesign and @pandafy 👍🤘 |
Next step for this subject: openwisp/ansible-openwisp2#266 |
Ported changes from storage.py in ansible-openwisp2 to storage.py in openwisp_utils/
Added documentation and written test for
CompressStaticFilesStorage
in openwisp_utils.storageIn documentation created a separate storage utilities section and in settings added
OPENWISP_STATICFILES_VERSIONED_EXCLUDE
.Created test_storage in tests/test_project/tests , The test creates a temporary folder and 2 text files in it and then runs collectstatic in that folder and checks whether the file hashed is correct or not and later deletes that folder.
Fixes #166