Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(0)  |  Derive(0)  |  Import(3)

src/f/t/ftw.journal-1.2.7/ftw/journal/adapters/annotations_journal.py   ftw.journal(Download)
from Acquisition import aq_inner
from ftw.journal.config import JOURNAL_ENTRIES_ANNOTATIONS_KEY
from persistent.dict import PersistentDict
from persistent.list import PersistentList
from zope.annotation.interfaces import IAnnotations, IAnnotatable
    def __call__(self, action, comment, actor, time):
        context = self.context
        annotations = IAnnotations(context)
        journal_annotations = annotations.get(JOURNAL_ENTRIES_ANNOTATIONS_KEY, None)
 
        if not journal_annotations:
            annotations[JOURNAL_ENTRIES_ANNOTATIONS_KEY] = PersistentList()
            journal_annotations = annotations.get(JOURNAL_ENTRIES_ANNOTATIONS_KEY)

src/f/t/ftw.journal-1.2.7/ftw/journal/tests/test_unit_adapters.py   ftw.journal(Download)
from ftw.journal.adapters.annotations_journal import AnnotationsJournalizable
from ftw.journal.adapters.workflow_history_journal import \
    WorkflowHistoryJournalizable
from ftw.journal.config import JOURNAL_ENTRIES_ANNOTATIONS_KEY
from mocker import ANY

src/f/t/ftw.journal-1.2.7/ftw/journal/tests/test_integration.py   ftw.journal(Download)
from DateTime import DateTime
from ftw.journal.config import JOURNAL_ENTRIES_ANNOTATIONS_KEY
from ftw.journal.events.events import JournalEntryEvent
from ftw.journal.interfaces import \
    IAnnotationsJournalizable, IWorkflowHistoryJournalizable
        notify(JournalEntryEvent(doc, "added new line", "modified"))
 
        journal = IAnnotations(doc).get(JOURNAL_ENTRIES_ANNOTATIONS_KEY)[0]
 
        self.assertTrue('modified' in journal.get('action'))