whitenoise icon indicating copy to clipboard operation
whitenoise copied to clipboard

Nice 404 error message

Open boxed opened this issue 3 years ago • 2 comments

Hi,

I help beginners a lot on the Unofficial Django Discord, and a very common problem is various problems with static files. I always ask them to install whitenoise obviously, but then I realized that whitenoise doesn't have great error messages for when they have other problems than just "set DEBUG=False" :P

This patch will make the error message much more informative and should help beginners a lot when trying to figure out why their static files don't work.

(This is sort of related to my other work with django-fastdev but this specific change made more sense in whitenoise I thought)

boxed avatar Feb 13 '22 20:02 boxed

Aha. I didn't know that. I will rethink this.

boxed avatar Feb 14 '22 05:02 boxed

I've redone this so it applies to django only. I couldn't really understand how I'd do it in a more generic way.

There are now tests, and a changelog entry.

Not sure what you want from the docs? It doesn't seem like it's a thing that needs documentation per se.

boxed avatar Feb 19 '22 09:02 boxed