Ejemplo n.º 1
0
    def __init__(self, context, request):
        BrowserView.__init__(self, context, request)
        notes = INotes(context)
        self.notes = [note for note in notes
                      if note.privacy == 'public'
                         or note.owner == request.principal.id]

        if 'DELETE_NOTE' in request:
            notes.remove(request['uid'])
Ejemplo n.º 2
0
    def __init__(self, context, request):
        BrowserView.__init__(self, context, request)
        notes = INotes(context)
        self.notes = [
            note for note in notes
            if note.privacy == 'public' or note.owner == request.principal.id
        ]

        if 'DELETE_NOTE' in request:
            notes.remove(request['uid'])
Ejemplo n.º 3
0
 def add(self, note):
     """Add `note` to the object."""
     notes = INotes(self.context)
     notes.add(note)
     return note
Ejemplo n.º 4
0
 def add(self, note):
     """Add `note` to the object."""
     notes = INotes(self.context)
     notes.add(note)
     return note