First time post here :) I'm learning python and the django framework through a simple photo album app. I'm working through the admin site only for now, and django is v.2.1.
There's a photo-album table and an images table. A photo album can have many images and an image can be associated with many photo albums, so I modelized a many-to-many relation through an intermediary table.
My photo album change page has an inline for the images in it. All this is straightforward and works well.
Apart from the two parent tables PKs, the intermediary table has an extra boolean field, "isCover", so that a user can select an image in the photo album to act as a cover. However, in the inline there is no way to enforce only one image is checked as cover. Plus, I'd like the functionality that the first image be automatically selected as cover if the user selects none.
How can that be accomplished?
Thanks in advance for any insights! Joe