#26648: related_query_name is not checked for correctness
--------------------------------------+--------------------
     Reporter:  koniiiik              |      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: <https://code.djangoproject.com/ticket/26648>
Django <https://code.djangoproject.com/>
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.

Reply via email to