Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2016-05-07 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+-
 Reporter:  mrmachine|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  DateTimeField| Triage Stage:  Ready for
  SplitDateTimeWidget|  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"86b346435a6735484c23fc9c798cf5243cbf8124" 86b34643]:
 {{{
 #!CommitTicketReference repository=""
 revision="86b346435a6735484c23fc9c798cf5243cbf8124"
 [1.9.x] Refs #8898 -- Documented requirement to use SplitDateTimeField
 with SplitDateTimeWidget.

 Backport of 6b5926978bfbaebc6e3b96bb2c8e5bc8302ac6b0 from 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/067.350ecfdedbcda042c4eb0bd190548df1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2016-05-07 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+-
 Reporter:  mrmachine|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  DateTimeField| Triage Stage:  Ready for
  SplitDateTimeWidget|  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"6b5926978bfbaebc6e3b96bb2c8e5bc8302ac6b0" 6b592697]:
 {{{
 #!CommitTicketReference repository=""
 revision="6b5926978bfbaebc6e3b96bb2c8e5bc8302ac6b0"
 Refs #8898 -- Documented requirement to use SplitDateTimeField with
 SplitDateTimeWidget.
 }}}

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


Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2015-01-17 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+-
 Reporter:  mrmachine|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  DateTimeField| Triage Stage:  Ready for
  SplitDateTimeWidget|  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"714277cb4cedd8290101f9c6b3e6382f192ae177"]:
 {{{
 #!CommitTicketReference repository=""
 revision="714277cb4cedd8290101f9c6b3e6382f192ae177"
 Removed support for SplitDateTimeWidget with DateTimeField per deprecation
 timeline.

 refs #8898
 }}}

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


Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2014-01-11 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+-
 Reporter:  mrmachine|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  DateTimeField| Triage Stage:  Ready for
  SplitDateTimeWidget|  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Claude Paroz ):

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


Comment:

 In [changeset:"0179852d7faf461d55cf3ae69393abb3f3cd2910"]:
 {{{
 #!CommitTicketReference repository=""
 revision="0179852d7faf461d55cf3ae69393abb3f3cd2910"
 Fixed #8898 -- Obsoleted SplitDateTimeWidget usage with DateTimeField

 Thanks Tim Graham for the review.
 }}}

-- 
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/067.ed6dca6215af81027539fa18f0aff512%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2013-12-28 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+-
 Reporter:  mrmachine|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  DateTimeField| Triage Stage:  Ready for
  SplitDateTimeWidget|  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timo):

 * stage:  Accepted => Ready for checkin


Comment:

 Needs a line in the release notes, otherwise LGTM.

-- 
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/067.42754b937865e8396088e79fc32d7289%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2013-12-04 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+-
 Reporter:  mrmachine|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  DateTimeField| Triage Stage:  Accepted
  SplitDateTimeWidget|  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by claudep):

 It may be that #15511 filled the above use case (setting
 `require_all_fields` to `False`, then
 `SplitDateTimeField.fields[1].required` to `False` in a
 `SplitDateTimeField` subclass).
 @mrmachine, can you confirm?

-- 
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/067.7be2ce67a8878648487592eb38e6b158%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2013-12-04 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+-
 Reporter:  mrmachine|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  DateTimeField| Triage Stage:  Accepted
  SplitDateTimeWidget|  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by claudep):

 Reading ticket #9721, it appears that `DateTimeField` with
 `SplitDateTimeWidget` may be used when only the time part of the field is
 optional, which would not be possible with `SplitDateTimeField`. To be
 investigated...

-- 
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/067.be1242a7eacd0c2d3ef5bb6b6d3078d1%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2013-12-04 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+-
 Reporter:  mrmachine|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  DateTimeField| Triage Stage:  Accepted
  SplitDateTimeWidget|  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by claudep):

 * needs_better_patch:  1 => 0


Comment:

 https://github.com/django/django/pull/2028

-- 
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/067.16169054fb2f02d64a8ce0b66822aeb3%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2011-04-09 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+-
   Reporter:  mrmachine  |Owner:  nobody
   Type:  Bug|   Status:  new
  Milestone: |Component:  Forms
Version:  SVN| Severity:  Normal
 Resolution: | Keywords:  DateTimeField
   Triage Stage:  Accepted   |  SplitDateTimeWidget
Needs documentation:  0  |Has patch:  1
Patch needs improvement:  1  |  Needs tests:  0
-+-
Changes (by julien):

 * type:   => Bug
 * severity:   => Normal


