Re: [Django] #26648: related_query_name is not checked for correctness

2016-06-02 Thread Django
#26648: related_query_name is not checked for correctness
--+
 Reporter:  konk  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Core (System checks)  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by carljm):

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


Re: [Django] #26648: related_query_name is not checked for correctness

2016-05-22 Thread Django
#26648: related_query_name is not checked for correctness
--+
 Reporter:  konk  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Core (System checks)  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by charettes):

 * type:  Uncategorized => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Comment:

 > I'll open a WIP PR in a moment, but when I implemented this check, it
 turned out that there's actually a test case already which treats
 related_name='_' (without an explicit related_query_name) as valid. Is
 that something we want to support?

 No as it generates an unusable `related_query_name`.

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


Re: [Django] #26648: related_query_name is not checked for correctness

2016-05-22 Thread Django
#26648: related_query_name is not checked for correctness
-+-
 Reporter:  konk |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Core (System |  Version:  master
  checks)|
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by konk):

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


Comment:

 PR as promised: https://github.com/django/django/pull/6640

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


[Django] #26648: related_query_name is not checked for correctness

2016-05-22 Thread Django
#26648: related_query_name is not checked for correctness
--+
 Reporter:  konk  |  Owner:  nobody
 Type:  Uncategorized | Status:  new
Component:  Core (System checks)  |Version:  master
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 This came up on django-users@ the other week:
 https://groups.google.com/d/msg/django-users/vR6eR1l3AaY/Zo-H1nFtNwAJ

 I think there should be a check for `related_query_name` to ensure it does
 not end with an underscore, or contain `__` – in either case, it would be
 impossible to actually use it in a query.

 I'll open a WIP PR in a moment, but when I implemented this check, it
 turned out that there's actually a test case already which treats
 `related_name='_'` (without an explicit `related_query_name`) as valid. Is
 that something we want to support?

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