What is the best way to save a user profile with Google App Engine (Python) ?
What I did to solve this problem is create another Model, with a UserProperty, but requesting the profile from the user I have to do something like this:
if user:
profile = Profile.all().filter('user =', user).fetch(1)
if profile:
property = s.get().property
Any ideas?
If you make the user_id of the user the key_name of the user’s Profile entity, you can fetch it using Profile.get_by_key_name(), which will be faster than querying and then fetching.
Memcaching including the user_id as part of the key will allow even faster access to the profile.