Re: saving django session data for anonymous user

2018-06-21 Thread Melvyn Sopacua
On woensdag 13 juni 2018 14:40:05 CEST Siddharth Srivastava wrote: > Thanks Anthony for your prompt reply. current implementation is that i am > using django orm query to pull the user cart details and cart id(session > key) is the key so when user switch from anonymous > user to actual user then

Re: saving django session data for anonymous user

2018-06-15 Thread 'Anthony Flury' via Django users
How are you authenticating them ? Assuming you call :         authenicate( username, password) then before that call - store the sesssion key after that call - identify the new session key with the old and new session keys - now update the database - so that the cart gets associated with

Re: saving django session data for anonymous user

2018-06-13 Thread Siddharth Srivastava
Thanks Anthony for your prompt reply. current implementation is that i am using django orm query to pull the user cart details and cart id(session key) is the key so when user switch from anonymous user to actual user then i loses the data came from the query. so when user gets authenticated

Re: saving django session data for anonymous user

2018-06-12 Thread Melvyn Sopacua
On dinsdag 12 juni 2018 12:01:32 CEST Siddharth Srivastava wrote: > so the scenario is that whenever anonymous > user check out and mapped data against that session id is purged. Is there > any mechanism to save anonymous user session data even after user logs in. > kindly provide easy possible

Re: saving django session data for anonymous user

2018-06-12 Thread 'Anthony Flury' via Django users
The only way I can think of is when your user goes to log in - check if their session id is already recorded. When they login - I assume that they get an new Session Id - and remap the data from their old session id to their new session Id. Would that work ? On 12/06/18 11:01, Siddharth

saving django session data for anonymous user

2018-06-12 Thread Siddharth Srivastava
Hi , i was writing small ecommerce application in django framework. so i was trying to implement add to cart functionality like that if user is anonymous user then selected products should be mapped to it's session id which is act. cart id in models. so the scenario is that whenever anonymous