Added related name for Song_Artists.
This commit is contained in:
parent
e2ae6378bd
commit
d9ffd9a3c0
2 changed files with 2 additions and 2 deletions
|
@ -83,7 +83,7 @@ class Migration(migrations.Migration):
|
||||||
('path', models.TextField(verbose_name='absolute path to song file')),
|
('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')),
|
('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')),
|
('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')),
|
('game', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='radio.Game')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
|
|
|
@ -157,7 +157,7 @@ class Song(Disableable, Publishable, Timestampable, models.Model):
|
||||||
on_delete=models.SET_NULL,
|
on_delete=models.SET_NULL,
|
||||||
null=True,
|
null=True,
|
||||||
blank=True)
|
blank=True)
|
||||||
artists = models.ManyToManyField(Artist, blank=True)
|
artists = models.ManyToManyField(Artist, blank=True, related_name='songs')
|
||||||
game = models.ForeignKey(Game,
|
game = models.ForeignKey(Game,
|
||||||
on_delete=models.SET_NULL,
|
on_delete=models.SET_NULL,
|
||||||
null=True,
|
null=True,
|
||||||
|
|
Loading…
Reference in a new issue