author | nishanth |
Mon, 07 Jun 2010 15:50:01 +0530 | |
branch | anoop |
changeset 70 | 58cafee2ee89 |
parent 49 | eccfa73e136b |
child 74 | 84179d1bdc7e |
permissions | -rw-r--r-- |
4 | 1 |
from django.db import models |
2 |
||
3 |
GENDER_CHOICES = (('M', "Male"), |
|
4 |
("F", "Female"), |
|
5 |
) |
|
6 |
||
29 | 7 |
PYTHON_KNOWLEDGE_CHOICES = (("1", "No clue what Python is"), |
8 |
("2", "I know for sure that Python is a language"), |
|
5 | 9 |
("3", "Solved some basic problems using Python"), |
29 | 10 |
("4", "Been using Python for quite some time"), |
11 |
("5", "Written production level code in Python"), |
|
5 | 12 |
) |
13 |
||
29 | 14 |
SAGE_KNOWLEDGE_CHOICES = (("1", "No clue what Sage is"), |
15 |
("2", "I know for sure that Sage is a language"), |
|
5 | 16 |
("3", "Solved some basic problems using Sage"), |
29 | 17 |
("4", "Been using Sage for quite some time"), |
18 |
("5", "Written production level code in Sage"), |
|
5 | 19 |
) |
20 |
||
34 | 21 |
TOPICS_CHOICES = (("1", "Cryptography"), |
22 |
("2", "Basic Algebra"), |
|
23 |
("3", "Calculus"), |
|
24 |
("4", "Arbitrary Precision Numerics"), |
|
25 |
("5", "Basic Plotting"), |
|
26 |
("6", "Number Theory"), |
|
27 |
("7", "Polynomials"), |
|
28 |
("8", "Combinatorics and Graph Theory"), |
|
19 | 29 |
) |
30 |
||
34 | 31 |
|
4 | 32 |
LIKELINESS_CHOICES = (('5', "Will attend at any cost"), |
33 |
('4', "Will attend most probably"), |
|
34 |
('3', "Unsure of attending"), |
|
35 |
('2', "Might not attend"), |
|
36 |
('1', "Will not attend"), |
|
37 |
) |
|
38 |
||
49 | 39 |
T_SHIRT_CHOICES = (("S","S"), |
40 |
("M","M"), |
|
41 |
("L","L"), |
|
42 |
("XL","XL"), |
|
43 |
) |
|
44 |
||
4 | 45 |
class Registrant(models.Model): |
46 |
""" A model to hold the details of registered users. |
|
47 |
""" |
|
48 |
||
6
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
49 |
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
|
50 |
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
|
51 |
email = models.EmailField() |
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
52 |
gender = models.CharField(max_length=1, choices=GENDER_CHOICES) |
49 | 53 |
t_shirt_size = models.CharField(max_length=2, choices=T_SHIRT_CHOICES, verbose_name="T-Shirt size") |
6
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
54 |
|
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
55 |
profession = models.CharField(max_length=20) |
19 | 56 |
affiliated_to = models.CharField(max_length=30, verbose_name="Affiliated Institution/Company") |
4 | 57 |
|
18 | 58 |
topics_interested = models.CharField(max_length=30, blank=True) |
4 | 59 |
|
6
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
60 |
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
|
61 |
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
|
62 |
|
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
63 |
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
|
64 |
tools_used = models.TextField(help_text="Ex: Scilab, Mathematica, Matlab etc.", verbose_name="Other tools used", blank=True) |
4 | 65 |
|
19 | 66 |
#address = models.TextField(help_text="To send DVD containing tutorials on Python if required.", blank=True) |
67 |
address = models.TextField(blank=True) |
|
15 | 68 |
phone_num = models.CharField(max_length=15, verbose_name="Phone Number", blank=True) |
45 | 69 |
acco_required = models.BooleanField(verbose_name="Need accomodation", default=False) |
4 | 70 |
|
45 | 71 |
priority_for_attending = models.CharField(max_length=1, default="3") |
72 |
selected_for_attending = models.BooleanField(default=False) |
|
73 |
||
6
3b3c5f11af8e
removed the required=True and added blank=True where it is required in models.py
nishanth
parents:
5
diff
changeset
|
74 |
likeliness_of_attending = models.CharField(max_length=1, choices=LIKELINESS_CHOICES) |
4 | 75 |