Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2016-01-13 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  master
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  BoundField,  | Triage Stage:  Accepted
  as_widget, hidden, initial,|
  hidden_initial |
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  1
-+-
Changes (by srkunze):

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


--
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/065.ec86b6f625f3b4834d0c4b8c14901e11%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-05-06 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:  Accepted
  as_widget, hidden, initial,|
  hidden_initial |
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  1
-+-
Changes (by timgraham):

 * version:  1.8beta1 => 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/065.db3ba87a7a38d275948d722e744018c5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-03-23 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.8beta1
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:  Accepted
  as_widget, hidden, initial,|
  hidden_initial |
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  1
-+-
Changes (by srkunze):

 * keywords:  BoundField, as_widget => BoundField, as_widget, hidden,
 initial, hidden_initial
 * needs_docs:  0 => 1


--
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/065.22dcfae033603fdfb187d6fa768b063c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-03-21 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.8beta1
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:  Accepted
  as_widget  |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  1
-+-

Comment (by srkunze):

 > Well, I guess we can accept the ticket, but even after spending time
 looking at it, I still don't have a good understanding of the problem(s)

 I actually hoped you would be the one telling me. :D

 > or what a solution might look like.

 After our conversation and looking at the test-cases, I am even unsure if
 my patch would touch the heart of the problem.

 That is, btw., why I asked about the relationship between data and value.
 However, as it seems the problem lies even deeper.

--
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/065.3ae2b5b05d9a6114dd3e8675c1ff92ca%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-03-20 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.8beta1
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:  Accepted
  as_widget  |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  1
-+-
Changes (by timgraham):

 * needs_better_patch:  0 => 1
 * has_patch:  0 => 1
 * needs_tests:  1 => 0
 * stage:  Unreviewed => Accepted


Comment:

 Well, I guess we can accept the ticket, but even after spending time
 looking at it, I still don't have a good understanding of the problem(s)
 or what a solution might look like.

--
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/065.d23c74ce5ac44996e5f73b32d4bb7142%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-03-20 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.8beta1
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-

Comment (by srkunze):

 Here, we go:
 
https://github.com/srkunze/django/commit/c1fdbeeb19a41b2f3dcc09f501bd5ff9298b846d

 14 tests now:
 {{{
 D1) FAILEDtest_boundfield__unbound_form__date
 D2) FAILEDtest_boundfield__changed_bound_form__date
 D3) FAILEDtest_boundfield__changed_bound_form__bogus_initial__date
 D4) FAILEDtest_boundfield__changed_bound_form__missing_initial__date
 D5) SUCCEEDED test_boundfield__unchanged_bound_form__date
 D6) SUCCEEDED test_boundfield__unchanged_bound_form__missing_initial__date

 I1) SUCCEEDED test_boundfield__unbound_form__integer
 I2) FAILEDtest_boundfield__changed_bound_form__integer
 I3) FAILEDtest_boundfield__changed_bound_form__bogus_initial__integer
 I4) FAILED
 test_boundfield__changed_bound_form__missing_initial__integer
 I5) SUCCEEDED test_boundfield__unchanged_bound_form__integer
 I6) SUCCEEDED
 test_boundfield__unchanged_bound_form__missing_initial__integer
 }}}


 **unbound_form** - should be clear
 **changed_bound_form** - form with data that has changed with regard to
 initial
 **unchanged_bound_form** - form with data that has not changed with regard
 to initial
 **bogus_initial** - user changed hidden initial
 **missing_initial** - browser did not send hidden initial

--
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/065.5f54d9791f96a53762861110deb7fe9e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-03-20 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.8beta1
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-

Comment (by srkunze):

 Replying to [comment:18 timgraham]:
 > I think datetimes maybe complicating the issue.

 Unfortunately, it is that complicated. Formatting (and its consistency
 over the life-time of the form) is the issue here. That is why I chose
 date inputs.

 Replying to [comment:18 timgraham]:
 > It seems like at least one of the issues is that for the following form:
 > {{{
 > class MyForm(forms.Form):
 > foo = forms.IntegerField(initial=1, show_hidden_initial=True)
 >
 > form = MyForm({'foo': 5})
 > }}}

 Actually, it should look like this as browsers send `initial-foo` as well:

 {{{
 form = MyForm({'foo': 5, 'initial-foo': 1})
 }}}



 > You expect the hidden input to be rendered with "1" instead of "5".
 > {{{
 > Foo:
 > 
 > 
 > }}}
 > Is that correct?

 Interesting. You accidentally found another error.

 I created another commit and added more tests to cover all that.

 > By the way, I tried looking at your tests, but they didn't pass even
 when I uncommented "# uncomment to see changes with correctly formatted
 hidden-initial" -- not sure if that was intended or not?

 The comments were currently not intended to make the tests pass. They just
 represent how **well-formed** POST data would look like IF the unbound
 form would have produced correctly formatted hidden-initial data.

