Pickling will let you store objects as strings. However, perhaps you
would like to use a memoize[1]  decorator on your function.

Are you trying to do this for performance reasons, because getting
that relationship info from the database is slow?

Regardless of why you're doing it, make sure you understand the
circumstances which would invalidate your cached values. Whether
they're stored in the session or not, they will become stale and cause
bugs or user frustration.

Shawn

[1] http://wiki.python.org/moin/PythonDecoratorLibrary#Memoize

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to