n 7 June 2011 10:46, Henrik Genssen <henrik.gens...@miadi.net> wrote:

> I try to add the content of my session to the error-mails.
> I have written a middleware, overwriting the standard error mail.
> But for:
> repr(request.session)
> I only get:
> <django.contrib.sessions.backends.db.SessionStore object at 0x3a88cb0>
>
> What am I doing wrong?
>
> That is the how a session object displays. Depending what information you
want from the session, you'll need to explicitly extract and format that
into your email.

If you're not sure what you need to print, drop into the debugger in your
middleware and poke around in the request.session object to figure it out.

Do this by putting "import pdb; pdb.set_trace()" in your code  where you're
accessing the session.

Malcolm

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to