--
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/065.9b42993bd9f55252012e56f067c0a3bf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-03-19 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.8beta1
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-

Comment (by timgraham):

 I think datetimes maybe complicating the issue. It seems like at least one
 of the issues is that for the following form:
 {{{
 class MyForm(forms.Form):
 foo = forms.IntegerField(initial=1, show_hidden_initial=True)

 form = MyForm({'foo': 5})
 }}}
 You expect the hidden input to be rendered with "1" instead of "5".
 {{{
 Foo:
 
 
 }}}
 Is that correct?

 By the way, I tried looking at your tests, but they didn't pass even when
 I uncommented "# uncomment to see changes with correctly formatted hidden-
 initial" -- not sure if that was intended or not?

--
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/065.3fb239f33a111ba6870bb4e929673a48%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-03-17 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.8beta1
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-

Comment (by srkunze):

 I hope this illustrates our problem:
 https://github.com/srkunze/django/commits/add_test_24347

 In case of an error of the form (thus, the form needs to be re-rendered),
 the hidden-initial should be re-rendered with the exact same value string
 as it was rendered in unbound state.

 Each different state of the form (corresponding to each written test):

 unbound
 bound + changed
 bound + unchanged

 shows a different behaviour (fails, fails, succeeds) which is unfortunate
 for our internal testing library.

 Replying to [comment:16 timgraham]:
 > I think the docstrings explain the difference between `data` and
 `value`. I wouldn't get caught up in the fact that `prepare_value()` is
 called with a variable named `data` even though its parameter is named
 `value`.

 Unfortunately, docstring explains data by saying "data" and value by
 saying "value". Thus, no relationship between data and value is defined
 clearly.

--
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/065.dd8b7356f9aef47d28485298c45fb3d5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-03-06 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.8beta1
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-

Comment (by timgraham):

 I think the docstrings explain the difference between `data` and `value`.
 I wouldn't get caught up in the fact that `prepare_value()` is called with
 a variable named `data` even though its parameter is named `value`.

--
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/065.d915c260d70adbf8496b6487254e0cff%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-03-06 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.8beta1
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-

Comment (by srkunze):

 I give it a try soon.


 In the meantime, I would appreciate it if you could elaborate on this:

 > Could somebody explain me the difference between '''data''' and
 '''value''' with regards to BoundFields? Looks quite messy to me (e.g.
 `BoundField.data` returns `value_from_datadict`; `prepare_value` gets
 `data`, but it expects `value` according to its definition).

--
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/065.e1c51f798f980413b4aa297145666a92%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-03-06 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.8beta1
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-

Comment (by timgraham):

 Could you write a test case so I can better understand the problem?

--
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/065.dfb3416f304a2b65df6ad8cf54a83980%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-03-06 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.8beta1
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-

Comment (by srkunze):

 You are welcome.

 Before continue working on it, I would like to discuss whether my patch
 makes sense and and I would like an answer on my PS.

--
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/065.86252dd248792e801a25c958033eb6f4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-03-06 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.8beta1
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-

Comment (by timgraham):

 Thanks for the details. Unfortunately your patch doesn't pass the test
 suite. Also, a new test showing the bug that's fixed is required. Will you
 continue working on it?

--
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/065.fdc6e6cc48946f877e668c4124a71fad%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-03-06 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.8beta1
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Changes (by srkunze):

 * status:  closed => new
 * version:  1.8alpha1 => 1.8beta1
 * resolution:  needsinfo =>


Comment:

 > It seems to me that BoundField.value/data need to use the field's widget
 rather than HiddenInput as the latter's value_from_datadict() doesn't know
 how to handle each field's data.

 It should use the HiddenInput all the time during the `as_hidden` call.

 Otherwise, the data given into a form and the data returned (e.g. after a
 POST) differs.

 Widgets set with `hidden_initial=True` render their data two times: with
 field.widget and with field.hidden_widget. Depending on whether or not its
 a bound form, results in different formatting of the value/data.


 This would be an example fix to show what I mean:
 
