changes to models
This commit is contained in:
parent
6a46dc0dcd
commit
727c53ef85
|
@ -40,7 +40,7 @@ def addPlacement(request):
|
||||||
# opening.rs_eligible = True
|
# opening.rs_eligible = True
|
||||||
# else:
|
# else:
|
||||||
# opening.rs_eligible = False
|
# opening.rs_eligible = False
|
||||||
print(data[ELIGIBLESTUDENTS])
|
|
||||||
if data[ELIGIBLESTUDENTS] is None:
|
if data[ELIGIBLESTUDENTS] is None:
|
||||||
raise ValueError('Eligible Students cannot be empty')
|
raise ValueError('Eligible Students cannot be empty')
|
||||||
elif set(json.loads(data[ELIGIBLESTUDENTS])).issubset(ELIGIBLE):
|
elif set(json.loads(data[ELIGIBLESTUDENTS])).issubset(ELIGIBLE):
|
||||||
|
@ -486,7 +486,7 @@ def addInternship(request):
|
||||||
internship.eligiblestudents = json.loads(data[ELIGIBLESTUDENTS])
|
internship.eligiblestudents = json.loads(data[ELIGIBLESTUDENTS])
|
||||||
else:
|
else:
|
||||||
raise ValueError('Allowed Branch must be a subset of ' + str(ELIGIBLE))
|
raise ValueError('Allowed Branch must be a subset of ' + str(ELIGIBLE))
|
||||||
print(internship.eligiblestudents)
|
|
||||||
if data[PWD_ELIGIBLE] == 'Yes':
|
if data[PWD_ELIGIBLE] == 'Yes':
|
||||||
internship.pwd_eligible = True
|
internship.pwd_eligible = True
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -35,6 +35,8 @@ class Student(models.Model):
|
||||||
can_apply_internship = models.BooleanField(default=True, verbose_name='Internship Registered') #added for internship
|
can_apply_internship = models.BooleanField(default=True, verbose_name='Internship Registered') #added for internship
|
||||||
changed_by = models.ForeignKey(User, blank=True, on_delete=models.RESTRICT, default=None, null=True)
|
changed_by = models.ForeignKey(User, blank=True, on_delete=models.RESTRICT, default=None, null=True)
|
||||||
degree = models.CharField(choices=DEGREE_CHOICES, blank=False, max_length=10, default=DEGREE_CHOICES[0][0])
|
degree = models.CharField(choices=DEGREE_CHOICES, blank=False, max_length=10, default=DEGREE_CHOICES[0][0])
|
||||||
|
isPwd = models.BooleanField(default=False, verbose_name='Person with Disability')
|
||||||
|
isBacklog = models.BooleanField(default=False, verbose_name='Has Backlog')
|
||||||
history = HistoricalRecords(user_model=User)
|
history = HistoricalRecords(user_model=User)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
@ -141,12 +143,11 @@ class Placement(models.Model):
|
||||||
tentative_no_of_offers = models.IntegerField(blank=False, default=None, null=True)
|
tentative_no_of_offers = models.IntegerField(blank=False, default=None, null=True)
|
||||||
expected_no_of_offers = models.IntegerField(blank=False , default=None , null=True) # newly added
|
expected_no_of_offers = models.IntegerField(blank=False , default=None , null=True) # newly added
|
||||||
number_of_employees = models.IntegerField(blank=False, default=None, null=True) # newly added field
|
number_of_employees = models.IntegerField(blank=False, default=None, null=True) # newly added field
|
||||||
rs_eligible = models.BooleanField(blank=True, default=False) # needs to be deleted
|
|
||||||
eligiblestudents = ArrayField(
|
eligiblestudents = ArrayField(
|
||||||
models.CharField(choices=ELIGIBLE_CHOICES, blank=False, max_length=10),
|
models.CharField(choices=ELIGIBLE_CHOICES, blank=False, max_length=10),
|
||||||
size=10,
|
size=10,
|
||||||
default=list
|
default=list
|
||||||
)
|
) #newly added field
|
||||||
pwd_eligible = models.BooleanField(blank=True, default=False) #newly added field
|
pwd_eligible = models.BooleanField(blank=True, default=False) #newly added field
|
||||||
backlog_eligible = models.BooleanField(blank=True, default=False) #newly added field
|
backlog_eligible = models.BooleanField(blank=True, default=False) #newly added field
|
||||||
psychometric_test = models.BooleanField(blank=True, default=False) #newly added field
|
psychometric_test = models.BooleanField(blank=True, default=False) #newly added field
|
||||||
|
@ -338,8 +339,6 @@ class Internship(models.Model):
|
||||||
size=TOTAL_BATCHES,
|
size=TOTAL_BATCHES,
|
||||||
default=list
|
default=list
|
||||||
)
|
)
|
||||||
sophomore_eligible = models.BooleanField(blank=False, default=False)
|
|
||||||
rs_eligible = models.BooleanField(blank=False, default=False) # needs to be deleted
|
|
||||||
eligiblestudents = ArrayField(
|
eligiblestudents = ArrayField(
|
||||||
models.CharField(choices=ELIGIBLE_CHOICES, blank=False, max_length=10),
|
models.CharField(choices=ELIGIBLE_CHOICES, blank=False, max_length=10),
|
||||||
size=10,
|
size=10,
|
||||||
|
|
Loading…
Reference in New Issue