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

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

src/f/t/ftw.file-1.8.1/ftw/file/content/file.py   ftw.file(Download)
from ftw.file.fields import FileField
from ftw.file.interfaces import IFile
from ftw.file.utils import redirect_to_download_by_default
from ftw.journal.interfaces import IWorkflowHistoryJournalizable
from logging import getLogger
    def index_html(self, REQUEST, RESPONSE):
        """ Redirect to the default view or download view """
        if redirect_to_download_by_default(self):
            return RESPONSE.redirect(self.absolute_url() + '/download')

src/f/t/ftw.file-1.8.1/ftw/file/tests/test_utils.py   ftw.file(Download)
from ftw.builder import Builder
from ftw.builder import create
from ftw.file.testing import FTW_FILE_INTEGRATION_TESTING
from ftw.file.utils import redirect_to_download_by_default
from plone.app.testing import TEST_USER_ID