Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions FusionIIIT/applications/scholarships/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Register your models here.
from .models import (Award_and_scholarship, Director_gold, Director_silver,
Mcm, Notional_prize, Previous_winner, Proficiency_dm,
Mcm, National_prize, Previous_winner, Proficiency_dm,
Release,Notification,Application)

admin.site.register(Mcm),
Expand All @@ -12,6 +12,6 @@
admin.site.register(Proficiency_dm),
admin.site.register(Director_silver),
admin.site.register(Director_gold),
admin.site.register(Notional_prize),
admin.site.register(National_prize),
admin.site.register(Notification),
admin.site.register(Application),
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.0.6 on 2020-05-24 18:17

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('scholarships', '0004_merge_20200522_1849'),
]

operations = [
migrations.RenameField(
model_name='director_gold',
old_name='coorporate',
new_name='corporate',
),
migrations.RenameField(
model_name='notification',
old_name='invite_covocation_accept_flag',
new_name='invite_convocation_accept_flag',
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 3.0.6 on 2020-05-24 21:50

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('scholarships', '0005_auto_20200524_1817'),
]

operations = [
migrations.RenameModel(
old_name='Notional_prize',
new_name='National_prize',
),
migrations.AlterModelTable(
name='national_prize',
table='National_prize',
),
]
22 changes: 11 additions & 11 deletions FusionIIIT/applications/scholarships/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Constants:
('Accept', 'ACCEPT')

)
time = (
TIME = (
('0', '12 Midnight'),
('1am', '1'),
('2am', '2'),
Expand All @@ -41,15 +41,15 @@ class Constants:
('11pm', '23'),
('12 Midnight', '0')
)
batch = (
BATCH = (
('UG1', 'UG1'),
('UG2', 'UG2'),
('UG3', 'UG3'),
('UG4', 'UG4'),
('PG1', 'PG1'),
('PG2', 'PG2')
)
father_occ_choice = (
FATHER_OCC_CHOICE = (
('government', 'Government'),
('private', 'Private'),
('public', 'Public'),
Expand Down Expand Up @@ -88,7 +88,7 @@ class Mcm(models.Model):
income_mother = models.IntegerField(default=0)
income_other = models.IntegerField(default=0)
father_occ = models.CharField(max_length=10,
choices=Constants.father_occ_choice,
choices=Constants.FATHER_OCC_CHOICE,
default='')
mother_occ = models.CharField(max_length=10,
choices=Constants.MOTHER_OCC_CHOICES,
Expand Down Expand Up @@ -125,15 +125,15 @@ def __str__(self):
return str(self.student)


class Notional_prize(models.Model):
class National_prize(models.Model):
spi = models.FloatField()
cpi = models.FloatField()
year = models.CharField(max_length=10, choices=Constants.batch)
year = models.CharField(max_length=10, choices=Constants.BATCH)
award_id = models.ForeignKey(Award_and_scholarship, default=4, on_delete=models.CASCADE)


class Meta:
db_table = 'Notional_prize'
db_table = 'National_prize'

#Addition: a column programme added
class Previous_winner(models.Model):
Expand Down Expand Up @@ -161,14 +161,14 @@ class Release(models.Model):
class Meta:
db_table = 'Release'

#Abhilash: new class added for keeping track of notifications and applied application by students
# new class added for keeping track of notifications and applied application by students
class Notification(models.Model):
release_id = models.ForeignKey(Release,default=None, on_delete=models.CASCADE)
student_id = models.ForeignKey(Student, on_delete = models.CASCADE)
notification_mcm_flag = models.BooleanField(default=False)
notification_convocation_flag = models.BooleanField(default=False)
invite_mcm_accept_flag = models.BooleanField(default=False)
invite_covocation_accept_flag = models.BooleanField(default=False)
invite_convocation_accept_flag = models.BooleanField(default=False)
def __str__(self):
return str(self.student_id)

Expand Down Expand Up @@ -254,7 +254,7 @@ class Meta:
class Director_gold(models.Model):
student = models.ForeignKey(Student, on_delete=models.CASCADE)
status = models.CharField(max_length=10,choices=Constants.STATUS_CHOICES, default='INCOMPLETE')
correspondence_address = models.TextField(max_length=40, default='adress')
correspondence_address = models.TextField(max_length=40, default='address')
nearest_policestation = models.TextField(max_length=30, default='station')
nearest_railwaystation = models.TextField(max_length=30, default='station')
relevant_document = models.FileField(null=True, blank=True)
Expand All @@ -269,7 +269,7 @@ class Director_gold(models.Model):
cultural_inside = models.TextField(max_length=1000 ,null=True)
cultural_outside = models.TextField(max_length=1000 ,null=True)
social = models.TextField(max_length=1000 ,null=True)
coorporate = models.TextField(max_length=1000 ,null=True)
corporate = models.TextField(max_length=1000 ,null=True)
hall_activities = models.TextField(max_length=1000 ,null=True)
gymkhana_activities = models.TextField(max_length=1000 ,null=True)
institute_activities = models.TextField(max_length=1000 ,null=True)
Expand Down
Loading