502.html doesn't work in django
<p>When something goes wrong the server returns the default nginx 502 Server Error, I'd like to show my own server error page.</p>

<p>I put 502.html file to the template directory but it doesn't seem to work. It works for 404.html so I am sure I put it to the right directory.</p>

<p>Any ideas how to solve this problem or what could I miss?</p>