Django 4
Need user to be able to upload either an archive of images or just a few images at a time. Then these pages are numbered according to the order in which the user has placed them and stored in the database. Thus, when you open a page with images, there will be all the images just uploaded for this page in the correct order
UPD: I would also be grateful if you could tell me how to rename files, change their extension, for example from .png to .jpg and in the path of saving in the model, for example, poster = models.ImageField(upload_to=‘posters/’, blank=False, null=False, verbose_name=‘Posters’)
in the attribute upload_to add a value depending on what page the images are uploaded to. For example, if the page is called ‘opera’
, the image path would be ‘posters/opera/1.jpg’
, ‘opera/2.jpg’
, etc. For the ‘Romeo and Juliet’
page it would be ‘posters/Romeo-and-Juliet/1.jpg.’
kurenma is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.