Comments (5)
Here is a patch to address this problem:
From 9fab69c4c41bd0376c8b5c01430a646698776b6a Mon Sep 17 00:00:00 2001
From: http://github.com/ziz
Date: Sun, 22 Nov 2009 15:07:25 -0700
Subject: [PATCH] Set cookies during middleware intercept. It would probably be helpful to compare these cookies to the initial request's cookies and display the differences in the redirect template, since the debug toolbar doesn't otherwise have an opportunity to show them.
---
debug_toolbar/middleware.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/debug_toolbar/middleware.py b/debug_toolbar/middleware.py
index 5c10f9f..264515e 100644
--- a/debug_toolbar/middleware.py
+++ b/debug_toolbar/middleware.py
@@ -79,10 +79,12 @@ class DebugToolbarMiddleware(object):
if isinstance(response, HttpResponseRedirect):
redirect_to = response.get('Location', None)
if redirect_to:
+ cookies = response.cookies
response = render_to_response(
'debug_toolbar/redirect.html',
{'redirect_to': redirect_to}
)
+ response.cookies = cookies
if response.status_code == 200:
for panel in self.debug_toolbars[request].panels:
panel.process_response(request, response)
--
1.6.4.1
It does not display the cookies set in the redirect page, but at least it addresses the functional problem.
from django-debug-toolbar.
I see this as well.
from django-debug-toolbar.
I'd like to get in on this; I just wasted 2 hours trying to figure out why my cookies were not being set.
from django-debug-toolbar.
The patch seems to fix the problem, although it applied with a bit of fuzziness; it's 11 or so lines off of the expected location.
from django-debug-toolbar.
Fixed on develop branch.
from django-debug-toolbar.
Related Issues (20)
- Improve accessibility of the toolbar HOT 5
- New AJAX request resets whole view if HistoryPanel is enabled. HOT 4
- Injections cannot be made into the theme. HOT 2
- Document that the toolbar does not support async functionality HOT 16
- Improve handling when DJDT views don't respond with JSON HOT 19
- DDT showing incorrect template for source of SQL Query HOT 3
- The djdt handle shouldn't be stuck at the top of the browser window initially HOT 7
- The Debug Toolbar has stopped showing under Docker HOT 17
- Drop support for Django 4.0
- Update GitHub action versions
- Error on compilemessages due to translations from django-debug-toolbar HOT 10
- pre-commit Hooks: ESLint 9 will change the way eslint is configured
- Profiler raises ValueError in Python 3.12 HOT 20
- Jinja2 Support Broken HOT 1
- Deprecate and remove `OBSERVE_REQUEST_CALLBACK` HOT 1
- pre-commit hook broken by recent eslint changes HOT 6
- CPU Time includes DJDT's own time HOT 4
- Better indicate code coverage HOT 2
- Exception while resolving variable 'toolbar' in template HOT 2
- Add other languages doc. HOT 1
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-debug-toolbar.