Utils module¶
- ultimatethumb.utils.get_thumb_name(source, **options)[source]¶
Builds the thumbnail name and uses the name to store the source and options to cache.
- ultimatethumb.utils.get_thumb_data(thumb_name)[source]¶
Uses the thumbail name and fetches the source and options from cache.
- ultimatethumb.utils.parse_source(source)[source]¶
Parse and lookup the file system path for a given source. The function understands both media names and static names (if prefixed with “static:”)
- ultimatethumb.utils.factor_size(value, factor)[source]¶
Factors the given thumbnail size. Understands both absolute dimensions and percentages.
- ultimatethumb.utils.get_size_for_path(path)[source]¶
Gets the image size for a given path. If the path does not exist, the call will fail loud with e.g. OSError exception.
- ultimatethumb.utils.get_domain_url(url)[source]¶
Returns the given url prefixed with a domain if configured in settings.