Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Strange session behaviour
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Xavier Ordoquy  
View profile  
 More options Nov 9, 5:48 am
From: Xavier Ordoquy <xordo...@linovia.com>
Date: Sun, 8 Nov 2009 19:48:56 +0100
Local: Mon, Nov 9 2009 5:48 am
Subject: Strange session behaviour
Hello,

I'm working for the first time on sessions with django and I'm facing  
a strange behaviour.

on my main view, I do a del request.session['entity']
On my subviews, I set request.session['entity'] = 1 (for example)

After that, for any view, I do:

if request.session['entity']:
     context['entity'] = request.session['entity']

and finally, I render the template through:

return render_to_response('page.html', context,
                               context_instance=RequestContext(request))

So, when I first come to the page, the template does not find and  
entity defined.
When I switch to my 'subviews' the entity is correctly set.
However, when I switch back to the main view, it is correctly removed  
from the request.session (dump within the view confirms it) but the  
template would still see the latest entity that has been set,  
regardless of how time I refresh the main view.

Could someone point me the right way to remove a session variable ?

Thanks,
Xavier.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google