From 7ced508e2566e33b6c77f3f509478073c852b770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Mart=C3=ADn?= Date: Tue, 26 Nov 2013 19:03:02 +0100 Subject: [PATCH] Update readme file and changes file --- CHANGES.rst | 7 ++++++- README.rst | 21 +++++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-) 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