https://github.com/srkunze/django/commit/9480ce0c3853a47001bd12e339c263695c38978f


 `hidden_initial=True` results in `only_initial=True`. That means the
 '''hidden_initial parts''' of the POST data should not be changed.


 PS:
 Could somebody explain me the difference between '''data''' and
 '''value''' with regards to BoundFields? Looks quite messy to me (e.g.
 `BoundField.data` returns `value_from_datadict`; `prepare_value` gets
 `data`, but it expects `value` according to its definition).

--
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/065.f322dfc4c963b517707bd1ff431ffd41%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-03-03 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  1.8alpha1
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Changes (by timgraham):

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


--
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/065.8090d50e886fc7b9cd589e421b82e590%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-03-02 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.8alpha1
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-

Comment (by timgraham):

 I'm also having trouble understanding your problem. It seems to me that
 `BoundField.value/data` need to use the field's widget rather than
 `HiddenInput` as the latter's `value_from_datadict()` doesn't know how to
 handle each field's data. Can you offer a patch for this issue?

--
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/065.688cad6123fcbf773c5c4e5fee6282a8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-02-25 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.8alpha1
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Description changed by srkunze:

Old description:

> 'as_widget' has the parameter 'widget' which renders the field. However,
> this parameter is not used all the time during the 'as_widget' call.
>
> The method 'data', which is (indirectly via 'value') called by
> 'as_widget', ALWAYS uses the default widget of the field which leads to
> issues like formatting etc.
>
> We recognized this issue when using 'show_hidden_initial=True' and
> widgets for datetime objects.
>
> The problem can also be observed when using BoundField.as_hidden as it
> uses 'as_widget' as well.
>
> cf.
> as_widget:
> https://github.com/django/django/blob/master/django/forms/forms.py#L526
> data:
> https://github.com/django/django/blob/master/django/forms/forms.py#L569
> as_hidden:
> https://github.com/django/django/blob/master/django/forms/forms.py#L562
>
> Versions: 1.4, 1.5, 1.6, 1.7, 1.8, master

New description:

 'as_widget' has the parameter 'widget' which renders the field. However,
 this parameter is not used all the time during the 'as_widget' call.

 The method 'data', which is (indirectly via 'value') called by
 'as_widget', ALWAYS uses the default widget of the field which leads to
 issues like formatting etc.

 We recognized this issue when using 'show_hidden_initial=True' and widgets
 for datetime objects.

 The problem can also be observed when using BoundField.as_hidden as it
 uses 'as_widget' as well.

 cf.
 as_widget:
 https://github.com/django/django/blob/1.8a1/django/forms/forms.py#L566
 data:
 https://github.com/django/django/blob/1.8a1/django/forms/forms.py#L609
 as_hidden:
 https://github.com/django/django/blob/1.8a1/django/forms/forms.py#L602

 Versions: 1.4, 1.5, 1.6, 1.7, 1.8, 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/065.a98f01d62cac7c4c53d2e271a31d2d0f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-02-20 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.8alpha1
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Description changed by srkunze:

Old description:

> 'as_widget' has the parameter 'widget' which renders the field. However,
> this parameter is not used all the time during the 'as_widget' call.
>
> The method 'data', which is (indirectly via 'value') called by
> 'as_widget' ALWAYS used the default widget of the field which leads to
> issues like formatting etc.
>
> We recognized this issue when using 'show_hidden_initial=True' and
> widgets for datetime objects.
>
> The problem can also be observed when using BoundField.as_hidden as it
> uses 'as_widget' as well.
>
> cf.
> as_widget:
> https://github.com/django/django/blob/master/django/forms/forms.py#L526
> data:
> https://github.com/django/django/blob/master/django/forms/forms.py#L569
> as_hidden:
> https://github.com/django/django/blob/master/django/forms/forms.py#L562
>
> Versions: 1.4, 1.5, 1.6, 1.7, 1.8, master

New description:

 'as_widget' has the parameter 'widget' which renders the field. However,
 this parameter is not used all the time during the 'as_widget' call.

 The method 'data', which is (indirectly via 'value') called by
 'as_widget', ALWAYS uses the default widget of the field which leads to
 issues like formatting etc.

 We recognized this issue when using 'show_hidden_initial=True' and widgets
 for datetime objects.

 The problem can also be observed when using BoundField.as_hidden as it
 uses 'as_widget' as well.

 cf.
 as_widget:
 https://github.com/django/django/blob/master/django/forms/forms.py#L526
 data:
 https://github.com/django/django/blob/master/django/forms/forms.py#L569
 as_hidden:
 https://github.com/django/django/blob/master/django/forms/forms.py#L562

 Versions: 1.4, 1.5, 1.6, 1.7, 1.8, 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/065.8ee3413c11eeac5a8dabfd310d60f500%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-02-17 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.8alpha1
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Changes (by srkunze):

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


