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

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

src/f/t/ftw.file-1.8.1/ftw/file/fields.py   ftw.file(Download)
from ftw.file.events.events import FileDownloadedEvent
from plone.app.blob import field
from plone.app.blob.download import handleIfModifiedSince, handleRequestRange
from plone.registry.interfaces import IRegistry
from urllib import quote
                user_ids = registry['ftw.file.filesettings.user_ids']
                if not portal_state.member().id in user_ids:
                    notify(FileDownloadedEvent(instance, filename))
 
        return self.get(instance).getIterator(**request_range)