4
|
1 |
from django.db import models
|
|
2 |
|
|
3 |
GENDER_CHOICES = (('M', "Male"),
|
|
4 |
("F", "Female"),
|
|
5 |
)
|
|
6 |
|
|
7 |
LIKELINESS_CHOICES = (('5', "Will attend at any cost"),
|
|
8 |
('4', "Will attend most probably"),
|
|
9 |
('3', "Unsure of attending"),
|
|
10 |
('2', "Might not attend"),
|
|
11 |
('1', "Will not attend"),
|
|
12 |
)
|
|
13 |
|
|
14 |
|
|
15 |
class Registrant(models.Model):
|
|
16 |
""" A model to hold the details of registered users.
|
|
17 |
"""
|
|
18 |
|
|
19 |
first_name = models.CharField(max_length=30, required=True)
|
|
20 |
last_name = models.CharField(max_length=30, required=True)
|
|
21 |
email = models.EmailField(required=True)
|
|
22 |
gender = models.CharField(max_length=1, required=True, choices=GENDER_CHOICES)
|
|
23 |
|
|
24 |
profession = models.CharField(max_length=20, required=True)
|
|
25 |
affiliated_to = models.CharField(max_length=30, required=True)
|
|
26 |
|
|
27 |
topics_interested = models.TextField()
|
|
28 |
knowledge_of_python = models.TextField()
|
|
29 |
need_for_python_workshop = models.BooleanField()
|
|
30 |
knowledge_of_sage = models.TextField()
|
|
31 |
|
|
32 |
tools_used = models.TextField()
|
|
33 |
|
|
34 |
phone_num = models.CharField(max_length=15, required=True)
|
|
35 |
address = models.TextField()
|
|
36 |
|
|
37 |
likeliness_of_attending = models.CharField(max_length=1, required=True, choices=LIKELINESS_CHOICES)
|
|
38 |
|