mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-19 04:49:37 +02:00
feat: add primary image functionality to AdventureImage model and update related components
This commit is contained in:
parent
991efa8d08
commit
c6fa603a93
8 changed files with 112 additions and 5 deletions
|
@ -8,7 +8,7 @@ from main.utils import CustomModelSerializer
|
|||
class AdventureImageSerializer(CustomModelSerializer):
|
||||
class Meta:
|
||||
model = AdventureImage
|
||||
fields = ['id', 'image', 'adventure']
|
||||
fields = ['id', 'image', 'adventure', 'is_primary']
|
||||
read_only_fields = ['id']
|
||||
|
||||
def to_representation(self, instance):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue