March 2020
Intermediate to advanced
608 pages
17h 17m
English
If you open the Change Product form, you will see something like this:

In the model, we set the order_with_respect_to attribute to ensure that ordering will be separate for each product instead of just ordering the whole list of product photos in general.
In Django administration, product photos can be edited by following the product details itself as tabular inlines. In the first column, we have a photo preview. We are generating it using the same photo-preview.html template that we used in the previous recipe. In the second column, there is a field for changing the photo. Then, there is a column for the ORDER field, followed ...
Read now
Unlock full access