Add field for card_photo to database
This commit is contained in:
parent
e3514a1768
commit
a849b5f887
|
@ -21,6 +21,7 @@ class Member(models.Model):
|
||||||
photo_medium = models.CharField(max_length=64, blank=True, null=True)
|
photo_medium = models.CharField(max_length=64, blank=True, null=True)
|
||||||
photo_small = models.CharField(max_length=64, blank=True, null=True)
|
photo_small = models.CharField(max_length=64, blank=True, null=True)
|
||||||
member_forms = models.CharField(max_length=64, blank=True, null=True)
|
member_forms = models.CharField(max_length=64, blank=True, null=True)
|
||||||
|
card_photo = models.CharField(max_length=64, blank=True, null=True)
|
||||||
|
|
||||||
set_details = models.BooleanField(default=False)
|
set_details = models.BooleanField(default=False)
|
||||||
first_name = models.CharField(max_length=32)
|
first_name = models.CharField(max_length=32)
|
||||||
|
|
|
@ -134,6 +134,7 @@ class MemberSerializer(serializers.ModelSerializer):
|
||||||
'photo_medium',
|
'photo_medium',
|
||||||
'photo_small',
|
'photo_small',
|
||||||
'member_forms',
|
'member_forms',
|
||||||
|
'card_photo',
|
||||||
'user',
|
'user',
|
||||||
'old_email',
|
'old_email',
|
||||||
'orientation_date',
|
'orientation_date',
|
||||||
|
@ -158,9 +159,7 @@ class MemberSerializer(serializers.ModelSerializer):
|
||||||
instance.photo_small = small
|
instance.photo_small = small
|
||||||
instance.photo_medium = medium
|
instance.photo_medium = medium
|
||||||
instance.photo_large = large
|
instance.photo_large = large
|
||||||
card_photo = utils.gen_card_photo(instance)
|
instance.card_photo = utils.gen_card_photo(instance)
|
||||||
print(card_photo)
|
|
||||||
logger.info(card_photo)
|
|
||||||
|
|
||||||
return super().update(instance, validated_data)
|
return super().update(instance, validated_data)
|
||||||
|
|
||||||
|
@ -183,6 +182,7 @@ class AdminMemberSerializer(MemberSerializer):
|
||||||
'photo_medium',
|
'photo_medium',
|
||||||
'photo_small',
|
'photo_small',
|
||||||
'member_forms',
|
'member_forms',
|
||||||
|
'card_photo',
|
||||||
'user',
|
'user',
|
||||||
'old_email',
|
'old_email',
|
||||||
'is_director',
|
'is_director',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user