Skip to content

Commit 7962e72

Browse files
committed
Adding HTTP 404 error page template
- Legacy-Id: 250
1 parent edc55bc commit 7962e72

2 files changed

Lines changed: 51 additions & 1 deletion

File tree

ietf/templates/404.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{% extends "base.html" %}
2+
3+
4+
{% block content %}
5+
<center>
6+
<img src="http://www.ietf.org/images/ietflogo2e.gif" height="160" width="280">
7+
<br clear=all>
8+
9+
<center><h1>The Internet Engineering Task Force</h1></center>
10+
<table border=0 cellspacing=5 cellpadding=5>
11+
12+
<br>
13+
<font size = 3>
14+
<center><img alt="" src="http://www.ietf.org/images/blue-line.jpg"></center>
15+
<br clear=all>
16+
<h3>The page you are looking for cannot be found.</h3><br>
17+
If it is an Internet-Draft, the version may have expired.<br>
18+
Please visit <A HREF="http://search.ietf.org"> search.ietf.org</A> and enter in keywords or the name of the draft without the version numbers.
19+
20+
<br>
21+
<br>
22+
For other Web page issues, please contact <a href="mailto:webmaster@ietf.org">webmaster@ietf.org</a>. <br>
23+
<br>
24+
<font size = 3>
25+
<center><img alt="Blue Line" src="http://www.ietf.org/images/blue-line.jpg"></center>
26+
<br clear=all>
27+
The IETF is an organized activity of the <a href="http://www.isoc.org"><img alt="ISOC" src="http://www.ietf.org/images/isoc-small.gif" hspace="3" border="0"></A>
28+
29+
<br>
30+
31+
<hr>
32+
<i>The <A HREF="/secretariat.html">IETF Secretariat</A> is hosted by the NeuStar Secretariat Services, a wholly owned subsidiary of <a href="http://www.neustar.biz/"><img src="http://www.ietf.org/images/NS_logo_100px.gif" alt="NeuStar Logo" border="0">
33+
34+
</i>
35+
{% endblock %}

ietf/tests.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44

55
import django.test.simple
66
from django.test import TestCase
7+
from django.conf import settings
8+
from django.db import connection
79
import ietf.settings
810
import ietf.urls
911

12+
13+
startup_database = settings.DATABASE_NAME # The startup database name, before changing to test_...
14+
1015
def run_tests(module_list, verbosity=1, extra_tests=[]):
1116
module_list.append(ietf.urls)
1217
# If we append 'ietf.tests', we get it twice, first as itself, then
@@ -60,7 +65,17 @@ def setUp(self):
6065
self.testtuples += [ (codes, testurl, goodurl) ]
6166
self.testurls += [ testurl ]
6267
#print "(%s, %s, %s)" % (code, testurl, goodurl)
63-
#print self.testtuples
68+
# Use the default database for the url tests, instead of the test database
69+
self.testdb = settings.DATABASE_NAME
70+
connection.close()
71+
settings.DATABASE_NAME = startup_database
72+
connection.cursor()
73+
74+
def tearDown(self):
75+
# Revert to using the test database
76+
connection.close()
77+
settings.DATABASE_NAME = self.testdb
78+
connection.cursor()
6479

6580
def testCoverage(self):
6681
covered = []

0 commit comments

Comments
 (0)