diff options
author | Primal Pappachan | 2012-02-16 19:42:37 +0530 |
---|---|---|
committer | Primal Pappachan | 2012-02-16 19:42:37 +0530 |
commit | b40dfc7f30086074b2faee2379a615f9cf466456 (patch) | |
tree | dbd596c584d8c9fb60941adaf38fd896597e0964 /allotter | |
parent | 9c1a06946d3ca75398bed727af7cb357a70e723e (diff) | |
download | aloha-b40dfc7f30086074b2faee2379a615f9cf466456.tar.gz aloha-b40dfc7f30086074b2faee2379a615f9cf466456.tar.bz2 aloha-b40dfc7f30086074b2faee2379a615f9cf466456.zip |
added allotter app
Diffstat (limited to 'allotter')
-rw-r--r-- | allotter/__init__.py | 0 | ||||
-rw-r--r-- | allotter/models.py | 36 | ||||
-rw-r--r-- | allotter/tests.py | 16 | ||||
-rw-r--r-- | allotter/views.py | 1 |
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. |