Skip to content

Commit

Permalink
c3 made optional. a5 choices added.
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnamadhavan committed Sep 13, 2019
1 parent 4e2f399 commit ffd1ed5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
23 changes: 23 additions & 0 deletions questionnaire/migrations/0006_auto_20190913_2251.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 2.2.5 on 2019-09-13 22:51

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('questionnaire', '0005_auto_20190912_1647'),
]

operations = [
migrations.AlterField(
model_name='survey',
name='a5',
field=models.TextField(blank=True, choices=[('Saidapet', 'Saidapet'), ('Perambur', 'Perambur'), ('Thiru Vi Ka Nagar (SC)', 'Thiru Vi Ka Nagar (SC)'), ('Harbour', 'Harbour'), ('Vellore', 'Vellore'), ('Tiruppatur', 'Tiruppatur'), ('Arkonam (SC)', 'Arkonam (SC)'), ('Gudiyattam (SC)', 'Gudiyattam (SC)'), ('Omalur', 'Omalur'), ('Mettur', 'Mettur'), ('Yarcard (ST)', 'Yarcard (ST)'), ('Sankari', 'Sankari'), ('Nagapptinam', 'Nagapptinam'), ('Kilvelur (SC)', 'Kilvelur (SC)'), ('Myladuthurai', 'Myladuthurai'), ('Sirkalzi (SC)', 'Sirkalzi (SC)'), ('Sankarankovil (SC)', 'Sankarankovil (SC)'), ('Tenkasi', 'Tenkasi'), ('Alangulam', 'Alangulam'), ('Palayamkottai', 'Palayamkottai'), ('Karaikudi', 'Karaikudi'), ('Tiruppattur', 'Tiruppattur'), ('Sivaganga', 'Sivaganga'), ('Manamadurai', 'Manamadurai')], null=True, verbose_name='a5'),
),
migrations.AlterField(
model_name='survey',
name='c3',
field=models.CharField(blank=True, choices=[('0-Never', '0-Never'), ('1-Yes, application in progress', '1-Yes, application in progress'), ('2-Yes, currently enrolled', '2-Yes, currently enrolled')], max_length=128, null=True, verbose_name='c3'),
),
]
7 changes: 4 additions & 3 deletions questionnaire/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ class Survey(models.Model):
('Mettur', 'Mettur'), ('Yarcard (ST)', 'Yarcard (ST)'), ('Sankari', 'Sankari'),
('Nagapptinam', 'Nagapptinam'), ('Kilvelur (SC)', 'Kilvelur (SC)'), ('Myladuthurai', 'Myladuthurai'),
('Sirkalzi (SC)', 'Sirkalzi (SC)'), ('Sankarankovil (SC)', 'Sankarankovil (SC)'),
('Tenkasi', 'Tenkasi'), ('Palayamkottai', 'Palayamkottai'), ('Karaikudi', 'Karaikudi'),
('Tiruppattur', 'Tiruppattur'), ('Sivaganga', 'Sivaganga'), ('Manamadurai', 'Manamadurai')
('Tenkasi', 'Tenkasi'), ('Alangulam', 'Alangulam'), ('Palayamkottai', 'Palayamkottai'),
('Karaikudi', 'Karaikudi'), ('Tiruppattur', 'Tiruppattur'), ('Sivaganga', 'Sivaganga'),
('Manamadurai', 'Manamadurai')
)
a5_code_choices = ((23, 23), (12, 12), (15, 15), (18, 18), (43, 43), (50, 50), (38, 38), (46, 46), (83, 83),
(84, 84), (85, 85), (87, 87), (160, 160), (161, 161), (163, 163), (164, 164), (219, 219),
Expand Down Expand Up @@ -230,7 +231,7 @@ class Survey(models.Model):
b13 = models.IntegerField(verbose_name=_('b13'), default=0)
c1 = models.IntegerField(verbose_name=_('c1'), default=98)
c2 = models.CharField(max_length=128, verbose_name=_('c2'), choices=null_boolean_choices, blank=True, null=True)
c3 = models.CharField(max_length=128, verbose_name=_('c3'), choices=c3_choices)
c3 = models.CharField(max_length=128, verbose_name=_('c3'), choices=c3_choices, blank=True, null=True)
c4 = models.CharField(max_length=128, verbose_name=_('c4'), choices=bool_choices, blank=True, null=True)
c5 = models.CharField(max_length=128, verbose_name=_('c5'), choices=c5_choices, blank=True, null=True)
c6 = models.CharField(max_length=128, verbose_name=_('c6'), choices=c6_choices, blank=True, null=True)
Expand Down

0 comments on commit ffd1ed5

Please sign in to comment.