# HG changeset patch # User nishanth # Date 1275127795 -19800 # Node ID 3932d9426c44efd4d7b4d5ad03fc3121909ca73f # Parent 7d587311a4b55fc3f384ebe0ca70b9fb59348d25 added the topics field in register form diff -r 7d587311a4b5 -r 3932d9426c44 sdi/forms.py --- a/sdi/forms.py Sat May 29 11:41:52 2010 +0530 +++ b/sdi/forms.py Sat May 29 15:39:55 2010 +0530 @@ -1,10 +1,12 @@ from django import forms -from sage_days.sdi.models import Registrant +from sage_days.sdi.models import Registrant, TOPICS_CHOICES class RegisterForm(forms.ModelForm): """ The form that is displayed to user. """ + topics_interested = forms.MultipleChoiceField(widget=forms.CheckboxSelectMultiple, choices=TOPICS_CHOICES) class Meta: model = Registrant + diff -r 7d587311a4b5 -r 3932d9426c44 sdi/models.py --- a/sdi/models.py Sat May 29 11:41:52 2010 +0530 +++ b/sdi/models.py Sat May 29 15:39:55 2010 +0530 @@ -18,6 +18,13 @@ ("1", "No clue what Sage is"), ) +TOPICS_CHOICES = (("1", "Topic 1"), + ("2", "Topic 2"), + ("3", "Topic 3"), + ("4", "Topic 4"), + ("5", "Topic 5"), + ) + LIKELINESS_CHOICES = (('5', "Will attend at any cost"), ('4', "Will attend most probably"), ('3', "Unsure of attending"), @@ -35,7 +42,7 @@ gender = models.CharField(max_length=1, choices=GENDER_CHOICES) profession = models.CharField(max_length=20) - affiliated_to = models.CharField(max_length=30) + affiliated_to = models.CharField(max_length=30, verbose_name="Affiliated Institution/Company") topics_interested = models.CharField(max_length=30, blank=True) @@ -45,7 +52,8 @@ knowledge_of_sage = models.CharField(max_length=1, choices=SAGE_KNOWLEDGE_CHOICES) tools_used = models.TextField(help_text="Ex: Scilab, Mathematica, Matlab etc.", verbose_name="Other tools used", blank=True) - address = models.TextField(help_text="To send DVD containing tutorials on Python if required.", blank=True) + #address = models.TextField(help_text="To send DVD containing tutorials on Python if required.", blank=True) + address = models.TextField(blank=True) phone_num = models.CharField(max_length=15, verbose_name="Phone Number", blank=True) likeliness_of_attending = models.CharField(max_length=1, choices=LIKELINESS_CHOICES)