I can't find jquery.js file in my Django project
So I've been having an error in my Django project, which happens when I turn off the Debug
and run the project. (I'm using django-cloudinary-storage
library.)
I was digging into the issue, and found out that there was no admin/js/jquery.js file in my staticfiles folder. All the other static files are located in the folder, and hashed as they all should be.
But I can't find the admin/js/jquery.js file, and this is causing problem in hashed_name
function in HashedCloudinaryMixin
class, saying absolute_path
is None
.
(The exact error message is : TypeError: expected str, bytes or os.PathLike object, not NoneType)
So how do I add the admin/js/jquery.js file and hash so it can be uploaded to cloudinary? And why does this happen when Debug=False
?
Does anyone have idea on how to fix the problem? Thanks.
Answers
-
There is a Cloudinary sample project for Django that demonstrates how to upload images from your application to your Cloudinary Media Library account here at this link: https://github.com/cloudinary/cloudinary-django-sample
Kindly ensure to fork as well the accompanying
pycloudinary
project that can be found at this link: https://github.com/cloudinary/pycloudinaryThe readMe instruction in the
cloudinary-django-sample
project provides the preparatory steps before launching the application.The
django-cloudinary-storage
is a third-party application and configuration information is provided in GitHub: see https://github.com/klis87/django-cloudinary-storage/blob/master/README.md#installation0