コード例 #1
0
ファイル: browser.py プロジェクト: achouhans/schooltool-2.8.5
    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'])
コード例 #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'])
コード例 #3
0
ファイル: browser.py プロジェクト: achouhans/schooltool-2.8.5
 def add(self, note):
     """Add `note` to the object."""
     notes = INotes(self.context)
     notes.add(note)
     return note
コード例 #4
0
 def add(self, note):
     """Add `note` to the object."""
     notes = INotes(self.context)
     notes.add(note)
     return note