summaryrefslogtreecommitdiff
path: root/allotter
diff options
context:
space:
mode:
authorPrimal Pappachan2012-02-16 19:42:37 +0530
committerPrimal Pappachan2012-02-16 19:42:37 +0530
commitb40dfc7f30086074b2faee2379a615f9cf466456 (patch)
treedbd596c584d8c9fb60941adaf38fd896597e0964 /allotter
parent9c1a06946d3ca75398bed727af7cb357a70e723e (diff)
downloadaloha-b40dfc7f30086074b2faee2379a615f9cf466456.tar.gz
aloha-b40dfc7f30086074b2faee2379a615f9cf466456.tar.bz2
aloha-b40dfc7f30086074b2faee2379a615f9cf466456.zip
added allotter app
Diffstat (limited to 'allotter')
-rw-r--r--allotter/__init__.py0
-rw-r--r--allotter/models.py36
-rw-r--r--allotter/tests.py16
-rw-r--r--allotter/views.py1
4 files changed, 53 insertions, 0 deletions
diff --git a/allotter/__init__.py b/allotter/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/allotter/__init__.py
diff --git a/allotter/models.py b/allotter/models.py
new file mode 100644
index 0000000..4b426e0
--- /dev/null
+++ b/allotter/models.py
@@ -0,0 +1,36 @@
+from django.db import models
+
+from datetime import datetime
+
+class Options(models.Model):
+ opt_name = models.CharField(max_length=100,
+ verbose_name=u"Option name",
+ help_text=u"Name of Option/Stream")
+
+
+class Exam(models.Model):
+ exam_code = models.CharField(max_length=100,
+ verbose_name=u"Examination code",
+ help_text=u"Unique code for the examination")
+ exam_name = models.CharField(max_length=100,
+ verbose_name=u"Examination name",
+ help_text=u"Subject name of the examination")
+ option_available = models.ForeignKey("Options",
+ default=1)
+
+ def __unicode__(self):
+ return self.exam_name
+
+
+class Student(models.Model):
+ name = models.CharField(max_length=1024, verbose_name=u"Name",
+ help_text=u"Name given in the application")
+ dob = models.DateTimeField(verbose_name=u"Date of Birth",
+ help_text=u"Date of birth as given in the application")
+ created = models.DateTimeField(auto_now_add=True)
+ exam_taken = models.ForeignKey("Exam", default=1)
+
+
+ def __unicode__(self):
+ return self.name
+
diff --git a/allotter/tests.py b/allotter/tests.py
new file mode 100644
index 0000000..501deb7
--- /dev/null
+++ b/allotter/tests.py
@@ -0,0 +1,16 @@
+"""
+This file demonstrates writing tests using the unittest module. These will pass
+when you run "manage.py test".
+
+Replace this 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.assertEqual(1 + 1, 2)
diff --git a/allotter/views.py b/allotter/views.py
new file mode 100644
index 0000000..60f00ef
--- /dev/null
+++ b/allotter/views.py
@@ -0,0 +1 @@
+# Create your views here.