<s> from __future__ import absolute_import , unicode_literals <EOL> from feincms import settings <EOL> from feincms . templatetags import feincms_thumbnail <EOL> from feincms . utils import get_object <EOL> def default_admin_thumbnail ( mediafile , dimensions = '<STR_LIT>' , ** kwargs ) : <EOL> if mediafile . type != '<STR_LIT:image>' : <EOL> return None <EOL> return feincms_thumbnail . thumbnail ( mediafile . file , dimensions ) <EOL> _cached_thumbnailer = None <EOL> def admin_thumbnail ( mediafile , dimensions = '<STR_LIT>' ) : <EOL> global _cached_thumbnailer <EOL> if not _cached_thumbnailer : <EOL> _cached_thumbnailer = get_object ( <EOL> settings . FEINCMS_MEDIALIBRARY_THUMBNAIL ) <EOL> return _cached_thumbnailer ( mediafile , dimensions = dimensions ) </s>
