def _get_site_profile(self, local_site):
 if (not hasattr(self, u'_site_profiles')):
  self._site_profiles = {}
 if (local_site.pk not in self._site_profiles):
  site_profile = LocalSiteProfile.objects.get(user=self, local_site=local_site)
  site_profile.user = self
  site_profile.local_site = local_site
  self._site_profiles[local_site.pk] = site_profile
 return self._site_profiles[local_site.pk]

def _get_site_profile ( self , local_site ) : if ( not hasattr ( self , u'_site_profiles' ) ) : self . _site_profiles = { } if ( local_site . pk not in self . _site_profiles ) : site_profile = LocalSiteProfile . objects . get ( user = self , local_site = local_site ) site_profile . user = self site_profile . local_site = local_site self . _site_profiles [ local_site . pk ] = site_profile return self . _site_profiles [ local_site . pk ]
get the localsiteprofile for a given localsite for the user .