#29644: String representation of SearchQuery gives inaccurate results
-------------------------------------+-------------------------------------
               Reporter:  Alex       |          Owner:  (none)
  Krupp                              |
                   Type:             |         Status:  new
  Uncategorized                      |
              Component:             |        Version:  2.0
  contrib.postgres                   |
               Severity:  Normal     |       Keywords:  SearchQuery search
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 For the purpose of writing tests, I'm trying to use the string
 representation of SearchQuery to see what query statements my querystring
 parser is generating.

 When I do {{{print(~SearchQuery('asdf'))}}}, instead of seeing
 {{{"~SearchQuery('asdf')"}}} I instead see {{{"SearchQuery('asdf')"}}}. In
 other words, the tilde that is used to negate the SearchQuery isn't being
 shown.

 Similarly, if I do:

 {{{query = SearchQuery('a') & ( SearchQuery('b') | SearchQuery('c') )}}}

 When I do {{{print(query)}}} I just see {{{"SearchQuery('a') &
 SearchQuery('b') | SearchQuery('c')"}}}. The issue here is that the
 parentheses used to group these statements aren't shown, which again
 changes the meaning of this statement.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29644>
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.4a72735063546e732973d5677573c7ee%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to