Hi, my css and images load on the local but not on pythonanywhere. I've been trying to follow this answer but have some doubts:
my settings.py:
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
STATIC_URL = "/static/"
STATIC_ROOT = os.path.join(BASE_DIR, "static")
I'm unsure what to actually put in STATIC_ROOT
- do I take the path from my local ubuntu? i.e. the one starting with /mnt
?
Or do I just have to set the path in pythonanywhere? Can I edit files on the bash console?
When do I have to run manage.py collectstatic
? I've just run it once, to no effect.
project structure on local:
├── static
│ ├── css
│ │ └── blog.css
│ └── images
│ └── banner.png
├── templates
│ └── suquiwrites
│ └── home.html
The line in home.html goes <link rel="stylesheet" href="../../static/css/blog.css">
Thanks in advance!