def get_profile_by_nick(nick): user = None exception = False try: user = CsUser.filter(nick=nick).first() except Exception, ex: exception = True logging.exception(ex) sentry_client.captureException()
def user_list_from_ids(ids, dict=True): temp_user = CsUser.filter(CsUser.id.in_(set(ids))).limit(50) if dict: user_list = [] for u in temp_user: d = u._as_dict() extras = u.extended d.update(**extras) user_list.append(d) return user_list else: return temp_user
def get_profile_by_nick(nick): user = CsUser.filter(nick=nick).first() if user is None: return return load_user(user.id)
def get_user_discussion_by_nick(nick): try: user = CsUser.filter(nick=nick).first() except DoesNotExist, dne: user = None
def get_user_timeline_by_nick(nick): try: user = CsUser.filter(nick=nick).first() except DoesNotExist, dne: user = None