Example #1
0
def friends(username):
	profile=find_profile(username)
	friends=[]
	for friend_id in profile['friends']:
		for friend_profile in profiles:
			if friend_profile['id'] == friend_id:
				friends.append(friend_profile)
				print(friends)
	return render_template('friends.html', profile=profile ,friends=friends)
Example #2
0
def profile(username):
	# process the data
	profile=find_profile(username)
	user_statuses=[]
	for status in statuses:
		# Build a list of text according to the user id
		if status['user_id'] == profile['id']:
			user_statuses.append(status)	
	return render_template('profile.html', profile=profile ,statuses=user_statuses)
Example #3
0
def profile(username):
    profile = find_profile(username)
    user_statuses = []

    for status in statuses:
        if status['user_id'] == profile['id']:
            user_statuses.append(status)
    return render_template('profile.html',
                           profile=profile,
                           statuses=user_statuses)
Example #4
0
def profile(username):
    profile = find_profile(username)
    listofstatuses = []
    for i in statuses:
        if i['user_id'] == profile['id']:
            listofstatuses.append(i)

    return render_template('profile.html',
                           profile=profile,
                           statuses=listofstatuses)
Example #5
0
def friends(username):
    profile = find_profile(username)

    friends = []
    for friend_id in profile['friends']:
        for p in profiles:
            if friend_id == p['id']:
                friends.append(p)

    return render_template('friends.html', friends=friends, profile=profile)
Example #6
0
def profile(username):
    #process the data
    profile = find_profile(username)
    statuses_list = []
    for i in statuses:
        if i['user_id'] == profile['id']:
            statuses_list.append(i)
    return render_template('profile.html',
                           profile=profile,
                           statuses=statuses_list)
Example #7
0
def jazz_styles(username):
    profile = find_profile(username)

    jazz_styles = []
    for style in styles:
        if style['style_id'] == profile['id']:
            jazz_styles.append(style)
    return render_template('jazz_styles.html',
                           profile=profile,
                           styles=jazz_styles)