I
I
Igor Che2017-06-21 14:44:22
Django
Igor Che, 2017-06-21 14:44:22

Django is there a ready-made battery for multi-uploading and sorting uploaded photos?

I want to make a common thing - a form with multiloading of images and drag&drop sorting.
As far as I understand, for images you need to create a separate type model:

class Photo(models.Model):
    album = models.ForeignKey(Album)
    file = models.ImageField(upload_to=upload_to)
    weight = models.SmallIntegerField()

Embed an additional form inside the main form to upload images and display them.
Sorting needs to be done by Drag&Drop. Move images up/down. Perhaps there is a JS library for this.
Are there ready-made batteries or recipes for how to do this? I do not want to spend a lot of time on the invention of the bicycle.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2017-06-21
@immaculate

I recently did this using the Filestack service, and sorting using Sortable.js. Filestack is an expensive service, but the customer asked me to, he chose Filestack, and he pays for it. I chose Sortable.js because it seemed to me the easiest solution. I didn’t find ready-made batteries, I wrote integration with Filestack and Sortable.js myself, but it turned out to be easy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question