In debug bug, it actually works and do not raise an exception, but in non-debug mode, it tries to search the staticfiles manifest for the file. If there is no manifest because collectstatic has not been run before, this fails.