--
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/065.bc18081d55b3836cb41f6fcfdb5d2d9b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-02-17 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  1.8alpha1
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-

Comment (by srkunze):

 Replying to [comment:4 claudep]:
 > Replying to [ticket:24347 srkunze]:
 > > 'as_widget' has the parameter 'widget' which renders the field.
 However, this parameter is not used all the time during the 'as_widget'
 call.
 >
 > Sorry, but that's not true.

 It is true.

 > The widget parameter is used in `widget.render(...)` at the end of the
 method.

 I am not saying that this is the only possible place where the widget is
 used.

 > It's totally possible something is not working properly,

 Please, carefully read my ticket again as I described what's wrong:

 > The method 'data', which is (indirectly via 'value') called by
 'as_widget' ALWAYS used the default widget of the field which leads to
 issues like formatting etc.


 > but then we'll need a more thorough example to demonstrate the issue.

 Cf. my ticket again:

 > The problem can also be observed when using BoundField.as_hidden as it
 uses 'as_widget' as well.

 `BouldField.as_hidden` should always use the HiddenWidget during
 processing `BoundField.as_widget`, but `BouldField.data` uses the default
 widget which is not the HiddenWidget of course.

 A more concise presentation of the issue:


 `BoundField.as_hidden` ---> `BoundField.as_widget` ---> `BoundField.value`
 ---> `BoundField.data`

 "--->" means "uses"

 `BoundField.as_hidden` specifies the HiddenWidget when it calls
 `BoundField.as_widget`
 `BoundField.value` and `BoundField.data` do not respect the specified
 widget

 Hence, the output is flawed.

--
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/065.7b1ad5e40942a642fc8001ab400b97d6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-02-16 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  1.8alpha1
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Changes (by claudep):

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


Comment:

 Replying to [ticket:24347 srkunze]:
 > 'as_widget' has the parameter 'widget' which renders the field. However,
 this parameter is not used all the time during the 'as_widget' call.

 Sorry, but that's not true. The widget parameter is used in
 `widget.render(...)` at the end of the method. It's totally possible
 something is not working properly, but then we'll need a more thorough
 example to demonstrate the issue.

--
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/065.f6687db4bbc1f8c756cbb248417367d6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-02-16 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.8alpha1
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Changes (by srkunze):

 * version:  master => 1.8alpha1
 * needs_tests:  0 => 1


Old description:

> 'as_widget' has the parameter 'widget' which renders the field. However,
> this parameter is not used all the time during the 'as_widget' call.
>
> The method 'data', which is (indirectly via 'value') called by
> 'as_widget' ALWAYS used the default widget of the field which leads to
> issues like formatting etc.
>
> We recognized this issue when using 'show_hidden_initial=True' and
> widgets for datetime objects.
>
> The problem can also be observed when using BoundField.as_hidden as it
> uses 'as_widget' as well.
>
> cf.
> as_widget:
> https://github.com/django/django/blob/master/django/forms/forms.py#L526
> data:
> https://github.com/django/django/blob/master/django/forms/forms.py#L569
> as_hidden:
> https://github.com/django/django/blob/master/django/forms/forms.py#L562

New description:

 'as_widget' has the parameter 'widget' which renders the field. However,
 this parameter is not used all the time during the 'as_widget' call.

 The method 'data', which is (indirectly via 'value') called by 'as_widget'
 ALWAYS used the default widget of the field which leads to issues like
 formatting etc.

 We recognized this issue when using 'show_hidden_initial=True' and widgets
 for datetime objects.

 The problem can also be observed when using BoundField.as_hidden as it
 uses 'as_widget' as well.

 cf.
 as_widget:
 https://github.com/django/django/blob/master/django/forms/forms.py#L526
 data:
 https://github.com/django/django/blob/master/django/forms/forms.py#L569
 as_hidden:
 https://github.com/django/django/blob/master/django/forms/forms.py#L562

 Versions: 1.4, 1.5, 1.6, 1.7, 1.8, 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/065.eb464a25e566b1d06f1216687647637d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-02-16 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Description changed by srkunze:

