author | nishanth |
Sat, 29 May 2010 10:32:09 +0530 | |
changeset 15 | 1c2d2e702aee |
parent 12 | 3d333517e3c7 |
child 18 | 7d587311a4b5 |
permissions | -rw-r--r-- |
4 | 1 |
from django.db import models |
2 |
||
3 |
GENDER_CHOICES = (('M', "Male"), |
|
4 |
("F", "Female"), |
|
5 |
) |
|
6 |
||
5 | 7 |
PYTHON_KNOWLEDGE_CHOICES = (("5", "Written production level code in Python"), |
8 |
("4", "Been using Python for quite some time"), |
|
9 |
("3", "Solved some basic problems using Python"), |
|
10 |
("2", "I know for sure that Python is a language"), |
|
11 |
("1", "No clue what Python is"), |
|
12 |
) |
|
13 |
||
14 |
SAGE_KNOWLEDGE_CHOICES = (("5", "Written production level code in Sage"), |
|
15 |
("4", "Been using Sage for quite some time"), |
|
16 |
("3", "Solved some basic problems using Sage"), |
|
17 |
("2", "I know for sure that Sage is a language"), |
|
18 |
("1", "No clue what Sage is"), |
|
19 |
) |
|
20 |
||
4 | 21 |
LIKELINESS_CHOICES = (('5', "Will attend at any cost"), |
22 |
('4', "Will attend most probably"), |
|
23 |
('3', "Unsure of attending"), |
|
24 |
('2', "Might not attend"), |
|
25 |
('1', "Will not attend"), |
|
26 |
) |
|
27 |
||
28 |
class Registrant(models.Model): |
|
29 |
""" A model to hold the details of registered users. |
|
30 |
""" |
|
31 |
||
6
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
32 |
first_name = models.CharField(max_length=30) |
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
33 |
last_name = models.CharField(max_length=30) |
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
34 |
email = models.EmailField() |
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
35 |
gender = models.CharField(max_length=1, choices=GENDER_CHOICES) |
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
36 |
|
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
37 |
profession = models.CharField(max_length=20) |
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
38 |
affiliated_to = models.CharField(max_length=30) |
4 | 39 |
|
6
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
40 |
topics_interested = models.CharField(max_length=30) |
4 | 41 |
|
6
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
42 |
knowledge_of_python = models.CharField(max_length=1, choices=PYTHON_KNOWLEDGE_CHOICES) |
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
43 |
need_for_python_workshop = models.BooleanField(verbose_name="Do you need a workshop on Python before you attend Sage Days") |
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
44 |
|
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
45 |
knowledge_of_sage = models.CharField(max_length=1, choices=SAGE_KNOWLEDGE_CHOICES) |
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
46 |
tools_used = models.TextField(help_text="Ex: Scilab, Mathematica, Matlab etc.", verbose_name="Other tools used", blank=True) |
4 | 47 |
|
15 | 48 |
address = models.TextField(help_text="To send DVD containing tutorials on Python if required.", blank=True) |
49 |
phone_num = models.CharField(max_length=15, verbose_name="Phone Number", blank=True) |
|
4 | 50 |
|
6
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
51 |
likeliness_of_attending = models.CharField(max_length=1, choices=LIKELINESS_CHOICES) |
4 | 52 |