Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support to define THUMBNAIL_OPTIONS_DICT on per model basis #4

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

intellisense
Copy link

Some time we need to define different sizes based on different model. I have added the patch which will give higher importance to model level THUMBNAIL_OPTIONS_DICT if that is not defined always fall back to the settings.OPTIONS_DICT. How to use it:

class Image(AsyncThumbnailMixin, models.Model):
    image_field_name = 'image'
    THUMBNAIL_OPTIONS_DICT = {
        'small': {
                'geometry': '30x30',
                'crop': 'center'
        },
    } 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant