diff --git a/CHANGES.rst b/CHANGES.rst index 641e897..7e37bd7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,10 @@ -0.0.4 (2013-11-??) +0.1.0 (2013-11-??) ------------------ + +* Test/example project +* Now works if the first composant of the list of tuple is an integer +* Now max_length is not required, the Multiselect field calculate it automatically. +* The max_choices attr can be a attr in the model field * Support to python2.6 * Thanks to: * `Daniele Procida `_ diff --git a/README.rst b/README.rst index 6e1e67b..98d3c43 100644 --- a/README.rst +++ b/README.rst @@ -41,17 +41,26 @@ In your models.py ... - MY_CHOICES = (('item_key1', 'Item title1'), - ('item_key2', 'Item title2'), - ('item_key3', 'Item title3'), - ('item_key4', 'Item title4'), - ('item_key5', 'Item title5')) + MY_CHOICES = (('item_key1', 'Item title 1.1'), + ('item_key2', 'Item title 1.2'), + ('item_key3', 'Item title 1.3'), + ('item_key4', 'Item title 1.4'), + ('item_key5', 'Item title 1.5')) + + MY_CHOICES2 = ((1, 'Item title 2.1'), + (2, 'Item title 2.2'), + (3, 'Item title 2.3'), + (4, 'Item title 2.4'), + (5, 'Item title 2.5')) class MyModel(models.Model): ..... - my_field = MultiSelectField(choices=MY_CHOICES, max_length=20) + my_field = MultiSelectField(choices=MY_CHOICES) + my_field2 = MultiSelectField(choices=MY_CHOICES2, + max_choices=3, + max_length=3) Development