Thanks Skylar,
One more semi-related question for anyone keen, if the iPhone is
sending me a cookie with the session id in it, would I get it in a
similar way?

Eg:

session_key = request.COOKIES['session_id']
session = Session.objects.get(session_key=session_key)
uid = session.get_decoded().get('_auth_user_id')
user = User.objects.get(pk=uid)

Look right?
I think I'm just finding it hard to understand the two devices talking
to each other and having cookies together, I guess I'm a browser kind
of guy.


d.

On Sep 29, 1:25 pm, Skylar Saveland <skylar.savel...@gmail.com> wrote:
> User.objects.get(pk=Session.objects.get(pk=session_id).get_decoded()
> ['_auth_user_id']) via @SmileyChris
>
> On Sep 28, 9:36 pm, Danny Bos <da...@stateempire.com> wrote:
>
> > Heya,
>
> > I've got a Django application talking to an iPhone sending photos and
> > User data back and forth. I figured the best way to approach this
> > (tell me otherwise) was to log the user in on the server and pass the
> > iPhone back the 'session ID' in a JSON array.
>
> > Then when the iPhone sends me back some info, they send me that same
> > 'session ID' and I match that to the associated user content in order
> > to get the User details. Does this make sense? Is it the way to go in
> > order to pass User details back and forth to an iPhone.
>
> > If so.
>
> > How do I find the User when the iPhone passes me back the 'session
> > ID'?
>
> > Thanks in advance,
> > Hope all is well your side of town ...
>
> > d.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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