Old description:

> 'as_widget' has the parameter 'widget' which renders the field. However,
> this parameter is not used all the time during the 'as_widget' call.
>
> The method 'data', which is called by 'as_widget' ALWAYS used the default
> widget of the field which leads to issues like formatting etc.
>
> We recognized this issue when using 'show_hidden_initial=True' and
> widgets for datetime objects.
>
> The problem can also be observed when using BoundField.as_hidden as it
> uses 'as_widget' as well.
>
> cf.
> as_widget:
> https://github.com/django/django/blob/master/django/forms/forms.py#L526
> data:
> https://github.com/django/django/blob/master/django/forms/forms.py#L569
> as_hidden:
> https://github.com/django/django/blob/master/django/forms/forms.py#L562

New description:

 'as_widget' has the parameter 'widget' which renders the field. However,
 this parameter is not used all the time during the 'as_widget' call.

 The method 'data', which is (indirectly via 'value') called by 'as_widget'
 ALWAYS used the default widget of the field which leads to issues like
 formatting etc.

 We recognized this issue when using 'show_hidden_initial=True' and widgets
 for datetime objects.

 The problem can also be observed when using BoundField.as_hidden as it
 uses 'as_widget' as well.

 cf.
 as_widget:
 https://github.com/django/django/blob/master/django/forms/forms.py#L526
 data:
 https://github.com/django/django/blob/master/django/forms/forms.py#L569
 as_hidden:
 https://github.com/django/django/blob/master/django/forms/forms.py#L562

--

--
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/065.e22f2be5346f042965ab505c14722123%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-02-16 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  BoundField,  | Triage Stage:
  as_widget  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Changes (by srkunze):

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


Old description:

> 'as_widget' has the parameter 'widget' which renders the field. However,
> this parameter is not used all the time during the 'as_widget' call.
>
> The method 'data', which is called by 'as_widget' ALWAYS used the default
> widget of the field which leads to issues.
>
> We recognized this issue when using 'show_hidden_initial=True' and
> widgets for datetime objects.
>
> The problem can also be observed when using BoundField.as_hidden as it
> uses 'as_widget' as well.
>
> cf.
> as_widget:
> https://github.com/django/django/blob/master/django/forms/forms.py#L526
> data:
> https://github.com/django/django/blob/master/django/forms/forms.py#L569
> as_hidden:
> https://github.com/django/django/blob/master/django/forms/forms.py#L562

New description:

 'as_widget' has the parameter 'widget' which renders the field. However,
 this parameter is not used all the time during the 'as_widget' call.

 The method 'data', which is called by 'as_widget' ALWAYS used the default
 widget of the field which leads to issues like formatting etc.

 We recognized this issue when using 'show_hidden_initial=True' and widgets
 for datetime objects.

 The problem can also be observed when using BoundField.as_hidden as it
 uses 'as_widget' as well.

 cf.
 as_widget:
 https://github.com/django/django/blob/master/django/forms/forms.py#L526
 data:
 https://github.com/django/django/blob/master/django/forms/forms.py#L569
 as_hidden:
 https://github.com/django/django/blob/master/django/forms/forms.py#L562

--

--
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/065.3392b7120b6d33ef341f0bc7f8f37a8b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #24347: parameter 'widget' of BoundField.as_widget is ignored

2015-02-16 Thread Django
#24347: parameter 'widget' of BoundField.as_widget is ignored
+---
 Reporter:  srkunze |  Owner:  nobody
 Type:  Bug | Status:  new
Component:  Forms   |Version:  master
 Severity:  Normal  |   Keywords:  BoundField, as_widget
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  0   |  UI/UX:  1
+---
 'as_widget' has the parameter 'widget' which renders the field. However,
 this parameter is not used all the time during the 'as_widget' call.

 The method 'data', which is called by 'as_widget' ALWAYS used the default
 widget of the field which leads to issues.

 We recognized this issue when using 'show_hidden_initial=True' and widgets
 for datetime objects.

 The problem can also be observed when using BoundField.as_hidden as it
 uses 'as_widget' as well.

 cf.
 as_widget:
 https://github.com/django/django/blob/master/django/forms/forms.py#L526
 data:
 https://github.com/django/django/blob/master/django/forms/forms.py#L569
 as_hidden:
 https://github.com/django/django/blob/master/django/forms/forms.py#L562

--
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/050.ad628a6ce29127f72630c681afc7e495%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.