Replies: 5 comments 2 replies
-
외부 패키지의 의존성도 줄일 수 있다는 장점이 있군요. 좋은 것 같습니다. 한 가지 궁금한 점은 현재 저희 코드 베이스 내에서는 이러한 경우에 대해서도 |
Beta Was this translation helpful? Give feedback.
2 replies
-
네이밍, 사용방식에 대해 이견있는 부분 없습니다. 변경하는것에 동의합니다. |
Beta Was this translation helpful? Give feedback.
0 replies
-
네, 변경하는것에 동의합니다.
이 부분만 유의하면 될 것 같습니다. 정리해주셔서 감사합니다 |
Beta Was this translation helpful? Give feedback.
0 replies
-
이견없이 동의합니다. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Abstract
django-model-utils Choices
에서Django Choices
로 모듈을 변경하여 사용할 것을 제안합니다.LoanType
⭕,LoanTypes
❌)Status
⭕,StatusChoices
❌)Rationale
django-model-utils Choices
를 대체할 수 있는 Django Choices 클래스가 추가되었습니다. https://django-model-utils.readthedocs.io/en/latest/utilities.html#choicesfrom model_utils import Choices
를 import 할 필요가 없습니다. (models 모듈에 포함).choices
와.value
를 붙여주어야 합니다. (Enum 에 익숙하다면 오히려 좋을 수도?)1.
COMPANY_SIZE
와 같이 Choice 관련 단어 없이 단어 그 자체가 Choice 를 의미2.
CATEGORIES
,TYPES
와 같이 Choice 관련 단어는 없지만, 복수형으로 작성3.
StatusChoices
와 같이 Choices 붙임YearInSchool
: 신입생, 졸업생 등 구분Vehicle
: 차의 종류Suit
: 카드의 문양 목록MoonLandings
: 달 착륙 일 목록 (여기서만 복수형 사용?)Answer
: YES, NOColor
: RED, GREEN, YELLOWShake
: VANILLA, MINTShape
: SQUARE, DIAMONDOrdinal
: North, South, East, WestSpecification
자세한 내용은 https://docs.djangoproject.com/en/3.2/ref/models/fields/#enumeration-types 참조
Beta Was this translation helpful? Give feedback.
All reactions