Skip to content

Commit 1fd45cf

Browse files
author
Sahil Kumar
authored
Merge pull request #130 from ajwad-shaikh/improve_code
[SPACS] Code Improvements and Module Upgrade
2 parents b9b2f0f + 8a54bc6 commit 1fd45cf

File tree

5 files changed

+553
-529
lines changed

5 files changed

+553
-529
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Generated by Django 3.0.6 on 2020-05-24 18:17
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('scholarships', '0004_merge_20200522_1849'),
10+
]
11+
12+
operations = [
13+
migrations.RenameField(
14+
model_name='director_gold',
15+
old_name='coorporate',
16+
new_name='corporate',
17+
),
18+
migrations.RenameField(
19+
model_name='notification',
20+
old_name='invite_covocation_accept_flag',
21+
new_name='invite_convocation_accept_flag',
22+
),
23+
]

FusionIIIT/applications/scholarships/models.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Constants:
1414
('Accept', 'ACCEPT')
1515

1616
)
17-
time = (
17+
TIME = (
1818
('0', '12 Midnight'),
1919
('1am', '1'),
2020
('2am', '2'),
@@ -41,15 +41,15 @@ class Constants:
4141
('11pm', '23'),
4242
('12 Midnight', '0')
4343
)
44-
batch = (
44+
BATCH = (
4545
('UG1', 'UG1'),
4646
('UG2', 'UG2'),
4747
('UG3', 'UG3'),
4848
('UG4', 'UG4'),
4949
('PG1', 'PG1'),
5050
('PG2', 'PG2')
5151
)
52-
father_occ_choice = (
52+
FATHER_OCC_CHOICE = (
5353
('government', 'Government'),
5454
('private', 'Private'),
5555
('public', 'Public'),
@@ -88,7 +88,7 @@ class Mcm(models.Model):
8888
income_mother = models.IntegerField(default=0)
8989
income_other = models.IntegerField(default=0)
9090
father_occ = models.CharField(max_length=10,
91-
choices=Constants.father_occ_choice,
91+
choices=Constants.FATHER_OCC_CHOICE,
9292
default='')
9393
mother_occ = models.CharField(max_length=10,
9494
choices=Constants.MOTHER_OCC_CHOICES,
@@ -128,7 +128,7 @@ def __str__(self):
128128
class Notional_prize(models.Model):
129129
spi = models.FloatField()
130130
cpi = models.FloatField()
131-
year = models.CharField(max_length=10, choices=Constants.batch)
131+
year = models.CharField(max_length=10, choices=Constants.BATCH)
132132
award_id = models.ForeignKey(Award_and_scholarship, default=4, on_delete=models.CASCADE)
133133

134134

@@ -161,14 +161,14 @@ class Release(models.Model):
161161
class Meta:
162162
db_table = 'Release'
163163

164-
#Abhilash: new class added for keeping track of notifications and applied application by students
164+
# new class added for keeping track of notifications and applied application by students
165165
class Notification(models.Model):
166166
release_id = models.ForeignKey(Release,default=None, on_delete=models.CASCADE)
167167
student_id = models.ForeignKey(Student, on_delete = models.CASCADE)
168168
notification_mcm_flag = models.BooleanField(default=False)
169169
notification_convocation_flag = models.BooleanField(default=False)
170170
invite_mcm_accept_flag = models.BooleanField(default=False)
171-
invite_covocation_accept_flag = models.BooleanField(default=False)
171+
invite_convocation_accept_flag = models.BooleanField(default=False)
172172
def __str__(self):
173173
return str(self.student_id)
174174

@@ -254,7 +254,7 @@ class Meta:
254254
class Director_gold(models.Model):
255255
student = models.ForeignKey(Student, on_delete=models.CASCADE)
256256
status = models.CharField(max_length=10,choices=Constants.STATUS_CHOICES, default='INCOMPLETE')
257-
correspondence_address = models.TextField(max_length=40, default='adress')
257+
correspondence_address = models.TextField(max_length=40, default='address')
258258
nearest_policestation = models.TextField(max_length=30, default='station')
259259
nearest_railwaystation = models.TextField(max_length=30, default='station')
260260
relevant_document = models.FileField(null=True, blank=True)
@@ -269,7 +269,7 @@ class Director_gold(models.Model):
269269
cultural_inside = models.TextField(max_length=1000 ,null=True)
270270
cultural_outside = models.TextField(max_length=1000 ,null=True)
271271
social = models.TextField(max_length=1000 ,null=True)
272-
coorporate = models.TextField(max_length=1000 ,null=True)
272+
corporate = models.TextField(max_length=1000 ,null=True)
273273
hall_activities = models.TextField(max_length=1000 ,null=True)
274274
gymkhana_activities = models.TextField(max_length=1000 ,null=True)
275275
institute_activities = models.TextField(max_length=1000 ,null=True)

0 commit comments

Comments
 (0)