summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2011-01-20 11:06:19 +0200
committerYuval Adam <yuv.adm@gmail.com>2011-01-20 11:06:19 +0200
commitf6b389233e2d8ac3b4d29322d86fceb2e2de7a37 (patch)
tree2228ea145cad6b89e6ce188694637633dbcf04db /main
initial commit
Diffstat (limited to 'main')
-rw-r--r--main/__init__.py0
-rw-r--r--main/models.py3
-rw-r--r--main/tests.py23
-rw-r--r--main/views.py7
4 files changed, 33 insertions, 0 deletions
diff --git a/main/__init__.py b/main/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/main/__init__.py
diff --git a/main/models.py b/main/models.py
new file mode 100644
index 0000000..71a8362
--- /dev/null
+++ b/main/models.py
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
diff --git a/main/tests.py b/main/tests.py
new file mode 100644
index 0000000..2247054
--- /dev/null
+++ b/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/main/views.py b/main/views.py
new file mode 100644
index 0000000..b0f1454
--- /dev/null
+++ b/main/views.py
@@ -0,0 +1,7 @@
+from django.http import HttpResponse
+from django.shortcuts import render_to_response
+from django.template import RequestContext
+import mptt
+
+def index(request):
+ return render_to_response('main.html', {}, context_instance=RequestContext(request)) \ No newline at end of file