django-extended-choices icon indicating copy to clipboard operation
django-extended-choices copied to clipboard

Little helper application to improve django choices (for fields)

Results 8 django-extended-choices issues
Sort by recently updated
recently updated
newest added

Hi, Thank you for creating this library. `django-extended-choices` is a very convenient and good library. Change Summary * support Python 3.8.0 and Django3.0. and update toxenv and travis-ci config. Thanks

PyCharm code inspection highlights all choices. Example: ```python STATES = Choices( ('ONLINE', 1, 'Online'), ('DRAFT', 2, 'Draft'), ('OFFLINE', 3, 'Offline'), ) ``` Inspection info: `Expected type 'list', got 'Tuple[str, int,...

If the constant starts with a numeral (potentially other non-alpha too), the CHOICES. construct doesn't work. Steps to reproduce. ``` >>> STATES = Choices(('ONLINE','1-2', 'Online'),('OFFLINE','2-1', 'Offline'),) >>> STATES.constants {'ONLINE': ('ONLINE',...

Steps to reproduce: ``` >>> from collections import OrderedDict >>> from django.utils import translation >>> from django.utils.translation import gettext_lazy as _ >>> from extended_choices import Choices >>> STATES = Choices(...

bug

Version 1.2 will add a few features and support for django 2 (with same support for previous versions. Then version 2 will follow, supporting only python 3.

on-hold

Something like ```python class States(Choices): ONLINE = (1, 'Online') DRAFT = (2, 'Draft') OFFLINE = (3, 'Offline') ``` An attribute could accept a tuple, as above, or a single value,...

on-hold