Created
July 14, 2019 07:37
-
-
Save aballah-chamakh/215b215c3c410fb69355cdfeae366f10 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.db import models | |
| class PlayList(models.Model): | |
| title = models.CharField(max_length=255) | |
| slug = models.SlugField() | |
| description = models.TextField() | |
| def __str__(self): | |
| return self.title | |
| class Lecture(models.Model): | |
| playlist = models.ForeignKey(PlayList,on_delete=models.CASCADE) | |
| title = models.CharField(max_length=255) | |
| slug = models.SlugField() | |
| description = models.TextField() | |
| video_url = models.CharField(max_length=500) | |
| def __str__(self): | |
| return self.title |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment