Esempio n. 1
0
def main():
    import datetime
    from www.message import interface

    to_user_id = 'f762a6f5d2b711e39a09685b35d0bf16'
    user_id2 = 'f40527cfd2c611e3b50a685b35d0bf16'

    ucb = interface.UnreadCountBase()
    iab = interface.InviteAnswerBase()
    gnb = interface.GlobalNoticeBase()
Esempio n. 2
0
def main():
    import datetime
    from www.message import interface

    to_user_id = 'f762a6f5d2b711e39a09685b35d0bf16'
    user_id2 = 'f40527cfd2c611e3b50a685b35d0bf16'

    ucb = interface.UnreadCountBase()
    # iab = interface.InviteAnswerBase()
    # gnb = interface.GlobalNoticeBase()
    # print ucb.init_count_info()
    # print ucb.get_unread_type()
    # print ucb.get_unread_count_info(user)
    # print ucb.get_unread_count_total(user)
    # print ucb.update_unread_count(user, code='at_answer', operate="add")
    # print ucb.update_unread_count(user, code='system_message', operate="add")
    # print ucb.update_unread_count(user, code='received_like', operate="add")
    # print ucb.update_unread_count(user, code='received_answer', operate="add")
    print ucb.add_system_message(user_id, content=u"你的活动已经报名成功")
Esempio n. 3
0
def async_clear_count_info_by_code(user_id, code):
    from www.message import interface
    return interface.UnreadCountBase().clear_count_info_by_code(user_id, code)
Esempio n. 4
0
File: views.py Progetto: cash2one/zx
import logging

from django.http import HttpResponse  # , HttpResponseRedirect
from django.template import RequestContext
from django.shortcuts import render_to_response

from common import utils, page, debug, user_agent_parser
from www.misc import qiniu_client
from www.misc.decorators import member_required, common_ajax_response
from www.tasks import async_clear_count_info_by_code
from www.account import interface as interface_account
from www.question import interface as interface_question
from www.message import interface


urb = interface.UnreadCountBase()
lb = interface_question.LikeBase()
ab = interface_question.AnswerBase()
ub = interface_account.UserBase()
iab = interface.InviteAnswerBase()


@member_required
def system_message(request, template_name='message/system_message.html'):
    system_messages = urb.get_system_message(request.user.id)

    # 分页
    page_num = int(request.REQUEST.get('page', 1))
    page_objs = page.Cpt(system_messages, count=10, page=page_num).info
    system_messages = page_objs[0]
    page_params = (page_objs[1], page_objs[4])