Skip to content Skip to sidebar Skip to footer

Foreign Key Access

--------------------------------------------MODELS.PY-------------------------------------------- class Artist(models.Model): name = models.CharField('artist', max_length=50

Solution 1:

Your problem comes from the placement of the key you have set up.

classArtist():
    blah = models.TextField()


classAlbum()
    blah = models.ForeignKey(blah)

This is how the database will work

-Cheers

https://github.com/Ry10p/django-Plugis/blob/master/courses/models.py

52 line

Post a Comment for "Foreign Key Access"