Friday, October 7, 2011

Re: can't use django session object

On Fri, Oct 7, 2011 at 11:41 AM, django-jython-user <sababok@gmail.com> wrote:
> Hi,
> I'm having trouble using django sessions objects.
>
> so I set the object in one view:
> request.session['user_cred']=cred #where cred is a GlobusCredential

the session object does automatic pickling of object to store them.
but then your objects have to be pickleable. what is a
GlobusCredential? is that a Java thing? is it pickleable?

> Django Version:         1.2.5
> Exception Type:         AttributeError
> Exception Value:        'str' object has no attribute 'META'

if the object you're getting was an str, the error would say " 'str'
object has no attribute 'getIdentity'". Instead, it seems that
something _inside_ the GlobusCredential wasn't restored correctly.

again, are you positive that GlobusCredential objects are pickleable?
probably you'll have to store some info that let you reconstruct or
refetch the object


--
Javier

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate