Coverage for app/models/program.py: 91%
23 statements
« prev ^ index » next coverage.py v7.2.7, created at 2024-09-03 17:48 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2024-09-03 17:48 +0000
1from app.models import*
2from app.models.term import Term
3from app.models.courseStatus import CourseStatus
4from app.models.partner import Partner
6class Program(baseModel):
7 programName = CharField()
8 instagramUrl = TextField(null=True)
9 facebookUrl = TextField(null=True)
10 bereaUrl = TextField(null=True)
11 programDescription = TextField()
12 partner = ForeignKeyField(Partner, null=True)
13 isStudentLed = BooleanField(default=False)
14 isBonnerScholars = BooleanField(default=False)
15 isOtherCeltsSponsored = BooleanField(default=False)
16 contactName = CharField(null=True,default='')
17 contactEmail = CharField(null=True,default='')
18 defaultLocation = CharField(null=True,default='')
20 @property
21 def url(self):
23 return (self.bereaUrl or self.instagramUrl or self.facebookUrl)
25 @property
26 def description(self):
28 return self.programDescription