-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from pythonkr/devdev
운영 배포
- Loading branch information
Showing
24 changed files
with
223 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @pythonkr/PyConKR-2023 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
### 목표 | ||
* | ||
|
||
### 작업내용 | ||
### 작업 내용 | ||
* | ||
|
||
### 유의사항 | ||
* 리뷰어는 `PyConKR-2023`을 지정 해 주세요. | ||
### 유의 사항 | ||
* 리뷰어는 `PyConKR-2023`을 지정해주세요. | ||
* 작업한 내용을 상세하게 작성해주세요. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class ProgramConfig(AppConfig): | ||
default_auto_field = "django.db.models.BigAutoField" | ||
name = "program" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
from django.contrib.auth import get_user_model | ||
from django.db import models | ||
|
||
User = get_user_model() | ||
|
||
|
||
class ProposalCategory(models.Model): | ||
name = models.CharField(max_length=100, db_index=True) | ||
visible = models.BooleanField(default=True) | ||
|
||
def __str__(self): | ||
return self.name | ||
|
||
|
||
class Proposal(models.Model): | ||
user = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True) | ||
|
||
title = models.CharField(max_length=255) | ||
brief = models.TextField(max_length=1000, help_text="리뷰용: 발표에 대한 간단한 설명.") | ||
desc = models.TextField(max_length=4000, help_text="리뷰용: 발표에 대한 자세한 설명") | ||
comment = models.TextField( | ||
max_length=4000, null=True, blank=True, help_text="리뷰용: 파준위에게 전하고 싶은 말" | ||
) | ||
|
||
difficulty = models.CharField( | ||
max_length=15, | ||
choices=( | ||
("BEGINNER", "Beginner"), | ||
("INTERMEDIATE", "Intermediate"), | ||
("EXPERIENCED", "Experienced"), | ||
), | ||
) | ||
|
||
duration = models.CharField( | ||
max_length=15, | ||
choices=( | ||
("SHORT", "25min"), | ||
("LONG", "40min"), | ||
), | ||
) | ||
|
||
language = models.CharField( | ||
max_length=15, | ||
choices=( | ||
("", "---------"), | ||
("KOREAN", "Korean"), | ||
("ENGLISH", "English"), | ||
), | ||
default="", | ||
) | ||
|
||
category = models.ForeignKey( | ||
ProposalCategory, | ||
on_delete=models.SET_DEFAULT, | ||
null=True, | ||
blank=True, | ||
default=14, | ||
) | ||
accepted = models.BooleanField(default=False) | ||
introduction = models.TextField( | ||
max_length=2000, | ||
null=True, | ||
blank=True, | ||
help_text="발표 소개 페이지에 들어가는 내용입니다. 변경 사항은 최대 60분 이내에 적용됩니다.", | ||
) | ||
video_url = models.CharField( | ||
max_length=255, null=True, blank=True, help_text="발표 영상 URL" | ||
) | ||
slide_url = models.CharField( | ||
max_length=255, null=True, blank=True, help_text="발표 자료 URL" | ||
) | ||
room_num = models.CharField( | ||
max_length=15, | ||
null=True, | ||
blank=True, | ||
help_text="발표장소", | ||
choices=( | ||
("101", "101"), | ||
("102", "102"), | ||
("103", "103"), | ||
("104", "104"), | ||
("105", "105"), | ||
), | ||
) | ||
created_at = models.DateTimeField(auto_now_add=True) | ||
updated_at = models.DateTimeField(auto_now=True) | ||
|
||
def __str__(self): | ||
return self.title |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
from rest_framework.serializers import ModelSerializer | ||
|
||
from program.models import Proposal, ProposalCategory | ||
|
||
|
||
class ProposalSerializer(ModelSerializer): | ||
class Meta: | ||
model = Proposal | ||
fields = [ | ||
"user", | ||
"title", | ||
"brief", | ||
"desc", | ||
"comment", | ||
"difficulty", | ||
"duration", | ||
"language", | ||
"category", | ||
"accepted", | ||
"introduction", | ||
"video_url", | ||
"slide_url", | ||
"room_num", | ||
] | ||
|
||
|
||
class ProposalListSerializer(ModelSerializer): | ||
class Meta: | ||
model = Proposal | ||
fields = [ | ||
"title", | ||
"brief", | ||
"difficulty", | ||
"duration", | ||
"language", | ||
"category", | ||
] | ||
|
||
|
||
class ProposalCategorySerializer(ModelSerializer): | ||
class Meta: | ||
model = ProposalCategory | ||
fields = [ | ||
"name", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.shortcuts import render | ||
|
||
# Create your views here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from django.conf import settings | ||
from storages.backends.s3boto3 import S3Boto3Storage, S3StaticStorage | ||
|
||
|
||
class MediaStorage(S3Boto3Storage): | ||
def _get_security_token(self): | ||
return None | ||
|
||
|
||
class StaticStorage(S3StaticStorage): | ||
def _get_security_token(self): | ||
return None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[tool.black] | ||
line-length = 88 | ||
include = '\.pyi?$' | ||
extend-exclude = ''' | ||
( | ||
migrations | ||
) | ||
''' | ||
|
||
[tool.isort] | ||
extend_skip = ["migrations"] | ||
profile = "black" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.