On Wed, 2005-08-31 at 14:28 +0400, Maniac wrote:

> I use Django's model objects to store a users environment. It's not just 
> some options like prefered color or something instead it's a full blown 
> model. To be specific it's an application for ordering printing of 
> digital pictures. The users environment consists of a desktop with image 
> thumbnails, thumbnails know their position on the desktop, and also 
> store all the printing parameters like paper type, size, special framing 
> etc.
> 
> Speaking generally I wonder how (or wether) Django's sessions are 
> suitable to store such rather large structured data.

I think you would be better off storing the model objects as usual, but
adding a couple of flags to your model:  one to indicate that this
object is a temporary/unregistered user, and one to store when the
object should be expired.  You can then either periodically do batch
expiry, or some other system.  I assume that once no sessions refer to
one of those users anymore, having an inactive temporary user model
hanging around doesn't cost you anything except database space which you
can reclaim when it's convenient.

-- 
+----------------------------------------------------------------+
| Jason F. McBrayer                         [EMAIL PROTECTED]  |
|  "If you wish to make Pythocles wealthy, don't give him more   |
|   money; rather, reduce his desires."            -- Epicurus   |


Reply via email to