Re: [Django] #27220: MultiWidget not considered in form submit

2016-09-13 Thread Django
#27220: MultiWidget not considered in form submit
--+--
 Reporter:  andreage  |Owner:  nobody
 Type:  Bug   |   Status:  closed
Component:  Forms |  Version:  master
 Severity:  Normal|   Resolution:  duplicate
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by timgraham):

 * status:  new => closed
 * resolution:   => duplicate


Comment:

 Duplicate of #27186. Please check the patch there.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.ae5403f209a5cb5b343f9ac13603171f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27220: MultiWidget not considered in form submit

2016-09-13 Thread Django
#27220: MultiWidget not considered in form submit
--+--
 Reporter:  andreage  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Forms |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by andreage):

 See also https://code.djangoproject.com/ticket/27186

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.a7c6600c87d1bbdf8c049af2a9782c6a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27220: MultiWidget not considered in form submit

2016-09-13 Thread Django
#27220: MultiWidget not considered in form submit
--+--
 Reporter:  andreage  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Forms |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by andreage):

 * version:  1.10 => master


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.c5fa369c929ee52bc0ccedf06b26222b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27220: MultiWidget not considered in form submit

2016-09-13 Thread Django
#27220: MultiWidget not considered in form submit
--+--
 Reporter:  andreage  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Forms |  Version:  1.10
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Description changed by andreage:

Old description:

> I have a custom widget for a field, for example:
>
> {{{
> class TestWidget(MultiWidget):
> def __init__(self, attrs=None):
> widgets = (
> Select(choices=func_start()),
> Select(choices=func_end())
> )
> super(TestWidget, self).__init__(widgets, attrs)
>
> ...
>

> class TestModel(models.Model)
>   test = ArrayField(models.PositiveSmallIntegerField(), default=list,
> blank=True)
>

> class TestForm(forms.ModelForm):
> def __init__(self, *args, **kwargs):
> super(TestForm, self).__init__(*args, **kwargs)
> self.fields['test'].widget = TestWidget(self.facility)
> }}}
>
> It's been working fine until Django 10.0. With Django 10.1 and
> specifically due to this commit it breaks.
>
> https://github.com/django/django/commit/4bc6b939944183533ae74791d21282e613f63a96
> #diff-70af885c2725fe87eb3b99a393268d10
>
> `f.name` in this commit would be "test", but `form.data` would contain
> "test_0" and "test_1". For this reason form field content is skipped and
> not saved to the model instance.

New description:

 I have a custom widget for a field, for example:

 {{{
 class TestWidget(MultiWidget):
 def __init__(self, attrs=None):
 widgets = (
 Select(choices=func_start()),
 Select(choices=func_end())
 )
 super(TestWidget, self).__init__(widgets, attrs)

 ...


 class TestModel(models.Model)
   test = ArrayField(models.PositiveSmallIntegerField(), default=list,
 blank=True)


 class TestForm(forms.ModelForm):
 def __init__(self, *args, **kwargs):
 super(TestForm, self).__init__(*args, **kwargs)
 self.fields['test'].widget = TestWidget()
 }}}

 It's been working fine until Django 10.0. With Django 10.1 and
 specifically due to this commit it breaks.

 
https://github.com/django/django/commit/4bc6b939944183533ae74791d21282e613f63a96
 #diff-70af885c2725fe87eb3b99a393268d10

 `f.name` in this commit would be "test", but `form.data` would contain
 "test_0" and "test_1". For this reason form field content is skipped and
 not saved to the model instance.

--

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.57b70dbd0a1c30c772e5c94d1402e05e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27220: MultiWidget not considered in form submit

2016-09-13 Thread Django
#27220: MultiWidget not considered in form submit
--+--
 Reporter:  andreage  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Forms |  Version:  1.10
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Description changed by andreage:

Old description:

