1👍
did you set the STATIC_ROOT in your projects settings , then make collect static and add the folder name in apache conf.
eg :
STATIC_URL = '/static/'
STATIC_ROOT = root("statticstorage")
then if run python manage.py collect static the command will create a folder called static storage and all the styles (including admin css and etc) will copied from static folder , then make the root in to static storage in apache conf
1👍
I realized that I was mapping the static files incorrectly in apache.conf
The correct map to the files would be:
Alias /static /var/www/html/myproject/static
Note: Need to make sure that /static
doesn’t have a trailing slash in the above command
- [Answered ]-Pythonic method for Django loop
- [Answered ]-Tracking user web search history in Django
- [Answered ]-Django: Adding files to a form gives multiple argument error
Source:stackexchange.com