django-model-utils icon indicating copy to clipboard operation
django-model-utils copied to clipboard

Deprecate 'Choices'

Open adamchainz opened this issue 5 years ago • 2 comments

Problem

Django 3.0 adds enumeration types, which perform the same function as the Choices class. It's best we recommend users use the core django feature rather than duplicating it

PR #421 added a note about this.

At least once the minimum Django version is 3.0, we should deprecate Choices and remove it some time after.

See also my blog post.

adamchainz avatar Mar 18 '20 18:03 adamchainz

Yes. But Django 3.0 does not support named group, whereas django-model-utils does.

lifelonglearner127 avatar Jul 25 '20 02:07 lifelonglearner127

Yes that's fair. There was a discussion on django-developers to add support, it should come in a future Django version I expect.

adamchainz avatar Jul 27 '20 14:07 adamchainz