> uh oh. Now there's *TWO* errors!!! What am I doing wrong?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/1i5-cwJxoqAJ.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
--
Sent from my mobile device
If a song can only belong to one album, you don't have a many-to-many
relationship between songs and albums, you have a many-to-one
relationship. In Django, you use ForeignKey to define this (on the
Song model).
Check out https://docs.djangoproject.com/en/dev/topics/db/models/#many-to-one-relationships
if you're curious.
Cheers,
Martin Melin
Daniel, thank you very much. That's extremely helpful.
What I'm trying to define is that every song can be on one album, but each album can (of course) have many songs. For that, would it be better to use the ManyToMany from Album to song or FK from song to album?