Comment:

 See #13205 for a related 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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2011-02-21 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+--
   Reporter:  mrmachine  | Owner:  nobody   

 Status:  new| Milestone:   

  Component:  Forms  |   Version:  SVN  

 Resolution: |  Keywords:  DateTimeField 
SplitDateTimeWidget
   Triage Stage:  Accepted   | Has patch:  1

Needs documentation:  0  |   Needs tests:  0

Patch needs improvement:  1  |  
-+--
Changes (by lukeplant):

  * needs_better_patch:  0 => 1


Comment:

 Marking as patch needs improvement on the basis of Carl's comments.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2010-12-23 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
+---
  Reporter:  mrmachine  | Owner:  nobody
   
Status:  new| Milestone:
   
 Component:  Forms  |   Version:  SVN   
   
Resolution: |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Accepted   | Has_patch:  1 
   
Needs_docs:  0  |   Needs_tests:  0 
   
Needs_better_patch:  0  |  
+---
Changes (by jgelens):

 * cc: jgel...@gmail.com (added)

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2010-11-18 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
+---
  Reporter:  mrmachine  | Owner:  nobody
   
Status:  new| Milestone:
   
 Component:  Forms  |   Version:  SVN   
   
Resolution: |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Accepted   | Has_patch:  1 
   
Needs_docs:  0  |   Needs_tests:  0 
   
Needs_better_patch:  0  |  
+---
Changes (by carljm):

  * stage:  Design decision needed => Accepted

Comment:

 I agree with Karen that DateTimeField should not be used with
 SplitDateTimeWidget, and that adding ad-hoc multi-widget support to
 formfield clean() methods is a bad idea. That code in
 DateTimeField.clean() can't be removed immediately due to backwards-
 compat, but I would consider a patch with a PendingDeprecationWarning that
 refers people to SplitDateTimeField and allows us to remove that code in a
 couple releases. This should come with appropriate documentation and a
 note in the deprecation docs as well.

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2010-08-24 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+--
  Reporter:  mrmachine   | Owner:  nobody   

Status:  new | Milestone:   

 Component:  Forms   |   Version:  SVN  

Resolution:  |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Design decision needed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

Needs_better_patch:  0   |  
-+--
Comment (by lrekucki):

 Duplicated again by #14044.

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2009-12-02 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+--
  Reporter:  mrmachine   | Owner:  nobody   

Status:  new | Milestone:   

 Component:  Forms   |   Version:  SVN  

Resolution:  |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Design decision needed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

Needs_better_patch:  0   |  
-+--
Comment (by samueladam):

 Another idea could be to attach EMPTY_VALUES to the Field and have the
 Widget edit it.

 I bypassed this bug using forms.SplitDateTimeField.

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.




Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2009-12-02 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+--
  Reporter:  mrmachine   | Owner:  nobody   

Status:  new | Milestone:   

 Component:  Forms   |   Version:  SVN  

Resolution:  |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Design decision needed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

Needs_better_patch:  0   |  
-+--
Comment (by kmtracey):

 #12303 reported this again, and provided an alternative fix.

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.




Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2009-09-19 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+--
  Reporter:  mrmachine   | Owner:  nobody   

Status:  new | Milestone:   

 Component:  Forms   |   Version:  SVN  

Resolution:  |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Design decision needed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

Needs_better_patch:  0   |  
-+--
Comment (by anonymous):

 This bug has wider implications - if you have a form field with a
 MultiWidget, and you set it to required = False, then if you don't input
 anything in the widgets - it will tell you that you must input a value.
 The code which is flawed is this, inside clean() of a Field:

 if value in EMPTY_VALUES:
 return None

 if you have 2 widgets then value == ['', ''] for an empty input, and the
 above doesn't work.

 I will circumvent this in my code, but it'd be nice if it got corrected :)

-- 
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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2009-08-27 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+--
  Reporter:  mrmachine   | Owner:  nobody   

Status:  new | Milestone:   

 Component:  Forms   |   Version:  SVN  

Resolution:  |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Design decision needed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

Needs_better_patch:  0   |  
-+--
Changes (by gvangool):

 * cc: gertvang...@gmail.com (added)

-- 
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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2009-04-23 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+--
  Reporter:  mrmachine   | Owner:  nobody   

Status:  new | Milestone:   

 Component:  Forms   |   Version:  SVN  

Resolution:  |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Design decision needed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

Needs_better_patch:  0   |  
-+--
Comment (by kmtracey):

 Also related: #9721.  That one wants to mix together the
 !SplitDateTimeWidget with a !DateTimeField in order to allow for an
 optional time component.  Perhaps that is why !DateTimeField was given
 some support for getting input from a !SplitDateTimeWidget in the first
 place?  If so I think a better approach could be to add support for that
 kind of thing to the !SplitDateTimeField/!SplitDateTimeWidget combo rather
 than trying to mix a split widget with a non-split field.

