Re: [Django] #6498: Add case insensitive model ordering

2017-11-14 Thread Django
#6498: Add case insensitive model ordering
-+-
 Reporter:  Bastian Kleineidam   |Owner:  nobody
   |
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Pascal Polleunus):

 It would still be useful to have `__upper` for the `ordering` options in
 models and admin.

 In my `ModelAdmin`…

 I tried `ordering = [Lower("name_lower")]` but it crashes as not handled.

 I tried by overriding `get_queryset()` using
 `qs.order_by(Lower("name_lower"))`.
 My method is executed and returns the correct query (i.e. `ORDER BY
 LOWER("name")`) but it doesn't work in the admin (weird, the list is
 sorted as "-name").
 That query works correctly in PostgreSQL.

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


Re: [Django] #6498: Add case insensitive model ordering

2015-03-20 Thread Django
#6498: Add case insensitive model ordering
-+-
 Reporter:  Bastian Kleineidam   |Owner:  nobody
   |
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

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


Comment:

 Yes, I think it's addressed in Django 1.8 with the ability to `order_by()`
 [https://docs.djangoproject.com/en/dev/ref/models/expressions/
 expressions]. For example:
 {{{
 >>> from django.db.models.functions import Lower
 >>> MyModel.objects.order_by(Lower('myfield'))
 }}}

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


Re: [Django] #6498: Add case insensitive model ordering

2015-03-20 Thread Django
#6498: Add case insensitive model ordering
-+-
 Reporter:  Bastian Kleineidam   |Owner:  nobody
   |
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by JanMalte):

 Any news about case insensitive ordering?

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


Re: [Django] #6498: Add case insensitive model ordering

2014-04-01 Thread Django
#6498: Add case insensitive model ordering
-+-
 Reporter:  Bastian Kleineidam   |Owner:  nobody
   |   Status:  new
 Type:  New feature  |  Version:  master
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  1
 Keywords:   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by mjtamlyn):

 A dedicated API for this is likely not justified, but we should be able to
 order by any `Transform` which can be applied to the field. At the moment,
 case insensitive searches are not done as a `Transform`, although it would
 be easy to create an `__upper` transform and use `__iexact` as a proxy to
 it (also `__icontains` would proxy to `__upper__contains` for example).

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


Re: [Django] #6498: Add case insensitive model ordering

2014-04-01 Thread Django
#6498: Add case insensitive model ordering
-+-
 Reporter:  Bastian Kleineidam   |Owner:  nobody
   |   Status:  new
 Type:  New feature  |  Version:  master
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  1
 Keywords:   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by anonymous):

 what about in case of foreign key 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 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/096.1b617e6a1047ff81c0b668ff1f9b35a9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #6498: Add case insensitive model ordering

2013-09-27 Thread Django
#6498: Add case insensitive model ordering
-+-
 Reporter:  Bastian Kleineidam   |Owner:  nobody
   |   Status:  new
 Type:  New feature  |  Version:  master
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  1
 Keywords:   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by shai):

 I believe `my_model.objects.all().extra(select={'imf': 'UPPER(my_field)'},
 order_by=['imf'])` should work on all core backends.

 I am not sure a dedicated API is justified.

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


Re: [Django] #6498: Add case insensitive model ordering

2013-09-07 Thread Django
#6498: Add case insensitive model ordering
-+-
 Reporter:  Bastian Kleineidam   |Owner:  nobody
   |   Status:  new
 Type:  New feature  |  Version:  master
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  1
 Keywords:   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by garrypolley):

 * cc: garrypolley (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 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/096.e690a1bde648d66cb72e66641b95e5ee%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #6498: Add case insensitive model ordering

2013-09-05 Thread Django
#6498: Add case insensitive model ordering
-+-
 Reporter:  Bastian Kleineidam   |Owner:  nobody
   |   Status:  new
 Type:  New feature  |  Version:  master
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  1
 Keywords:   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by akaariai):

 If custom lookups supports gets added, doing this for your project will be
 much easier. See
 
https://github.com/akaariai/django/commit/89c4765044787ca8084541da0c31c2d47956c720#L1R73
 for an example.

 Of course, there is that if above...

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


Re: [Django] #6498: Add case insensitive model ordering

2013-09-05 Thread Django
#6498: Add case insensitive model ordering
-+-
 Reporter:  Bastian Kleineidam   |Owner:  nobody
   |   Status:  new
 Type:  New feature  |  Version:  master
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  1
 Keywords:   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by aaugustin):

 I don't find `my_field__iexact` much better than the original proposal of
 `'*my_field'`... Try grabbing a core dev or two at the sprints to get a
 design decision on the API :)

 Otherwise, the most difficult part is to get this working on all four
 databases supported by Django. Yes, this includes Oracle :) (I have the
 infrastructure to test it if you don't and I'll be a the sprints
 tomorrow.)

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


