This is very very weird.
On my dev machine, everything seems fine when I set DEBUG=True, but If I turn it off, it then breaks.
I can see the requested URLs are exactly same. What are the possible reasons for this?
In url
+ static("static", document_root= STATIC_ROOT )
The STATIC_ROOT is the absolute path to static folder, it’s all right, cost it works when debug is turned on.
From Django docs regarding serving static files in development:
In short, if you are using devserver and
DEBUGisFalse, static files won’t be served.