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

All Samples(50)  |  Call(44)  |  Derive(0)  |  Import(6)

src/m/i/mirocommunity-HEAD/localtv/templatetags/localtv_thumbnail.py   mirocommunity(Download)
from django import template
from django.contrib.staticfiles.storage import staticfiles_storage
 
from daguerre.adjustments import Fill
from daguerre.helpers import AdjustmentHelper, AdjustmentInfoDict
 
            helper = AdjustmentHelper([storage_path],
                                      [Fill(width=self.width,
                                            height=self.height)])
            info_dict = helper.info_dicts()[0][1]

src/m/i/mirocommunity-HEAD/localtv/feeds/views.py   mirocommunity(Download)
from hashlib import sha1
 
from daguerre.adjustments import Fill
from daguerre.helpers import AdjustmentHelper
from django.contrib.sites.models import Site
        for size in sizes:
            helper = AdjustmentHelper(items,
                                      [Fill(width=size[0], height=size[1])],
                                      "thumbnail")
            for item, info_dict in helper.info_dicts():

src/d/j/django-daguerre-2.1.1/daguerre/tests/unit/test_adjustments.py   django-daguerre(Download)
    import Image
 
from daguerre.adjustments import Fit, Crop, Fill, NamedCrop
from daguerre.helpers import AdjustmentHelper
from daguerre.models import AdjustedImage, Area
    def test_calculate__both(self):
        fill = Fill(width=50, height=50)
        self.assertEqual(fill.calculate((100, 100)), (50, 50))
 
    def test_calculate__unequal(self):
        fill = Fill(width=50, height=40)
        self.assertEqual(fill.calculate((100, 100)), (50, 40))
 
    def test_calculate__width(self):
        fill = Fill(width=50)
    def test_calculate__height(self):
        fill = Fill(height=50)
        self.assertEqual(fill.calculate((100, 100)), (50, 50))
 
    def test_calculate__max_height(self):

src/d/j/django-daguerre-HEAD/daguerre/tests/unit/test_adjustments.py   django-daguerre(Download)
    import Image
 
from daguerre.adjustments import Fit, Crop, Fill, NamedCrop
from daguerre.helpers import AdjustmentHelper
from daguerre.models import AdjustedImage, Area
    def test_calculate__both(self):
        fill = Fill(width=50, height=50)
        self.assertEqual(fill.calculate((100, 100)), (50, 50))
 
    def test_calculate__unequal(self):
        fill = Fill(width=50, height=40)
        self.assertEqual(fill.calculate((100, 100)), (50, 40))
 
    def test_calculate__width(self):
        fill = Fill(width=50)
    def test_calculate__height(self):
        fill = Fill(height=50)
        self.assertEqual(fill.calculate((100, 100)), (50, 50))
 
    def test_calculate__max_height(self):

src/d/j/django-daguerre-2.1.1/daguerre/tests/unit/test_views.py   django-daguerre(Download)
from django.utils.encoding import force_text
 
from daguerre.adjustments import NamedCrop, Fill
from daguerre.helpers import AdjustmentHelper
from daguerre.models import Area
        storage_path = 'path/to/thing.jpg'
        adj1 = NamedCrop(name='face')
        adj2 = Fill(width=10, height=5)
        helper = AdjustmentHelper([storage_path], [adj1, adj2])
        factory = RequestFactory()
        factory = RequestFactory()
        storage_path = 'nonexistant.png'
        helper = AdjustmentHelper([storage_path], [Fill(width=10, height=10)])
        self.view.kwargs = {'storage_path': storage_path}
        self.view.request = factory.get('/', helper.to_querydict(secure=True))
        factory = RequestFactory()
        storage_path = 'nonexistant.png'
        helper = AdjustmentHelper([storage_path], [Fill(width=10, height=5)])
        self.view.kwargs = {'storage_path': storage_path}
        get_params = helper.to_querydict()

src/d/j/django-daguerre-HEAD/daguerre/tests/unit/test_views.py   django-daguerre(Download)
from django.utils.encoding import force_text
 
from daguerre.adjustments import NamedCrop, Fill
from daguerre.helpers import AdjustmentHelper
from daguerre.models import Area
        storage_path = 'path/to/thing.jpg'
        adj1 = NamedCrop(name='face')
        adj2 = Fill(width=10, height=5)
        helper = AdjustmentHelper([storage_path], [adj1, adj2])
        factory = RequestFactory()
        factory = RequestFactory()
        storage_path = 'nonexistant.png'
        helper = AdjustmentHelper([storage_path], [Fill(width=10, height=10)])
        self.view.kwargs = {'storage_path': storage_path}
        self.view.request = factory.get('/', helper.to_querydict(secure=True))
        factory = RequestFactory()
        storage_path = 'nonexistant.png'
        helper = AdjustmentHelper([storage_path], [Fill(width=10, height=5)])
        self.view.kwargs = {'storage_path': storage_path}
        get_params = helper.to_querydict()