Thursday, July 6, 2017

Re: static files not found on development server

[Assuming the weird opening quote comma replacement is formatting, not actual code]

 

On Thursday 06 July 2017 11:03:19 Axel Rau wrote:

 

> Why do I get

> [06/Jul/2017 09:54:20] "GET /static/css/bootstrap.min.css HTTP/1.1"

> 404 1676 on development server, while on production server, it works.

>

> In production, I have

> <link href=„{{ STATIC_URL }}css/bootstrap.min.css" rel="stylesheet"

> media="screen">

 

On production, you're running a webserver that serves the `/static` url and have run `python manage.py collectstatic`.

 

On development, you're running a webserver that doesn't know the `/static` url or failed to run `python manage.py collectstatic`.

 

--

Melvyn Sopacua

No comments:

Post a Comment