def gravatar(user=None, user_uid=None, size=80): if user_uid: user = User.objects.filter(profile__uid=user_uid).first() return auth.gravatar(user=user, size=size)
def gravatar(user=None, user_uid=None, size=80): hasattr(user, 'profile') if user_uid and hasattr(user, 'profile'): user = User.objects.filter(profile__uid=user_uid).first() return auth.gravatar(user=user, size=size)
def gravatar(user, size=80): return auth.gravatar(user=user, size=size)