Re: [Django] #27416: ModelFormSet with queryset accepts invalid POST data for outer models and create unexpected empty data.

2016-12-06 Thread Django
#27416: ModelFormSet with queryset accepts invalid POST data for outer models 
and
create unexpected empty data.
-+-
 Reporter:  Hiroki Kiyohara  |Owner:  Hiroki
 |  Kiyohara
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  1.10
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  formset,modelform| Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Hiroki Kiyohara):

 Thank you.

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


Re: [Django] #27416: ModelFormSet with queryset accepts invalid POST data for outer models and create unexpected empty data.

2016-12-06 Thread Django
#27416: ModelFormSet with queryset accepts invalid POST data for outer models 
and
create unexpected empty data.
-+-
 Reporter:  Hiroki Kiyohara  |Owner:  Hiroki
 |  Kiyohara
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  1.10
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  formset,modelform| Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"181f492ad021aeb43105aa9d38106ad7baf00211" 181f492a]:
 {{{
 #!CommitTicketReference repository=""
 revision="181f492ad021aeb43105aa9d38106ad7baf00211"
 Fixed #27416 -- Prevented ModelFormSet from creating objects for invalid
 PKs in 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/066.6e9e8aa0fca6e396374f0fa1b68d5019%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27416: ModelFormSet with queryset accepts invalid POST data for outer models and create unexpected empty data.

2016-12-01 Thread Django
#27416: ModelFormSet with queryset accepts invalid POST data for outer models 
and
create unexpected empty data.
-+-
 Reporter:  Hiroki Kiyohara  |Owner:  Hiroki
 |  Kiyohara
 Type:  Bug  |   Status:  assigned
Component:  Forms|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:  formset,modelform| Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * stage:  Accepted => Ready for checkin


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


Re: [Django] #27416: ModelFormSet with queryset accepts invalid POST data for outer models and create unexpected empty data.

2016-11-09 Thread Django
#27416: ModelFormSet with queryset accepts invalid POST data for outer models 
and
create unexpected empty data.
-+-
 Reporter:  Hiroki Kiyohara  |Owner:  Hiroki
 |  Kiyohara
 Type:  Bug  |   Status:  assigned
Component:  Forms|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:  formset,modelform| Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Hiroki Kiyohara):

 > Without changes of the code, It will be 3, (author, other_author, and
 unexpected empty data). The other_author.name won't be "Changed name"

 I checked that it's correct.

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


Re: [Django] #27416: ModelFormSet with queryset accepts invalid POST data for outer models and create unexpected empty data.

2016-11-09 Thread Django
#27416: ModelFormSet with queryset accepts invalid POST data for outer models 
and
create unexpected empty data.
-+-
 Reporter:  Hiroki Kiyohara  |Owner:  Hiroki
 |  Kiyohara
 Type:  Bug  |   Status:  assigned
Component:  Forms|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:  formset,modelform| Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Hiroki Kiyohara):

 Thank you. I want to check not to exist the "empty data", so the test has
 `self.assertEqual(Author.objects.count(), 2)`.
 Without chanes of the code, It will be `3`, (`author`, `other_author`, and
 unexpected empty data). The `other_author.name` won't be `"Changed name"`
 even we don't chande codes.

 I'll check something I said is correct again later.
 If you feel the test or changes is hard to understand, I'll improve so
 please give me any advices.

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


Re: [Django] #27416: ModelFormSet with queryset accepts invalid POST data for outer models and create unexpected empty data.

2016-11-09 Thread Django
#27416: ModelFormSet with queryset accepts invalid POST data for outer models 
and
create unexpected empty data.
-+-
 Reporter:  Hiroki Kiyohara  |Owner:  Hiroki
 |  Kiyohara
 Type:  Bug  |   Status:  assigned
Component:  Forms|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:  formset,modelform| Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * stage:  Unreviewed => Accepted


Comment:

 I did some testing and the patch looks reasonable, although I'd like
 another set of eyes.

 Using the test in your patch, I didn't see the "empty data" object you
 described. Without the fix, the new object has `name='Changed name'`,
 doesn't 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/066.828c0bf5fb84c2e7bc21749c6b4d2610%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27416: ModelFormSet with queryset accepts invalid POST data for outer models and create unexpected empty data.

2016-11-02 Thread Django
#27416: ModelFormSet with queryset accepts invalid POST data for outer models 
and
create unexpected empty data.
-+-
 Reporter:  Hiroki Kiyohara  |Owner:  Hiroki
 |  Kiyohara
 Type:  Bug  |   Status:  assigned
Component:  Forms|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:  formset,modelform| Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Hiroki Kiyohara):

 Thanks Tim for your quick response.

 And I agree with you, If we want to prohibit the creation of new
 instances, the ticket #26142 is the best.
 Actually #26142 will solve a latest problem on my working project
 (Creation of unexpected instance by invalid POST param).
 As Tim explained, now the second question is whether invalid POST data
 should create new empty instance or not.

 I'm thinking it's not expected behavior. Because it will create
 unvalidated empty instance. not so explicit.
 But I'm not strongly sure. so I want some others opinion or I'll take time
 to re-think about it.

 I deleted `extra=0` argument on the PR (now it seems unrelated thing).
 
https://github.com/django/django/pull/7462/commits/20d4b8073c0f028ee23feb68f42cdd58549d58fa

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


Re: [Django] #27416: ModelFormSet with queryset accepts invalid POST data for outer models and create unexpected empty data.

2016-11-02 Thread Django
#27416: ModelFormSet with queryset accepts invalid POST data for outer models 
and
create unexpected empty data.
-+-
 Reporter:  Hiroki Kiyohara  |Owner:  Hiroki
 |  Kiyohara
 Type:  Bug  |   Status:  assigned
Component:  Forms|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:  formset,modelform| Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham):

 My first instinct is that this is a duplicate of #26142 but the fact that
 the extra instances are created without the supplied data leaves a
 question as to whether or not the current behavior is actually useful. As
 #27416 says, `extra=0` isn't really meant to prohibit the creation of new
 instances. Without digging into the details, I'd say it might be
 appropriate to fix the current behavior to create instances with the
 provided data (as a separate ticket) and then in this ticket add a new
 `modelformset_factory()` parameter to prohibit the creation of new
 instances.

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


Re: [Django] #27416: ModelFormSet with queryset accepts invalid POST data for outer models and create unexpected empty data.

2016-11-02 Thread Django
#27416: ModelFormSet with queryset accepts invalid POST data for outer models 
and
create unexpected empty data.
-+-
 Reporter:  Hiroki Kiyohara  |Owner:  Hiroki
 |  Kiyohara
 Type:  Bug  |   Status:  assigned
Component:  Forms|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:  formset,modelform| Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Hiroki Kiyohara):

 * has_patch:  0 => 1


Comment:

 Opened a Pull Request https://github.com/django/django/pull/7462

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