django-filer
django-filer copied to clipboard
subject location on alias in settings
Hi, i have aliases for thumbnail, and now i need to use subject location with them, how can i do that?
THUMBNAIL_ALIASES = {
'': {
'cover': {'size': (966, 330), 'replace_alpha': '#fff', 'autocrop': True, 'crop': True, 'upscale': True},
'category': {'size': (406, 200), 'replace_alpha': '#fff', 'autocrop': True, 'crop': True, 'upscale': True},
'article': {'size': (230, 120), 'replace_alpha': '#fff', 'autocrop': True, 'crop': True, 'upscale': True},
}
}
I'm not sure how THUMBNAIL_ALIASES
works. Hopefully it allows passing in extra parameters with the template tag. Then you can do it as described in the docs: http://django-filer.readthedocs.org/en/0.9.4/installation.html#subject-location-aware-cropping
e.g {% thumbnail obj.img 200x300 crop upscale subject_location=obj.img.subject_location %}
or {% thumbnail obj.img 200x300 crop upscale subject_location=50,25 %}
Sorry for digging this one out. Is there a specific reason why scale_and_crop_with_subject_location
doesn't automatically use the subject location set in the filer backend? That would make it possible to use the thumbnail_url
template filter (http://easy-thumbnails.readthedocs.org/en/2.1/usage/#thumbnail-url-filter) together with subject location aware cropping.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
still relevant.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Still relevant, needs a little design decision (Should scale_and_crop_with_subject_location
use the default subject location saved in the database?)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This will now be closed due to inactivity, but feel free to reopen it.