-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Unicode Fix for Blob Fields #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… data for displaying on the sql panel
That looks pretty good. 2 things... 1) I'd like to not have force_unicode called twice on params, and 2) I'd like to add a test for this. There are no tests yet so I'd be happy to add this. Thanks. |
I can write some tests and do some refactoring so force_unicode isn't called twice. Thanks. |
I did some refactoring so that force_unicode is only called once. I didn't add any tests yet, because I wasn't sure where you would like them. Would you like me to just write some tests and put them in a tests package somewhere, or do you have something in mind as far as where you want your tests for the panels to be located? |
Thanks Matt. I didn't have anything in mind for tests, but know that this will be the first one (of many, I hope) and so the decision might be a bit harder. I'd look to other projects with tests and follow a similar pattern. We can always shuffle them around later if we need to. Much appreciated. |
Hi Rob, I added some tests for my change. I used the mock library to make creating the unicode decode error happen more easily. |
As explained in #123 I believe this issue is fixed. The debug toolbar could probably use a systemic effort to review how arbitrary objects are converted to text and how exceptions are handled. However, this pull request is very outdated and isn't a good starting point. Thanks for your contribution and sorry for dropping the ball. We appreciate your efforts. |
Hi Rob, I've got a fix for this issue: http://stackoverflow.com/questions/4350028/
I added a clean_params method that replaces any non-unicode strings with a placeholder so that 1) it still looks good on the sql panel and 2) the foce_unicode no longer causes an error.