나머지 프레임 워크 및 하나의 열거 형 필드에 문제가 있습니다.열거 형 django 및 나머지 프레임 워크
class PuddleAtomStatus(ChoiceEnum):
INVALID = "INVALID"
OK = "OK"
class PuddleAtom(Model):
name = models.CharField(max_length=255, primary_key=True)
ingestion_flow = models.CharField(max_length=256)
status = EnumChoiceField(enm_class=PuddleAtomStaus)
하지만
status = models.CharField(max_length=100)
내가 장고 1.11 및 파이썬 2.7
을 사용하고 때 아무것도 괜찮 : 모델이 필드가File "/usr/local/lib/python2.7/dist-packages/coreapi/codecs/corejson.py", line 48, in decode_schema_from_corejson
return schema_cls(title=title, description=description)
TypeError: __init__() takes exactly 2 arguments (1 given)
:이 오류가
이 문제를 해결하고 모델을 열거 형 필드로 남겨 둘 수있는 방법이 있습니까?
업데이트 : 문제는 https://github.com/core-api/core-api/issues/47 해결 방법이 있습니까? – ozw1z5rd