1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #14370 -- Allowed using a Select2 widget for ForeignKey and ManyToManyField in the admin.

Thanks Florian Apolloner and Tim Graham for review and
contributing to the patch.
This commit is contained in:
Johannes Hoppe
2017-05-10 14:48:57 +02:00
committed by Tim Graham
parent 01a294f8f0
commit 94cd8efc50
21 changed files with 1213 additions and 23 deletions

View File

@@ -27,6 +27,7 @@ class Band(models.Model):
class Album(models.Model):
band = models.ForeignKey(Band, models.CASCADE)
featuring = models.ManyToManyField(Band, related_name='featured')
name = models.CharField(max_length=100)
cover_art = models.FileField(upload_to='albums')
backside_art = MyFileField(upload_to='albums_back', null=True)