Added:
/src/checker/cc_frontend/web/tests.py
/src/checker/cc_frontend/web/views.py
Deleted:
/src/checker/cc_frontend/views.py
=======================================
--- /dev/null
+++ /src/checker/cc_frontend/web/tests.py Wed Nov 24 08:01:18 2010
@@ -0,0 +1,23 @@
+"""
+This file demonstrates two different styles of tests (one doctest and one
+unittest). These will both pass when you run "manage.py test".
+
+Replace these with more appropriate tests for your application.
+"""
+
+from django.test import TestCase
+
+class SimpleTest(TestCase):
+ def test_basic_addition(self):
+ """
+ Tests that 1 + 1 always equals 2.
+ """
+ self.failUnlessEqual(1 + 1, 2)
+
+__test__ = {"doctest": """
+Another way to test that 1 + 1 is equal to 2.
+
+>>> 1 + 1 == 2
+True
+"""}
+
=======================================
--- /dev/null
+++ /src/checker/cc_frontend/web/views.py Wed Nov 24 08:01:18 2010
@@ -0,0 +1,1 @@
+# Create your views here.
=======================================
--- /src/checker/cc_frontend/views.py Mon Nov 22 05:53:21 2010
+++ /dev/null
@@ -1,28 +0,0 @@
-from django.template import RequestContext
-import django.shortcuts
-import datetime, sys
-import settings
-import codechecker.contests.models
-# This is a wrapper function to render_to_response which will have global
-# variables that needs to be passed along with other context variables.
-# Request Context is also passed here This should ideally become a
decorator
-# for RequestContext. Will have to fix it as soon as I found it how.
-
-def render_to_response( request, *args, **kwargs ):
- #our custom dictionary with additional Parameters
- template = args[0]
- vars = args[1]
-
- vars['base_url'] = settings.BASE_URL
-
- #passing the request Context
- kwargs['context_instance'] = RequestContext( request )
-
- return django.shortcuts.render_to_response( template, vars, **kwargs )
-
-# Load the default Home page, About page, References page and a sample view
-def default( request, action = "base" ):
- template = action + '.html'
- vars = {}
- return render_to_response( request, template, vars )
-