วันอังคารที่ 30 กรกฎาคม พ.ศ. 2556

Django Sample Template 500 & 404

detail here >> http://david.feinzeig.com/blog/2012/02/18/tips-for-creating-404-page-not-found-and-500-server-error-templates-in-django-plus-configuring-email-alerts/

500.html (for server error)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
 <title>Page unavailable</title>
</head>

<body>
 <h1>Page unavailable</h1>

 <p>Sorry, but the requested page is unavailable due to a server hiccup.</p>

 <p>Our engineers have been notified, so check back later.</p>
</body>

</html>

404.html (for page not found)
{% extends "base.html" %}
{% load i18n %}

{% block title %}Page not found{% endblock %}

{% block content %}
<h1>Page not found</h1>

<p>Sorry, but the requested page could not be found.</p>
{% endblock %}

ไม่มีความคิดเห็น:

แสดงความคิดเห็น