savoirfairelinux / sous-chef

Sous-Chef is a web application to help organizations to plan and deliver meals, and to manage clients files.
GNU Affero General Public License v3.0
67 stars 45 forks source link

Django DEBUG flag is always on #760

Closed kousu closed 7 years ago

kousu commented 7 years ago

Expected Behaviour

When run with production settings, Django's DEBUG flag should be off.

Actual Behaviour

It's on.

Steps to reproduce

$ docker-compose -f docker-compose.yml -f docker-compose.prod.yml up

go to http://localhost:8000/nonexistent/path/ and you get


Page not found (404)
Request Method:     GET
Request URL:    http://127.0.0.1:8000/nonexistent/path/

Using the URLconf defined in sous_chef.urls, Django tried these URL patterns, in this order:

    ^admin/
    ^meal/
    ^member/
    ^notification/
    ^order/
    ^p/
    ^$ [name='home']
    ^delivery/
    ^note/
    ^billing/
    ^avatar/
    ^media\/(?P<path>.*)$

The current path, nonexistent/path/ , didn't match any of these.

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
lingxiaoyang commented 7 years ago

@kousu Nice catch! That's embarrassing...

kousu commented 7 years ago

It's okay! There's all sorts of twisty little paths here, it's not surprising that some of the more obscure corners get missed sometimes.

Thanks for patching it :)