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'])
Exemple #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'])
 def add(self, note):
     """Add `note` to the object."""
     notes = INotes(self.context)
     notes.add(note)
     return note
Exemple #4
0
 def add(self, note):
     """Add `note` to the object."""
     notes = INotes(self.context)
     notes.add(note)
     return note