From 7962e722d396b8a840e4752a6c79f0f3870f5aea Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 7 Jun 2007 14:11:43 +0000 Subject: [PATCH] Adding HTTP 404 error page template - Legacy-Id: 250 --- ietf/templates/404.html | 35 +++++++++++++++++++++++++++++++++++ ietf/tests.py | 17 ++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 ietf/templates/404.html diff --git a/ietf/templates/404.html b/ietf/templates/404.html new file mode 100644 index 000000000..345b4bd66 --- /dev/null +++ b/ietf/templates/404.html @@ -0,0 +1,35 @@ +{% extends "base.html" %} + + +{% block content %} +
+ +
+ +

The Internet Engineering Task Force

+ + +
+ +
+
+

The page you are looking for cannot be found.


+If it is an Internet-Draft, the version may have expired.
+Please visit search.ietf.org and enter in keywords or the name of the draft without the version numbers. + +
+
+For other Web page issues, please contact webmaster@ietf.org.
+
+ +
Blue Line
+
+The IETF is an organized activity of the ISOC + +
+ +
+The IETF Secretariat is hosted by the NeuStar Secretariat Services, a wholly owned subsidiary of NeuStar Logo + + +{% endblock %} diff --git a/ietf/tests.py b/ietf/tests.py index a5f8e80e1..ccb6a479c 100644 --- a/ietf/tests.py +++ b/ietf/tests.py @@ -4,9 +4,14 @@ import traceback import django.test.simple from django.test import TestCase +from django.conf import settings +from django.db import connection import ietf.settings import ietf.urls + +startup_database = settings.DATABASE_NAME # The startup database name, before changing to test_... + def run_tests(module_list, verbosity=1, extra_tests=[]): module_list.append(ietf.urls) # If we append 'ietf.tests', we get it twice, first as itself, then @@ -60,7 +65,17 @@ class UrlTestCase(TestCase): self.testtuples += [ (codes, testurl, goodurl) ] self.testurls += [ testurl ] #print "(%s, %s, %s)" % (code, testurl, goodurl) - #print self.testtuples + # Use the default database for the url tests, instead of the test database + self.testdb = settings.DATABASE_NAME + connection.close() + settings.DATABASE_NAME = startup_database + connection.cursor() + + def tearDown(self): + # Revert to using the test database + connection.close() + settings.DATABASE_NAME = self.testdb + connection.cursor() def testCoverage(self): covered = []