You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If sql params are values that cannot be encoded by the built-in json.JSONEncoder, then the sql panel doesn't get the params and subsequently can't perform the query or EXPLAIN the query.
In my case, I often have params that are instance of datetime.datetime.
The param `strings_only=True` caused params with type `time`, `date` and
`datetime` to not be converted to string by `NormalCursorWrapper._decode()`,
and in turn causes the json dumping to fail.
This change keeps `strings_only=True` for every type but datetime, date and
time, enabling conversion to string in those cases.
Fixesdjango-commons#882
The param `strings_only=True` caused params with type `time`, `date` and
`datetime` to not be converted to string by `NormalCursorWrapper._decode()`,
and in turn causes the json dumping to fail.
This change keeps `strings_only=True` for every type but datetime, date and
time, enabling conversion to string in those cases.
Fixesdjango-commons#882
jieter
added a commit
to zostera/django-debug-toolbar
that referenced
this issue
Dec 22, 2017
The param `strings_only=True` caused params with type `time`, `date` and
`datetime` to not be converted to string by `NormalCursorWrapper._decode()`,
and in turn causes the json dumping to fail.
This change keeps `strings_only=True` for every type but datetime, date and
time, enabling conversion to string in those cases.
Fixesdjango-commons#882
If sql params are values that cannot be encoded by the built-in
json.JSONEncoder
, then the sql panel doesn't get the params and subsequently can't perform the query orEXPLAIN
the query.In my case, I often have params that are instance of
datetime.datetime
.I currently use the following patch: zt-initech@47e7664
It is not very nice. I don't like using both JSON and pickle, and there are probably other problems.
How do you think this problem should be fixed?
For example, should params always be pickled?
Can you help me fix this patch to get it merged upstream?
The text was updated successfully, but these errors were encountered: