Persist shopping cart data between computers.

46 views
Skip to first unread message

mai...@gmail.com

unread,
Mar 15, 2015, 10:19:38 AM3/15/15
to django...@googlegroups.com
Hello,

I'm using an old version of Django (1.5, I know its old and problematic but currently I'm unable to upgrade).

To my understanding sessions are identified by a key saved in a cookie on the client's computer and so the session persists only for the next login from the same computer and from he same browser and I would like to know if there is a known plugin or middlewear that allows me to persist a session between computers.

The bigger picture is that i'm interesting in saving a shopping cart like object that will presist for the user when he logs in from different computers and most of the plugins that manage shopping carts in Django I've seen manage those in the user session.

I'm looking for the simplest way of adding this functionality without changing too much code.

Avraham Serour

unread,
Mar 15, 2015, 10:45:38 AM3/15/15
to django...@googlegroups.com
save it on the database, when the user logs in from another computer he will have another session associated with the same user
the user have the shopping cart saved on the DB

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/51fc87f3-e29a-4249-bf3f-caa3369bcf5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mai...@gmail.com

unread,
Mar 18, 2015, 2:47:07 AM3/18/15
to django...@googlegroups.com
Do I need to code this logic by myself or is there a build in mechanism or plugin that will allow me to have it like the shopping cart plugins available online that store the data in the session collection?

Avraham Serour

unread,
Mar 18, 2015, 3:11:32 AM3/18/15
to django...@googlegroups.com
there are frameworks like cartridge, but if all you need is what you described it is fairly easy to implement it yourself, in my opinion even faster, something that simple could be done in 30min

and honestly if you are still learning django it would be worth as a learning step to do this yourself and then move to cartridge as needed

Reply all
Reply to author
Forward
0 new messages