django-multiselectfield icon indicating copy to clipboard operation
django-multiselectfield copied to clipboard

Default values ignored in admin after updating from Django 1.8 to Django 1.11

Open fidelleon opened this issue 7 years ago • 3 comments

As a matter of test, I have created a quite basic model:

CHOICES = ( ('1', 'Primero'), ('2', 'Segundo'), ('3', 'Tercero') ) opciones = MultiSelectField(choices=CHOICES, default='1,3', max_length=200, blank=True)

When used in Django 1.8, the admin interface shows options 1 and 3 as checked. Simply upgrading from Django 1.8 to Django 1.11 makes the default options ignored (no checkboxes checked).

fidelleon avatar May 17 '18 20:05 fidelleon

Hi, Did you find a solution to your problem? I'm facing it too...

elisaprio avatar Oct 17 '18 09:10 elisaprio

Try to specify in this way: default=('1','3')

rustaveli avatar Jan 14 '19 11:01 rustaveli

Try to specify in this way: default=('1','3')

.... and that made the trick :-) Thanks!

fidelleon avatar Jan 16 '19 09:01 fidelleon

Closing, since this is very old and outdated.

blag avatar May 24 '24 19:05 blag