Skip to content

Commit 32865d5

Browse files
committed
Feature: 발표자님 프로필 이미지를 위한 필드 추가
1 parent 4f35845 commit 32865d5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pyconweb2022/program/models.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ def __str__(self):
1515
return self.name
1616

1717

18+
def profile_img_upload_to(instance, filename):
19+
return f"program/speaker_profile_img/{instance.id}/{filename}"
20+
21+
1822
class Proposal(models.Model):
1923
user = models.ForeignKey(User, on_delete=models.CASCADE)
2024
user_name = models.CharField(max_length=100, default="")
@@ -74,6 +78,12 @@ class Proposal(models.Model):
7478
null=True, blank=True, help_text="파이콘 한국 유튜브에 공개되는 시간"
7579
)
7680
track_num = models.IntegerField(null=True, blank=True, help_text="트랙 번호")
81+
speaker_profile_img = models.ImageField(
82+
null=True,
83+
blank=True,
84+
help_text="발표자님 프로필 사진",
85+
upload_to=profile_img_upload_to
86+
)
7787

7888
# 이력관리용 필드
7989
created_at = models.DateTimeField(auto_now_add=True)

0 commit comments

Comments
 (0)