Django makemigrations cannot detect change when changing custom field overriding charfield.

2017-03-13 Thread 김지환
# 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

Re: Django makemigrations cannot detect change when changing custom field overriding charfield.

2017-03-13 Thread 김지환
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: >>