Answer the question
In order to leave comments, you need to log in
How to load in models. ImageField multiple photos at once via admin?
How can I immediately load a pack of pictures in models. ImageField via admin?
Now you need to select and indicate each photo separately, and this is very impractical.
class Gallery(models.Model):
name = models.CharField(max_length=50)
...
...
class ImageGallery(models.Model):
image = models.ImageField(upload_to='my_path/')
gallery = models.ForeignKey('Gallery', on_delete=models.CASCADE)
Answer the question
In order to leave comments, you need to log in
Standard in any way
Use or third-party loaders - like https://github.com/Chive/django-multiupload
Well, or customize the form of the element - https://www.djangosnippets.org/snippets/1053/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question