Re: [Django] #6498: Add case insensitive model ordering

2013-09-05 Thread Django
#6498: Add case insensitive model ordering
-+-
 Reporter:  Bastian Kleineidam   |Owner:  nobody
   |   Status:  new
 Type:  New feature  |  Version:  master
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  1
 Keywords:   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by garrypolley):

 I'd expect this python

 {{{#!python
 my_model.objects.all().order_by('my_field_iexact')
 }}}

 to become this SQL

 {{{#!sql
 SELECT * FROM my_model ORDER BY LOWER(my_field);
 }}}

 I'm also fine using UPPER, I'm not too particular either way.  Seems most
 people in raw SQL prefer UPPER.

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


Re: [Django] #6498: Add case insensitive model ordering

2013-09-05 Thread Django
#6498: Add case insensitive model ordering
-+-
 Reporter:  Bastian Kleineidam   |Owner:  nobody
   |   Status:  new
 Type:  New feature  |  Version:  master
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  1
 Keywords:   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by garrypolley):

 I'm thinking of doing this for the DjangoCon sprint, will it get accepted
 if I do it?

 My proposal is still the same

 {{{#!python
 my_model.objects.all().order_by('my_field__iexact')
 }}}

 This would also include a doc update about the change.

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


Re: [Django] #6498: Add case insensitive model ordering

2013-07-23 Thread Django
#6498: Add case insensitive model ordering
-+-
 Reporter:  Bastian Kleineidam   |Owner:  nobody
   |   Status:  new
 Type:  New feature  |  Version:  master
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  1
 Keywords:   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by garrypolley):

 Any reason this can't just work like this:

 {{{#!python
 my_model.objects.all().order_by(my_field__iexact)
 }}}


 I don't think that would cause any issues, it'll just be a bit of a chore
 to get it added to all the backends.

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




Re: [Django] #6498: Add case insensitive model ordering

2013-01-14 Thread Django
#6498: Add case insensitive model ordering
-+-
 Reporter:  Bastian Kleineidam   |Owner:  nobody
   |   Status:  new
 Type:  New feature  |  Version:  master
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  1
 Keywords:   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by anonymous):

 ¿What about a parameter like 'iexact'?

-- 
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 https://groups.google.com/groups/opt_out.




Re: [Django] #6498: Add case insensitive model ordering

2012-02-12 Thread Django
#6498: Add case insensitive model ordering
-+-
 Reporter:  Bastian Kleineidam   |Owner:  nobody
   |   Status:  new
 Type:  New feature  |  Version:  SVN
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  1
 Keywords:   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by mitar):

 * cc: mmitar@… (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] #6498: Add case insensitive model ordering

2011-09-11 Thread Django
#6498: Add case insensitive model ordering
-+-
   Reporter:  Bastian|  Owner:  nobody
  Kleineidam   | Status:  new
   Type:  New|  Component:  Database layer
  feature|  (models, ORM)
  Milestone: |   Severity:  Normal
Version:  SVN|   Keywords:
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  1  |  Easy pickings:  0
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-

Comment (by Alex):

 I've closed #7580 as a dupe of this. This should be used to discuss a
 general way to order by alternate things.

-- 
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] #6498: Add case insensitive model ordering

2011-09-10 Thread Django
#6498: Add case insensitive model ordering
-+-
   Reporter:  Bastian|  Owner:  nobody
  Kleineidam   | Status:  new
   Type:  New|  Component:  Database layer
  feature|  (models, ORM)
  Milestone: |   Severity:  Normal
Version:  SVN|   Keywords:
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  1  |  Easy pickings:  0
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-
Changes (by Alex):

 * ui_ux:   => 0
 * easy:   => 0
 * stage:  Design decision needed => Accepted


Comment:

 The idea of case insensitive ordering is accepted, some more thought
 should be put into the API, * for case-sensitive isn't particularly
 intuitive.

-- 
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] #6498: Add case insensitive model ordering

2009-05-06 Thread Django
#6498: Add case insensitive model ordering
-+--
  Reporter:  Bastian Kleineidam   | Owner:  
nobody
Status:  new | Milestone:   
 
 Component:  Database layer (models, ORM)|   Version:  
SVN   
Resolution:  |  Keywords:   
 
 Stage:  Design decision needed  | Has_patch:  
1 
Needs_docs:  1   |   Needs_tests:  
0 
Needs_better_patch:  0   |  
-+--
Changes (by thejaswi_puthraya):

  * component:  Uncategorized => Database layer (models, ORM)

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