Exemplo n.º 1
0
    def addtodo(self, todoname=None):
        if not todoname == None and not todoname == "":
            td = todo.todo()
            td.add(int(user.getUserId()), todoname)
            td.close()

        return layout.getAddTodo()
Exemplo n.º 2
0
    def index(self, statusid=0, *args, **kwargs):
        tdl = todolist.todoList()
        todos = tdl.getmy(user.getUserId(), statusid)
        tdl.close()
        #frs = friends.getfriends()
        st = status.status()
        sts = st.getall()
        st.close()

        #return layout.getMyTodos(todos, frs, sts, int(statusid))
        return layout.getMyTodos(todos, sts, int(statusid))
Exemplo n.º 3
0
    def shared(self):
        tdl = todolist.todoList()
        todos = tdl.getshared(user.getUserId())
        tdl.close()

        return layout.getSharedTodos(todos)
Exemplo n.º 4
0
    def listtodos(self, statusid=0):
        tdl = todolist.todoList()
        todos = tdl.getmy(user.getUserId(), statusid)
        tdl.close()

        return json.dumps(todos)