django-rq-jobs
django-rq-jobs copied to clipboard
Spurious migrations
Django creates AlterField migrations when the choices of a field change. This means that, because of this line:
task = models.CharField(max_length=200, choices=task_list())
Django wants to make a migration every time the task list is updated. I'm wondering if something like
self._meta.get_field_by_name('task')[0]._choices = task_list()
inside __init__
could work instead. That said, get_field_by_name
is about to be deprecated and should probably simply be get_field
.