Re: [Django] #11008: dictsort and dictsortreversed template filters broken

2011-05-21 Thread Django
#11008: dictsort and dictsortreversed template filters broken
---+-
   Reporter:  ionut_bizau  |  Owner:  nobody
   Type:  Bug  | Status:  closed
  Milestone:   |  Component:  Template system
Version:  SVN  |   Severity:  Normal
 Resolution:  fixed|   Keywords:
   Triage Stage:  Accepted |  Has patch:  1
Needs documentation:  0|Needs tests:  1
Patch needs improvement:  1|  Easy pickings:  0
---+-
Changes (by julien):

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


Comment:

 This is actually working fine now. Probably fixed in [15316].

-- 
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] #11008: dictsort and dictsortreversed template filters broken

2010-06-07 Thread Django
#11008: dictsort and dictsortreversed template filters broken
--+-
  Reporter:  ionut_bizau  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  1|  
--+-
Comment (by nathan):

 I've run into this on numerous occasions. Any idea on when this'll be
 applied?

-- 
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] #11008: dictsort and dictsortreversed template filters broken

2009-10-28 Thread Django
#11008: dictsort and dictsortreversed template filters broken
--+-
  Reporter:  ionut_bizau  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  1|  
--+-
Comment (by eronen):

 The patch here fixes another problem in dictsort, too: unlike Python's
 sort,
 it's not stable sort (doesn't preserve the order when the sorting key is
 the same).
 See ticket #12110.

-- 
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] #11008: dictsort and dictsortreversed template filters broken

2009-06-17 Thread Django
#11008: dictsort and dictsortreversed template filters broken
--+-
  Reporter:  ionut_bizau  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  1|  
--+-
Comment (by Alex):

 Oh, I hadn't realized 2.3 didn't have it, though Django 1.1 will support
 2.3, this almost certainly won't get in until 1.2 at which point 2.3 will
 no longer be supported.

-- 
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] #11008: dictsort and dictsortreversed template filters broken

2009-06-17 Thread Django
#11008: dictsort and dictsortreversed template filters broken
--+-
  Reporter:  ionut_bizau  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  1|  
--+-
Comment (by ionut_bizau):

 It's only been deprecated since 2.6. So it's a question of whether Django
 needs to run on 2.3 or not. Also, seems cmp will be removed from 3.0. Does
 Django support 3.0 officially?

-- 
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] #11008: dictsort and dictsortreversed template filters broken

2009-06-17 Thread Django
#11008: dictsort and dictsortreversed template filters broken
--+-
  Reporter:  ionut_bizau  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  1|  
--+-
Comment (by ionut_bizau):

 OK. I was afraid to use key for compatibility reasons (Python 2.3 doesn't
 support it). Will look into the tests.

-- 
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] #11008: dictsort and dictsortreversed template filters broken

2009-06-17 Thread Django
#11008: dictsort and dictsortreversed template filters broken
--+-
  Reporter:  ionut_bizau  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  1|  
--+-
Comment (by SmileyChris):

 Where do the Python docs say `cmp` has been deprecated? At the very least,
 they show that `key` was introduced in 2.4 so we can't rely on that.

-- 
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] #11008: dictsort and dictsortreversed template filters broken

2009-06-17 Thread Django
#11008: dictsort and dictsortreversed template filters broken
--+-
  Reporter:  ionut_bizau  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  1|  
--+-
Comment (by Alex):

 It should use the key argument, not the cmp one, as cmp has been
 deprecated.  It also lacks tests.

-- 
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] #11008: dictsort and dictsortreversed template filters broken

2009-06-17 Thread Django
#11008: dictsort and dictsortreversed template filters broken
--+-
  Reporter:  ionut_bizau  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  1|  
--+-
Comment (by ionut_bizau):

 @Alex What's wrong with my patch?

-- 
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] #11008: dictsort and dictsortreversed template filters broken

2009-06-17 Thread Django
#11008: dictsort and dictsortreversed template filters broken
--+-
  Reporter:  ionut_bizau  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  1|  
--+-
Changes (by Alex):

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



Re: [Django] #11008: dictsort and dictsortreversed template filters broken

2009-06-16 Thread Django
#11008: dictsort and dictsortreversed template filters broken
--+-
  Reporter:  ionut_bizau  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  0|  
--+-
Changes (by SmileyChris):

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

-- 
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
-~--~~~~--~~--~--~---



[Django] #11008: dictsort and dictsortreversed template filters broken

2009-05-05 Thread Django
#11008: dictsort and dictsortreversed template filters broken
-+--
 Reporter:  ionut_bizau  |   Owner:  nobody
   Status:  new  |   Milestone:
Component:  Template system  | Version:  SVN   
 Keywords:   |   Stage:  Unreviewed
Has_patch:  1|  
-+--
 Using dictsort or dictsortreversed template filters for a list of
 dictionaries which contain dates will break if some of the dates are None,
 even if the sort field is not one of the date fields! This happens when
 the list contains at least two dictionaries for which the sort keys are
 equal.

 Example:

 {{{
 In [1]: from django.template import defaultfilters

 In [3]: from datetime import datetime

 In [4]: defaultfilters.dictsort([{'a': 1, 'b': datetime.now()}, {'a': 2,
 'b': None}, {'a': 1, 'b': None}], "a")
 ---
 TypeError Traceback (most recent call
 last)

 /XXX/ in ()

 
/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/django/template/defaultfilters.pyc
 in dictsort(value, arg)
 470 var_resolve = Variable(arg).resolve
 471 decorated = [(var_resolve(item), item) for item in value]
 --> 472 decorated.sort()
 473 return [item[1] for item in decorated]
 474 dictsort.is_safe = False

 TypeError: can't compare datetime.datetime to NoneType

 }}}

 My patch fixes this problem for both dictsort and dictsortreversed.

-- 
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
-~--~~~~--~~--~--~---