I have deployed my Django project in Production all the things are ok but the media files are not being shown. Please help me.
I am using CPANEL
Talk Programming , Career, Mental Health, Talk Personal Finance ❤️ Post a query and receive responses ✅
Post a query and receive responses. Ask anything, Ask Mitra ❤️
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
okay so the problem is in your settings.py
where you need to mention where your static files and media files are stored.. and django will server them from mentioned path in production ..
these issues really leaves a headache while hosting in cpanel ..
follow this blog written by me here in askmitra blogs
How to Deploy Django Project in cPanel easily? – Ask Mitra
summarized explanation: after creating your project.. folder with same name is also created in your <domainname> folder.. create media folder inside that..
copy the path of media folder and place it in settings.py MEDIA_ROOT
anything will be uploaded and will be served from that path (MEDIA_ROOT) folder