--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sdi/models.py Sat May 29 09:16:38 2010 +0530
@@ -0,0 +1,38 @@
+from django.db import models
+
+GENDER_CHOICES = (('M', "Male"),
+ ("F", "Female"),
+ )
+
+LIKELINESS_CHOICES = (('5', "Will attend at any cost"),
+ ('4', "Will attend most probably"),
+ ('3', "Unsure of attending"),
+ ('2', "Might not attend"),
+ ('1', "Will not attend"),
+ )
+
+
+class Registrant(models.Model):
+ """ A model to hold the details of registered users.
+ """
+
+ first_name = models.CharField(max_length=30, required=True)
+ last_name = models.CharField(max_length=30, required=True)
+ email = models.EmailField(required=True)
+ gender = models.CharField(max_length=1, required=True, choices=GENDER_CHOICES)
+
+ profession = models.CharField(max_length=20, required=True)
+ affiliated_to = models.CharField(max_length=30, required=True)
+
+ topics_interested = models.TextField()
+ knowledge_of_python = models.TextField()
+ need_for_python_workshop = models.BooleanField()
+ knowledge_of_sage = models.TextField()
+
+ tools_used = models.TextField()
+
+ phone_num = models.CharField(max_length=15, required=True)
+ address = models.TextField()
+
+ likeliness_of_attending = models.CharField(max_length=1, required=True, choices=LIKELINESS_CHOICES)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sdi/tests.py Sat May 29 09:16:38 2010 +0530
@@ -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 Thu Jan 01 00:00:00 1970 +0000
+++ b/sdi/views.py Sat May 29 09:16:38 2010 +0530
@@ -0,0 +1,1 @@
+# Create your views here.
--- a/settings.py Sat May 29 08:47:34 2010 +0530
+++ b/settings.py Sat May 29 09:16:38 2010 +0530
@@ -78,6 +78,7 @@
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
+ 'sage_days.sdi',
)
APACHE_URL_PREFIX = "/sagedays/"