summaryrefslogtreecommitdiff
path: root/demo/main
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2011-03-19 22:15:12 +0200
committerYuval Adam <yuv.adm@gmail.com>2011-03-19 22:15:12 +0200
commitb454a79d106d256f7eea8d0e23567e613928bab5 (patch)
tree34972655b02eefc9a0be7bbf22da8ff632e2ea92 /demo/main
parentdf5544cfe638bc2246f6821e6089dec7c1ad2494 (diff)
and it worked
Diffstat (limited to 'demo/main')
-rw-r--r--demo/main/__init__.py0
-rw-r--r--demo/main/models.py3
-rw-r--r--demo/main/tests.py23
-rw-r--r--demo/main/views.py5
4 files changed, 31 insertions, 0 deletions
diff --git a/demo/main/__init__.py b/demo/main/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/demo/main/__init__.py
diff --git a/demo/main/models.py b/demo/main/models.py
new file mode 100644
index 0000000..71a8362
--- /dev/null
+++ b/demo/main/models.py
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
diff --git a/demo/main/tests.py b/demo/main/tests.py
new file mode 100644
index 0000000..2247054
--- /dev/null
+++ b/demo/main/tests.py
@@ -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
+"""}
+
diff --git a/demo/main/views.py b/demo/main/views.py
new file mode 100644
index 0000000..8e71fa8
--- /dev/null
+++ b/demo/main/views.py
@@ -0,0 +1,5 @@
+from django.shortcuts import render_to_response
+from django.template import RequestContext
+
+def index(request):
+ return render_to_response('main.html', {}, context_instance=RequestContext(request)) \ No newline at end of file