django-choices
django-choices copied to clipboard
Sanity to the django choices functionality.
I have a model field as below: ``` suggestion = models.CharField( _('suggestion'), blank=True, choices= **(choice1, choice2)**, max_length=255, ) ``` I have two choice lists...let's say ``` class FeedbackComplimentType(DjangoChoices): ... ```...
It'd be nice to get django-choices compatible with django 3.0 until we can provide: 1) options on how to achieve parity with the new native choices classes in django 3.0...
It appears the upcoming Django 3.0 release (expected December 2019) will have something very similar built in (although the syntax is slightly different): https://docs.djangoproject.com/en/dev/releases/3.0/#enumerations-for-model-field-choices I haven't looked into it too...
I've noticed there are two naming styles used: CamelCase and snake_case. For example, `Person.PersonType.Customer` vs. `Book.BookTypes.short_story`. (Side thought: __Type_ vs __Types_) From `README.rst`: ``` class Person(models.Model): # Choices class PersonType(DjangoChoices):...