> I have a custom widget for a field, for example:
>
> {{{
> class TestWidget(MultiWidget):
> def __init__(self, attrs=None):
> widgets = (
> Select(choices=func_start()),
> Select(choices=func_end())
> )
> super(TestWidget, self).__init__(widgets, attrs)
>
> ...
>

> class TestModel(models.Model)
>   test = ArrayField(models.PositiveSmallIntegerField(), default=list,
> blank=True)
>

> class TestForm(forms.ModelForm):
> def __init__(self, *args, **kwargs):
> super(TestForm, self).__init__(*args, **kwargs)
> self.fields['test'].widget = SlotsWidget(self.facility)
> }}}
>
> It's been working fine until Django 10.0. With Django 10.1 and
> specifically due to this commit it breaks.
>
> https://github.com/django/django/commit/4bc6b939944183533ae74791d21282e613f63a96
> #diff-70af885c2725fe87eb3b99a393268d10
>
> `f.name` in this commit would be "test", but `form.data` would contain
> "test_0" and "test_1". For this reason form field content is skipped and
> not saved to the model instance.

New description:

 I have a custom widget for a field, for example:

 {{{
 class TestWidget(MultiWidget):
 def __init__(self, attrs=None):
 widgets = (
 Select(choices=func_start()),
 Select(choices=func_end())
 )
 super(TestWidget, self).__init__(widgets, attrs)

 ...


 class TestModel(models.Model)
   test = ArrayField(models.PositiveSmallIntegerField(), default=list,
 blank=True)


 class TestForm(forms.ModelForm):
 def __init__(self, *args, **kwargs):
 super(TestForm, self).__init__(*args, **kwargs)
 self.fields['test'].widget = TestWidget(self.facility)
 }}}

 It's been working fine until Django 10.0. With Django 10.1 and
 specifically due to this commit it breaks.

 
https://github.com/django/django/commit/4bc6b939944183533ae74791d21282e613f63a96
 #diff-70af885c2725fe87eb3b99a393268d10

 `f.name` in this commit would be "test", but `form.data` would contain
 "test_0" and "test_1". For this reason form field content is skipped and
 not saved to the model instance.

--

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.c335cb518c6f2e2a672df31ee4e45dac%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27220: MultiWidget not considered in form submit

2016-09-13 Thread Django
#27220: MultiWidget not considered in form submit
--+--
 Reporter:  andreage  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Forms |  Version:  1.10
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Description changed by andreage:

Old description:

> I have a custom widget for a field, for example:
>
> {{{
> class TestWidget(MultiWidget):
> def __init__(self, attrs=None):
> widgets = (
> Select(choices=func_start()),
> Select(choices=func_end())
> )
> super(TestWidget, self).__init__(widgets, attrs)
>
> ...
>

> class TestModel(models.Model)
>   test = ArrayField(models.PositiveSmallIntegerField(), default=list,
> blank=True)
>

> class TestForm(forms.ModelForm):
> def __init__(self, *args, **kwargs):
> super(TestForm, self).__init__(*args, **kwargs)
> self.fields['test'].widget = SlotsWidget(self.facility)
> }}}
>
> It's been working fine until Django 10.0. With Django 10.1 and
> specifically due to this commit it breaks.
>
> https://github.com/django/django/commit/4bc6b939944183533ae74791d21282e613f63a96
> #diff-70af885c2725fe87eb3b99a393268d10
>
> `f.name` in this commit would be "test", but `form.data` would contain
> "test_0" and "test_1". For this reason form field content is skipped and
> not saved to the form instance.

New description:

 I have a custom widget for a field, for example:

 {{{
 class TestWidget(MultiWidget):
 def __init__(self, attrs=None):
 widgets = (
 Select(choices=func_start()),
 Select(choices=func_end())
 )
 super(TestWidget, self).__init__(widgets, attrs)

 ...


 class TestModel(models.Model)
   test = ArrayField(models.PositiveSmallIntegerField(), default=list,
 blank=True)


 class TestForm(forms.ModelForm):
 def __init__(self, *args, **kwargs):
 super(TestForm, self).__init__(*args, **kwargs)
 self.fields['test'].widget = SlotsWidget(self.facility)
 }}}

 It's been working fine until Django 10.0. With Django 10.1 and
 specifically due to this commit it breaks.

 
https://github.com/django/django/commit/4bc6b939944183533ae74791d21282e613f63a96
 #diff-70af885c2725fe87eb3b99a393268d10

 `f.name` in this commit would be "test", but `form.data` would contain
 "test_0" and "test_1". For this reason form field content is skipped and
 not saved to the model instance.

