Custom Query (27369 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (16 - 18 of 27369)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Ticket Resolution Summary Owner Reporter
#29491 wontfix Query.get_count produces SQL that is invalid for DB2 Jeff Paul Wujek
Description

This bug occurs in db/models/sql/query.py

In function get_count lines 5 and 6 are:

        obj.add_annotation(Count('*'), alias='__count', is_summary=True)
        number = obj.get_aggregation(using, ['__count'])['__count']

Code produced looks like:

SELECT COUNT(*) AS __count FROM MYTABLE

Error Returned:

[SQL0104] Token _ was not valid. Valid tokens: <IDENTIFIER>. [SQL State=42601, DB Errorcode=-104]

Cause: Underscore is not valid as a beginning character for a token in DB2.

Suggested Solution:

Do not use '__count' as a token in the 5th and 6th lines of get_count.
Instead use a token name that does not begin with '_' (Underscore).
#29489 duplicate Shell and default language preference nobody Peyman Karimi
Description

When we run the django shell (./manage.py shell), the default language code (settings.LANGUAGE_CODE) is not activated by default (settings.USE_I18N is set to True) and user has to activate it manually by performing something like this:

from django.conf import settings
from django.utils import translation; translation.activate(settings.LANGUAGE_CODE)
#29488 wontfix FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space nobody Mark Phillips
Description

If the label for the FilteredSelectMultiple has a space in it, the controls for moving data between the boxes are not activated. The widget still works if one double clicks on the elements in the left box, they move to the right box. But the arrows don't work. Tested on Chrome 67.0.3396.62 (Official Build) (64-bit) and Firefox 60.0.1 (64-bit) using runserver to run my django code.

Take a look at the attached image first.png. There are two FilteredSelectMultiple widgets, one called Pets and one called Pet Names. Note that in the widget Pet Names, the controls are not highlighted, but the controls in the Pets widget are highlighted.

Take a look at the attached image second.png. The only change to the code was to change the Pet Names label to Pet_Names (ie replaced the space between Pet and Names with an underscore Pet Names -> Pet_Names). Now the controls are working.

Mark

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Note: See TracQuery for help on using queries.
Back to Top