I’ve just created a Unbuntu 14.04 x64 droplet with Django - but the media/static files seem to be missing from the install.
There are no folders in /home/django/django_project/django_project
- both the ‘static’ and ‘media’ folders (and contents) are missing.
Therefor admin interface are missing the CSS and image files.
Where can I locate the missing files ?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
Make sure that
django.contrib.admin
is included inINSTALLED_APPS
in yoursettings.py
file. Then runpython manage.py collectstatic
This will collect all of the static files for included apps into one directory defined bySTATIC_ROOT
so that you can serve them with a webserver like Nginx.See the Django documentation for more details.
hello i had the same problem. first I found the correct direction of my static folder by typing ‘pwd’. After that I created a local_setting.py by typing nano local_settings.py and I modified the static direction with right direction I found early I pasted and saved the file