Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Musican(models.Model):
- band = models.CharField(max_length=10,null=True)
- albums = models.CharField(max_length=100)
- def __str__(self):
- """
- String for representing the Model object.
- """
- return self.albums
- class Soung(models.Model):
- albums = models.ForeignKey(Musican,on_delete=models.CASCADE)
- soungs = models.CharField(max_length=100)
- def __str__(self):
- return self.soungs
Add Comment
Please, Sign In to add comment