Comments (7)
Edit your MIDDLEWARE_CLASSES so that GZipMiddleware is before SilkyMiddleware
from django-silk.
As @brmc says, things can go awry with middleware placement. I thought I'd fixed the unicode issues however, so I'll leave this open for now and investigate further at some point
from django-silk.
The unicode issues arent really your fault. Python 2.x is just traditionally terrible with unicode. This same thing will happen with gzipmiddleware just about anytime other apps are analyzing or modifying the response.
Even so, in your case it wouldn't even really make sense to compensate for the encoding/decoding issues because after everything was decoded properly, you'd still have to decompress the gzipped response. It would be much more beneficial for everyone to just insist on proper middleware ordering.
And FWIW, i like where this app is going. it picks up exactly where debug-toolbar leaves off. In the next couple weeks Im going to try and tackle your enhancement requests(no promises though in case i get busy with work). and i'll probably add some tox integration and python 3 support along the way.
good work!
from django-silk.
That's a good point and thanks! If you get to the enhancements do let me know if have any questions about anything. Tox especially sounds like a good idea
--Mike
from django-silk.
@mtford90
will do.
in regards to tox, i'll probably start by restructuring your test paths if that's ok with you. similar to, if not exactly like, what I did here: https://github.com/brmc/django-media-helper
the main difference being that, rather than copying the directories during the tests, i'd create a test folder and then symlink to the project from within.
from django-silk.
Yeah that's fine with me, the proj organisation is a bit skewed anyhow. We should prob move this to a diff. issue btw ;)
from django-silk.
Closing this as can be solved by middleware placement. Let me know if you're still havin issues tho @melbic
from django-silk.
Related Issues (20)
- Silk re-uses DB connection for failed atomic transactions.
- SILKY_HIDE_COOKIES does not hide cookie header in different case
- Silk not showing overall and 0 for queries HOT 2
- Request for changing connection database from PRINCIPAL CONNECTION to SQLite or other (SILK)
- Use Graphql, how to count the time for each specific request
- [Python 3.12] ValueError: Another profiling tool is already active
- Curl and Django Test Client URL parameters are being url encoded
- Add api to access request_id of current request
- Is it possible to track Cache(redis) queries?
- Defaults - filter silk itself from requests
- Defaults - use list view not card view HOT 1
- 1054, "Unknown column 'prof_file' in 'field list'"
- Summary stats and profile stats disconnect...
- `Request.objects.all().delete()` is dangerous HOT 2
- Localized profiling
- django.utils.encoding.DjangoUnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 2: invalid start byte.
- Incorrect (Blank) Table Identification in SQL Queries for Update Operation
- Should we consider requirement `autopep8` only as development only? HOT 2
- hope the silk should not be access when set DEBUG=False
- Silk not working with django tenant schemas
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-silk.