That makes sense. I will try that.
On Nov 10, 10:52 am, Mahmoud <[EMAIL PROTECTED]> wrote:
> I would wrap the user api object (users.user) in an application
> specific AppUser object, and use a reference property for which_user.
>
> -Mahmoud
>
> On Nov 8, 11:02 pm, warreninaustintexas <[EMAIL PROTECTED]>
> wrote:
>
> > What is the best way to access one user's information from another
> > user's session? I'm building a stock market tip social networking app
> > (bad timing, I know). Obviously I need the app to share information
> > between specific users.
>
> > Here's what I have right now:
>
> > class TopList(db.Model):
> > which_user = db.UserProperty()
> > # ... more properties here
>
> > # ... lots more code ...
>
> > # at this point ...
> > # user_to_view contains the other user's screen name as a string
> > # (or a blank string if the current user is looking at his own
> > information)
> > # ...
> > user = users.get_current_user()
> > iscurrentuser = False
> > if user_to_view == "":
> > user_to_view_object = user
> > iscurrentuser = True
> > else:
> > user_to_view_object = users.User(user_to_view)
>
> > toplists = db.GqlQuery("SELECT * FROM TopList WHERE which_user = :1",
> > user_to_view_object)
>
> > This works fine in the development environment. The GQL Query always
> > returns an empty set, though, on the production server.
>
> > I suspect I could replace this line:
> > user_to_view_object = users.User(user_to_view)
> > with this one:
> > user_to_view_object = users.User(user_to_view+"@gmail.com")
>
> > ... but what about folks who are at @google.com or another domain?
>
> > Has anyone else found an elegant way of solving this problem?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---