Skip to content

Commit 702c7a4

Browse files
added social media class
1 parent 20e3c2a commit 702c7a4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

backend/family_tree/student/models.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ class Student(models.Model):
77
year= models.CharField(max_length=4)
88
picture= models.URLField(max_length=200)
99
homeTown= models.CharField(max_length=200)
10-
extraCurriculars= models.CharField()
11-
socialMedia= models.URLField()
10+
extraCurriculars= models.CharField(max_length=2000)
11+
socialMedia= models.ForeignKey('SocialMedia')
1212
linkedIn= models.URLField(max_length=200)
1313
email= models.EmailField(max_length=254)
14-
parentId= models.CharField()
15-
14+
parentId= models.CharField(max_length=9)
1615

16+
class SocialMedia(models.Model):
17+
facebook = models.URLField(max_length=255)
18+
instagram = models.URLField(max_length=255)
1719

1820

1921

0 commit comments

Comments
 (0)