# category.py
from django.db.models.fields import CharField
class CategoryField(CharField):
verbose_name = "category"
max_length = 40
NORMAL = 'normal'
PUBLIC = 'public'
choices = (
(NORMAL, "normal"),
(PUBLIC, "public),
)
def __init__(self, *arg
UTC+9, Tim Graham 님의 말:
>
> It looks like you need to add a CategoryField.deconstruct() method.
>
>
> https://docs.djangoproject.com/en/stable/howto/custom-model-fields/#custom-field-deconstruct-method
>
> On Monday, March 13, 2017 at 8:05:02 AM UTC-4, 김지환 wrote:
>>
2 matches
Mail list logo