Reputation: 63
I am using DigitalOcean to serve my static files for my website. I have used Django and Postgres for database. I deployed my site with a DigitalOcean droplet, uploaded my static files in the DigitalOcean Spaces (I verified that they are indeed there), and updated my settings.py code to update my database information. CDN is enabled and CORS is configured.
I tested the site using gunicorn (step 7 of tutorial), but my website is still simply html text with no css styling from my static files.
When I clicked "inspect element > sources" I can see that href is indeed https://[my DigitalOcean Spaces information]
What else do I need to update to be able to serve my static files?
Upvotes: 1
Views: 812
Reputation: 11
I know typically in Django you have to collect static files after deploying. When you said you uploaded your static files, did you also run:
manage.py collectstatic
Perhaps try running that command and let django pull all the static files into the correct directory.
Upvotes: 1