Coverage for app/models/program.py: 91%

23 statements  

« prev     ^ index     » next       coverage.py v7.2.7, created at 2024-07-31 16:31 +0000

1from app.models import* 

2from app.models.term import Term 

3from app.models.courseStatus import CourseStatus 

4from app.models.partner import Partner 

5 

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='') 

19 

20 @property 

21 def url(self): 

22 

23 return (self.bereaUrl or self.instagramUrl or self.facebookUrl) 

24 

25 @property 

26 def description(self): 

27 

28 return self.programDescription