Thanks Dear ScottB, I reviewed that link you mentioned. As I know now,
we can have two ways to store data in cookie: Session for permanent
and cookie for temporary. Am I right? I used "response.setcookie" but
my problem not solve yet :( can you tell me how create httpResponse
object? Maybe I create it in wrong way. Thanks a lot

On Feb 12, 5:08 pm, "ScottB" <[EMAIL PROTECTED]> wrote:
> On Feb 12, 8:06 am, "samira" <[EMAIL PROTECTED]> wrote:
>
> > I want to have two
> > kind ofcookie: permanent and temporary. Temporarycookieshould be
> > deleted when browser close. I don't want to use
> > "SESSION_EXPIRE_AT_BROWSER_CLOSE" because that will delete all part of
> > cookies but I want to temporary part to delete. Can you know how I
> > shall do that?
>
> You could leave the main sessioncookieso it doesn't get deleted, but
> add your own temporarycookieto the HttpResponse object returned by
> one of your views.  Just call set_cookie on the HttpResponse object;
> if you don't specify an age, thecookieyou set will expire when the
> browser window is closed.  You can read thecookieback in your views
> using request.cookies.
>
> http://www.djangoproject.com/documentation/request_response/
>
> Scott


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to