views:

88

answers:

0

I am trying to return a django.contrib.auth.models.User object, and it fetches all the data properly, but the related fields are nowhere to be found, even utilizing "select_related()" as suggested in documentation.

class UserProfile(models.Model):
  user = models.ForeignKey( User, unique=True )

In pyamf gateway:

def login_user( http_request, username=None, password=None ):
  user = authenticate( username=username, password=password )
  if user is None:
    raise pyamf.EncodeError('Authentication Failed') 
  else:
    return User.objects.select_related().get(username=user.username)

It returns the right data, so the system is generally functional, but "userprofile_set" is nowhere to be found once it arrives on the Flash side where it's being called. Am I not utilizing this properly?

I am using django 1.2 and a brand-new download and install of pyamf trunk. (0.6)