SpearPhisher icon indicating copy to clipboard operation
SpearPhisher copied to clipboard

Static assets missing

Open Meatballs1 opened this issue 9 years ago • 9 comments

Cant retrieve anything under /static/3rd-party like css, js files.

Meatballs1 avatar Jul 08 '15 12:07 Meatballs1

What error Code are you getting in the console?

kevthehermit avatar Jul 08 '15 13:07 kevthehermit

GET /static/3rd-party/botstrap/css/bootstrap.min.css HTTP/1.1" 404 122

Meatballs1 avatar Jul 08 '15 14:07 Meatballs1

Doesn't look like these have been pushed to the remote repo?

Meatballs1 avatar Jul 08 '15 14:07 Meatballs1

They are in the repo.

Your error msg looks like i have a typo botstrap instead of bootstrap. Just trying to find it in the templates

kevthehermit avatar Jul 08 '15 14:07 kevthehermit

Just Cloned a copy to a new box. Looks ok for me.

[08/Jul/2015 14:57:14]"GET /static/3rd-party/bootstrap/css/bootstrap.min.css HTTP/1.1" 200 117150

kevthehermit avatar Jul 08 '15 14:07 kevthehermit

That maybe my typo as copy and paste not working from HyperV. Will take another look!

Meatballs1 avatar Jul 08 '15 19:07 Meatballs1

Hi kev, I worked it out:

Serving the files

In addition to these configuration steps, you’ll also need to actually serve the static files.

During development, if you use django.contrib.staticfiles, this will be done automatically by runserver when DEBUG is set to True (see django.contrib.staticfiles.views.serve()).

This method is grossly inefficient and probably insecure, so it is unsuitable for production.

I was running with Debug set to False, this prevented the files being served. Setting debug back to true means they are delivered.

Meatballs1 avatar Jul 09 '15 08:07 Meatballs1

Of course, Now you say it, it makes sense. Thanks.

In this instance i think its easier just to stick in debug mode and have the development server serve the static files. Its not designed to be a large scale production platform serving a lot of users anyway.

Or set the Web Panel to use mod wsgi as well.

kevthehermit avatar Jul 09 '15 10:07 kevthehermit

Updated the Install Instructions to stay in debug mode for now.

kevthehermit avatar Jul 09 '15 17:07 kevthehermit