Wednesday, July 4, 2012

Re: custom500 page does not show up ?

Hi Melvyn,


The interesting thing is 404.html is working but not 500.html.
In settings paths are dynamically set. Also i am receiving the error messages on my email as i am the admin.
Let say there is some syntax error so in the email it will give me information about that but without displaying 500 page.

I am  amazed then why 404 is working.


On Wed, Jul 4, 2012 at 11:28 PM, Melvyn Sopacua <m.r.sopacua@gmail.com> wrote:
On 4-7-2012 19:08, Nikhil Verma wrote:
> Hi Melvyn
>
>
>
> [ ] Make sure your custom page is not sent with tools like netcat,
> telnet or curl.
>
> i did not turn anything its a simple custom page.

Sorry I worded that rather bad. Your goal is to connect to the page that
triggers a 500 error with one of the tools I mentioned so you can see
the actual response, not what your browser shows you as the browser
could be showing you it's own "server error" page.

> [ ] Make sure your custom page is not generating a 500 error by itself
>
> {% extends 'base.html' %}
>
> {% block title %}
> 500 - Server Error
> {% endblock %}
>
> {% block content %}
>     <h1>Sorry, there was an error</h1>
>
>     <h2>
>         <p>
>             We've encountered a problem.
>         </p>
>         <br/>
>
>         <p>
>             We apologize for any inconvenience this has caused you.
>             Citysom is undergoing constant improvement.
>             We hope that you will not have problems in the future.
>         </p>
>         <br/>
>     </h2>
> {% endblock %}

Of course, you can still have the error in base.html.

> [ ] If the logger has been turned off, turn it back on and read the
> email sent to the admin address.
>
> I have not put any log.

See settings.py, the bottom part. If debug is set to 'off', 500 errors
are mailed to the DJANGO_ADMIN.

> The interesting part is everything is working properly in my local machine.

[ ] Make sure that absolute paths in settings.py point to actual
directories on the production server.
--
Melvyn Sopacua


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.




--
Regards
Nikhil Verma
+91-958-273-3156

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment