Did I find the right examples for you? yes no

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)

src/d/j/django-downloadview-1.6/django_downloadview/middlewares.py   django-downloadview(Download)
 
from django_downloadview.response import DownloadResponse
from django_downloadview.utils import import_member
 
 
                                                    'DOWNLOADVIEW_MIDDLEWARES',
                                                    []):
            factory = import_member(import_string)
            middleware = factory(**kwargs)
            self.middlewares.append((key, middleware))
    def auto_configure_backend_factory(self):
        "Assign :attr:`backend_factory` from ``settings.DOWNLOADVIEW_BACKEND``"
        try:
            self.backend_factory = import_member(settings.DOWNLOADVIEW_BACKEND)
        except AttributeError:
                args = options
            if 'backend' in kwargs:  # Specific backend for this rule.
                factory = import_member(kwargs['backend'])
                del kwargs['backend']
            else:  # Fallback to global backend.

src/d/j/django-downloadview-HEAD/django_downloadview/middlewares.py   django-downloadview(Download)
 
from django_downloadview.response import DownloadResponse
from django_downloadview.utils import import_member
 
 
                                                    'DOWNLOADVIEW_MIDDLEWARES',
                                                    []):
            factory = import_member(import_string)
            middleware = factory(**kwargs)
            self.middlewares.append((key, middleware))
    def auto_configure_backend_factory(self):
        "Assign :attr:`backend_factory` from ``settings.DOWNLOADVIEW_BACKEND``"
        try:
            self.backend_factory = import_member(settings.DOWNLOADVIEW_BACKEND)
        except AttributeError:
                args = options
            if 'backend' in kwargs:  # Specific backend for this rule.
                factory = import_member(kwargs['backend'])
                del kwargs['backend']
            else:  # Fallback to global backend.