|
|
@@ -49,7 +49,7 @@ def profile():
|
|
|
|
|
|
return render_template("profile.html", user=current_user)
|
|
|
|
|
|
-recipient_id = None
|
|
|
+#recipient_id = None
|
|
|
|
|
|
@logic.route('/matchbook', methods=['GET', 'POST'])
|
|
|
@login_required
|
|
|
@@ -57,8 +57,12 @@ def matchbook():
|
|
|
all_users = User.query.all()
|
|
|
|
|
|
if request.method == 'POST':
|
|
|
- global recipient_id
|
|
|
+ #global recipient_id
|
|
|
recipient_id = request.form.get('message_recipient')
|
|
|
+ fdbcall = User.query.filter_by(id=current_user.id).first()##
|
|
|
+ fdbcall.focus = recipient_id##
|
|
|
+ db.session.commit()##
|
|
|
+
|
|
|
return redirect(url_for('logic.messaging'))
|
|
|
|
|
|
return render_template("matchbook.html", user=current_user, userlist=all_users)
|
|
|
@@ -66,6 +70,7 @@ def matchbook():
|
|
|
@logic.route('/messaging', methods=['GET', 'POST'])
|
|
|
@login_required
|
|
|
def messaging():
|
|
|
+ recipient_id = current_user.focus##
|
|
|
recipient = User.query.filter_by(id=recipient_id).first()
|
|
|
|
|
|
sent_history = Message.query.filter_by(sender=current_user.id, recipient=recipient.id).all()
|