Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added friend activity #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion greatreads_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__author__ = 'RR1'

from flask import Flask, render_template, redirect, url_for, request, session, flash, escape
from data import queries, follows, reviews
from data import queries, follows, reviews, activity
from data import queries
from flask import render_template
from data import user_lists
Expand Down Expand Up @@ -311,6 +311,15 @@ def unlk_review(uid, review_id):
reviews.unlike_review(cur, review_id, session['user_id'])
return redirect('/reviews/' + uid + '/' + review_id)

@app.route('/users/<uid>/friend_activity')
def get_frnd_actvty(uid):
with easypg.cursor() as cur:
user_id = queries.get_user_id(cur, uid)
activity_info = activity.get_friend_activity(cur, user_id)
return render_template('activity_list.html',
activity_info = activity_info,
uid = uid)

@app.route('/authors/<id>', methods=['POST', 'GET'])
def

Expand Down