Update readme file and changes file

This commit is contained in:
Pablo Martín 2013-11-26 19:03:02 +01:00
parent 8c9c3a7682
commit 7ced508e25
2 changed files with 21 additions and 7 deletions

View File

@ -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 <https://github.com/evildmp>`_

View File

@ -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