--

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.d1ce9c8b3d39d7d0ae3af82849a033f1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27220: MultiWidget not considered in form submit

2016-09-13 Thread Django
#27220: MultiWidget not considered in form submit
--+--
 Reporter:  andreage  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Forms |  Version:  1.10
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by andreage):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Old description:

> I have a custom widget for a field, for example:
>
> {{{
> class TestWidget(MultiWidget):
> def __init__(self, attrs=None):
> widgets = (
> Select(choices=func_start()),
> Select(choices=func_end())
> )
> super(TestWidget, self).__init__(widgets, attrs)
>
> ...
>

> class TestModel(models.Model)
>   test = ArrayField(models.PositiveSmallIntegerField(), default=list,
> blank=True)
>

> class TestForm(forms.ModelForm):
> def __init__(self, *args, **kwargs):
> super(TestForm, self).__init__(*args, **kwargs)
> self.fields['test'].widget = SlotsWidget(self.facility)
> }}}
>
> It's been working fine until Django 10.0. With Django 10.1 and
> specifically due to this commit it breaks.
>
> https://github.com/django/django/commit/4bc6b939944183533ae74791d21282e613f63a96
> #diff-70af885c2725fe87eb3b99a393268d10
>
> `f.name` in this commit would be "test", but `form.data` would contain
> "test_0" and "test_1". For this reason form content is skipped and not
> saved to the form instance.

New description:

 I have a custom widget for a field, for example:

 {{{
 class TestWidget(MultiWidget):
 def __init__(self, attrs=None):
 widgets = (
 Select(choices=func_start()),
 Select(choices=func_end())
 )
 super(TestWidget, self).__init__(widgets, attrs)

 ...


 class TestModel(models.Model)
   test = ArrayField(models.PositiveSmallIntegerField(), default=list,
 blank=True)


 class TestForm(forms.ModelForm):
 def __init__(self, *args, **kwargs):
 super(TestForm, self).__init__(*args, **kwargs)
 self.fields['test'].widget = SlotsWidget(self.facility)
 }}}

 It's been working fine until Django 10.0. With Django 10.1 and
 specifically due to this commit it breaks.

 
https://github.com/django/django/commit/4bc6b939944183533ae74791d21282e613f63a96
 #diff-70af885c2725fe87eb3b99a393268d10

 `f.name` in this commit would be "test", but `form.data` would contain
 "test_0" and "test_1". For this reason form field content is skipped and
 not saved to the form instance.

--

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.d8295b36c3f8fe0dc87c3ab70c726351%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27220: MultiWidget not considered in form submit

2016-09-13 Thread Django
#27220: MultiWidget not considered in form submit
+
 Reporter:  andreage|  Owner:  nobody
 Type:  Bug | Status:  new
Component:  Forms   |Version:  1.10
 Severity:  Normal  |   Keywords:
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  0   |  UI/UX:  0
+
 I have a custom widget for a field, for example:

 {{{
 class TestWidget(MultiWidget):
 def __init__(self, attrs=None):
 widgets = (
 Select(choices=func_start()),
 Select(choices=func_end())
 )
 super(TestWidget, self).__init__(widgets, attrs)

 ...


 class TestModel(models.Model)
   test = ArrayField(models.PositiveSmallIntegerField(), default=list,
 blank=True)


 class TestForm(forms.ModelForm):
 def __init__(self, *args, **kwargs):
 super(TestForm, self).__init__(*args, **kwargs)
 self.fields['test'].widget = SlotsWidget(self.facility)
 }}}

 It's been working fine until Django 10.0. With Django 10.1 and
 specifically due to this commit it breaks.

 
https://github.com/django/django/commit/4bc6b939944183533ae74791d21282e613f63a96
 #diff-70af885c2725fe87eb3b99a393268d10

 `f.name` in this commit would be "test", but `form.data` would contain
 "test_0" and "test_1". For this reason form content is skipped and not
 saved to the form instance.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.93ff523b5883a8ecb11794200f52ca2f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.