Added related name for Song_Artists.

This commit is contained in:
Josh W 2020-02-13 11:31:15 -05:00
parent e2ae6378bd
commit d9ffd9a3c0
2 changed files with 2 additions and 2 deletions

View file

@ -83,7 +83,7 @@ class Migration(migrations.Migration):
('path', models.TextField(verbose_name='absolute path to song file')),
('sorted_title', models.CharField(db_index=True, editable=False, max_length=255, verbose_name='naturalized title')),
('album', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='radio.Album')),
('artists', models.ManyToManyField(blank=True, to='radio.Artist')),
('artists', models.ManyToManyField(blank=True, related_name='songs', to='radio.Artist')),
('game', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='radio.Game')),
],
options={

View file

@ -157,7 +157,7 @@ class Song(Disableable, Publishable, Timestampable, models.Model):
on_delete=models.SET_NULL,
null=True,
blank=True)
artists = models.ManyToManyField(Artist, blank=True)
artists = models.ManyToManyField(Artist, blank=True, related_name='songs')
game = models.ForeignKey(Game,
on_delete=models.SET_NULL,
null=True,