Пример #1
0
def profile(user_id):
    user = User.get_by_id(user_id)
    message = Message()
    msgs = message.get_message_from_user(user)
    return render_template('user/profile.html',
                           user=user,
                           messages=msgs,
                           current_user=current_user,
                           followed=current_user.is_following(user))
Пример #2
0
def profile(user_id):
    user = User.get_by_id(user_id)
    message = Message()
    msgs = message.get_message_from_user(user)
    return render_template(
        "user/profile.html",
        user=user,
        messages=msgs,
        current_user=current_user,
        followed=current_user.is_following(user),
    )
Пример #3
0
def index(offset=0):
    if not current_user.is_authenticated():
        abort(403)
    create_form = CreateMessageForm()
    message = Message()
    messages = message.get_all_messages()
    msgs = Message()
    msgs = msgs.get_messages_feed(current_user)
    print "test:"
    print msgs
    form = ResponseMessageForm(offset=offset, yes="1", no="2")
    return render_template(
        "user/index.html", user=current_user, form=create_form, response_form=form, messages=msgs, offset=offset
    )
Пример #4
0
def index(offset=0):
    if not current_user.is_authenticated():
        abort(403)
    create_form = CreateMessageForm()
    message = Message()
    messages = message.get_all_messages()
    msgs = Message()
    msgs = msgs.get_messages_feed(current_user)
    print "test:"
    print msgs
    form = ResponseMessageForm(offset=offset, yes='1', no='2')
    return render_template('user/index.html',
                           user=current_user,
                           form=create_form,
                           response_form=form,
                           messages=msgs,
                           offset=offset)