-- 
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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2009-03-15 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+--
  Reporter:  mrmachine   | Owner:  nobody   

Status:  new | Milestone:   

 Component:  Forms   |   Version:  SVN  

Resolution:  |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Design decision needed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

Needs_better_patch:  0   |  
-+--
Comment (by mrmachine):

 The new bug I stumbled across already has a ticket with patch, #10059, but
 this vestigial code should still be removed :)

-- 
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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2009-03-15 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+--
  Reporter:  mrmachine   | Owner:  nobody   

Status:  new | Milestone:   

 Component:  Forms   |   Version:  SVN  

Resolution:  |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Design decision needed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

Needs_better_patch:  0   |  
-+--
Comment (by mrmachine):

 I was using a custom `DateTimeField` in my models which had a
 `formfield()` method that always used
 `django.contrib.localflavor.generic.forms.DateTimeField` as the form class
 so I wouldn't have to set input formats everywhere.

 This was overriding the form class specified in
 `BaseModelAdmin.formfield_for_dbfield` for `DateTimeField` db fields and
 exposing the validation bug in `forms.DateTimeField`, which was to bypass
 the "required" validation when used with `SplitDateTimeWidget`.

 In [9760] `ModelAdmin.formfield_for_dbfield` was re-factored and no longer
 treated my custom `DateTimeField` as a `models.DateTimeField`, because the
 new code checks if `db_field.__class__` is in `self.formfield_overrides`
 instead of using `isinstance()`.

 To summarise:

  - The bug in `forms.DateTimeField` when used with `SplitDateTimeWidget`
 still exists, though this combination is not normally found in Django
 core. I suggest that we should still remove this vestigial code to avoid
 confusion and make subclassing `forms.DateTimeField` easier. After all,
 `MultiWidget` should only be used with `MultiValueField`.

  - A new bug (I'd call it a bug - it is a change in behaviour) exists
 where subclassed model fields are not recognised as their parent class in
 `BaseModelAdmin.formfield_for_dbfield()`. I suppose the fix for this would
 be to loop over `self.formfield_overrides` and check with `isinstance()`
 in each iteration. When there's a match, update `kwargs` and return.

-- 
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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2009-03-15 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+--
  Reporter:  mrmachine   | Owner:  nobody   

Status:  new | Milestone:   

 Component:  Forms   |   Version:  SVN  

Resolution:  |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Design decision needed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

Needs_better_patch:  0   |  
-+--
Changes (by doza):

 * cc: d...@fren.pl (added)

-- 
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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2009-02-16 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+--
  Reporter:  mrmachine   | Owner:  nobody   

Status:  new | Milestone:   

 Component:  Forms   |   Version:  SVN  

Resolution:  |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Design decision needed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

Needs_better_patch:  0   |  
-+--
Changes (by jacob):

  * stage:  Accepted => Design decision needed

Comment:

 Replying to [comment:8 mrmachine]:
 > It's currently impossible to use an optional DateTimeField in the Django
 admin, with an exception being generated if no value is specified.

 That doesn't seem to be true; this works fine for me:

 {{{
 class Bug8898(models.Model):
 timestamp = models.DateTimeField(blank=True, null=True)
 }}}

 I'm thinking there's not a bug here -- as Karen said, `SplitDateTimeField`
 is the right choice here -- but if there is can you please clarify how (if
 at all) this breaks forms and/or the admin?

-- 
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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2008-12-09 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
+---
  Reporter:  mrmachine  | Owner:  nobody
   
Status:  new| Milestone:
   
 Component:  Forms  |   Version:  SVN   
   
Resolution: |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Accepted   | Has_patch:  1 
   
Needs_docs:  0  |   Needs_tests:  0 
   
Needs_better_patch:  0  |  
+---
Changes (by mrmachine):

  * needs_better_patch:  1 => 0

Comment:

 Just to make sure that the attached patch shouldn't be considered a red
 flag or incomplete, I've updated it to return None as per the
 documentation and updated the tests to match.

-- 
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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2008-12-01 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
+---
  Reporter:  mrmachine  | Owner:  nobody
   
Status:  new| Milestone:
   
 Component:  Forms  |   Version:  SVN   
   
Resolution: |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Accepted   | Has_patch:  1 
   
Needs_docs:  0  |   Needs_tests:  0 
   
Needs_better_patch:  1  |  
+---
Comment (by mrmachine):

 If we can't remove it, and it seems we can't due to backwards
 compatibility (regardless of the reasons why it was added), can we get
 this fix committed? It's currently impossible to use an optional
 DateTimeField in the Django admin, with an exception being generated if no
 value is specified.

-- 
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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2008-11-08 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
+---
  Reporter:  mrmachine  | Owner:  nobody
   
Status:  new| Milestone:
   
 Component:  Forms  |   Version:  SVN   
   
Resolution: |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Accepted   | Has_patch:  1 
   
Needs_docs:  0  |   Needs_tests:  0 
   
Needs_better_patch:  1  |  
+---
Changes (by kmtracey):

  * needs_better_patch:  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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2008-11-08 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
+---
  Reporter:  mrmachine  | Owner:  nobody
   
Status:  new| Milestone:
   
 Component:  Forms  |   Version:  SVN   
   
Resolution: |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Accepted   | Has_patch:  1 
   
Needs_docs:  0  |   Needs_tests:  0 
   
Needs_better_patch:  0  |  
+---
Comment (by kmtracey):

 I don't believe the patch is correct as coded.  !DateTimeField is
 documented to return None for an empty value
 (http://docs.djangoproject.com/en/dev/ref/forms/fields/#datetimefield) and
 the patch has it returning a list in the case of empty input from a
 !SplitDateTimeWidget.  But it's not necessary to post another patch
 because that I could fix myself.

 Before fixing this I think it would be good to understand why
 !DateTimeField is even worried about getting input from a
 !SplitDateTimeWidget.  As noted above, it seems that is what
 !SplitDateTimeField is for?  The code was added in [6577] without
 reference to a ticket.  Malcolm, do you recall why you added this?  And do
 you have any recommendation as to whether it would be better to remove the
 half-working support entirely, make a fix along the lines of the patch, or
 ...?  Strict backwards-compatibility would seem to require we can't remove
 it at this point

-- 
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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2008-11-02 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
+---
  Reporter:  mrmachine  | Owner:  nobody
   
Status:  new| Milestone:
   
 Component:  Forms  |   Version:  SVN   
   
Resolution: |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Accepted   | Has_patch:  1 
   
Needs_docs:  0  |   Needs_tests:  0 
   
Needs_better_patch:  0  |  
+---
Changes (by mrmachine):

  * stage:  Design decision needed => Accepted

Comment:

 As per [http://groups.google.com/group/django-
 developers/browse_thread/thread/5c6a74a45cedb7bd Karen's request], I'm
 moving this back to `accepted`, as the DDN was not intended to raise any
 red flags. The bug should be fixed, has a working patch with tests, and
 the previous suggestion to remove `SplitDateTimeWidget` validation from
 `DateTimeField` would be a backwards incompatible change that should have
 been raised in a separate ticket.

-- 
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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2008-10-15 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+--
  Reporter:  mrmachine   | Owner:  nobody   

Status:  new | Milestone:   

 Component:  Forms   |   Version:  SVN  

Resolution:  |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Design decision needed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

Needs_better_patch:  0   |  
-+--
Changes (by zgoda):

 * cc: [EMAIL PROTECTED] (added)

-- 
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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #8898: `required` validation bypassed when using `DateTimeField` with `SplitDateTimeWidget`.

2008-09-16 Thread Django
#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
-+--
  Reporter:  mrmachine   | Owner:  nobody   

Status:  new | Milestone:   

 Component:  Forms   |   Version:  SVN  

Resolution:  |  Keywords:  DateTimeField 
SplitDateTimeWidget
 Stage:  Design decision needed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

Needs_better_patch:  0   |  
-+--
Changes (by mrmachine):

  * stage:  Unreviewed => Design decision needed

Comment:

 After some further digging and discussion in #django-dev, I believe that
 the validation in `DateTimeField.clean` which is specific for
 `SplitDateTimeWidget` should be removed, and users should be guided to use
 `SplitDateTimeField` if they want to use `SplitDateTimeWidget`.

 It seems that the intention is for `MultiValueField` and
 `MultiValueWidget` to be used together, and catching this edge case in
 `DateTimeField` to allow it to work with `SplitDateTimeWidget` actually
 makes it more difficult for users who might want to subclass
 `DateTimeField` and override `clean` to validate against their own
 `MultiValueWidget`, because the super class contains validation
 specifically for a two item tuple value from `MultiValueWidget`.

 This special case validation doesn't actually work properly now anyway, as
 it bypasses the `required` validation.

 I'm not sure about the history of `DateTimeField` or how and why this
 validation was added, so I'm bumping this to DDN.

-- 
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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---