[Django]-Css static file in pythonanywhere not found

4👍

On your own local system static files will be served by the django dev server. In a production setting like PythonAnywhere, you need to set the STATIC_ROOT in your settings.py, eg: /home/yourusername/myproject/static

and then run python manage.py collectstatic which will collect static files from your app folders and put them in there

0👍

In your template code remove the space from:

 (% static    '  css/style.css' %)
               |
               |
               |
               |
             #this one

Leave a comment