Commits

Author Commit Message Labels Comments Date
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
render() should never raise exceptions according to docs, updated code to reflect that...one step forward one step back.
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
basically nothing again.
Branches
sorl-merge-in-progress
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
s orry i didnt read the docs so i didnt get the size var correct. However why have 2 different syntaxes for size?. I think it makes more sence now so Im updating the docs too.
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
basically nothing
Branches
sorl-merge-in-progress
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
size error should raise error regardless of debug setting.
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
mod get_thumbnail_setting. **kwargs bye bye
Branches
sorl-merge-in-progress
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
resolving size was not working i cleaned that up a bit. also we need to make sure we reset the context var on error becase when looping thru images and one gave an error, the context var will be set from previous loop.
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
why use upper() in get_thumbnail_setting?
Branches
sorl-merge-in-progress
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
made source filetype a property so we dont check filetype until needed, also made imagemagick use TIFF as opposed to png32. Also we need a larger size from imagemagick when using autocrop, we default to 3* for that and crop, its just a guess in either case.
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
reinstalled the function get_thumbnail_setting on toplevel. kwargs: basedir,subdir,prefix can now be sent from tamplate code (not tag) to override defaults and settings file. quality now has a setting option.
Branches
sorl-merge-in-progress
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
forgot print debugging in base
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
getattr was wrong in main.py
Branches
sorl-merge-in-progress
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
remove tmp file on error, imagemagick method had wrong name when called from wvps convert.
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
comment cleanup, no code modified.
Branches
sorl-merge-in-progress
smil...@18c32c52-eb3f-0410-93bd-f15eff1430f4
Small doc fix
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
quality stuff and something else on the settings... not clear which way to go yet i figure...
Branches
sorl-merge-in-progress
smil...@18c32c52-eb3f-0410-93bd-f15eff1430f4
Renaming the new byteunit filter to something more sensible: filesize
smil...@18c32c52-eb3f-0410-93bd-f15eff1430f4
Oops, pass kwargs again... it'll be good when I've done a test suite :P
Branches
sorl-merge-in-progress
smil...@18c32c52-eb3f-0410-93bd-f15eff1430f4
thumbnail template tag's size can now be a context variable (still accepts WxH like before)
smil...@18c32c52-eb3f-0410-93bd-f15eff1430f4
Yea, realised I had broken it just now. Type checking was a dumb idea, but we'll just convert it to an int in Template rather than doing it in the template tag.
Branches
sorl-merge-in-progress
smil...@18c32c52-eb3f-0410-93bd-f15eff1430f4
Refactor the conversion methods to remove the Django ties to the BaseThumbnail class. Added some documentation about it too.
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
base.py: isdigit is only for strings and i think we should not do type checking.. that leads me to should we not just leave opts as default [], but i leave that to you. Modified the checking of quality, check validity of opts list, adding a self.opts_list (might as well). main.py: Added get_thumbnail_setting function to get a setting from THUMBNAIL_SETTINGS, I think we shouldnt pollute the settings.py file with too many vars, but Im not sure where to put this function. I ended …
Branches
sorl-merge-in-progress
smil...@18c32c52-eb3f-0410-93bd-f15eff1430f4
New byteunit filter rather than filesize presentation logic in the Template class
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
Also changes to main.py, regarding last commit. And a minor underscore fix while gen. the filename.
Branches
sorl-merge-in-progress
smil...@18c32c52-eb3f-0410-93bd-f15eff1430f4
Small changes to thumbnail tag. 1. Use get_thumbnail_setting('DEBUG') inline so tests don't fail 2. Combine the redundant get_thumbnail_node method with thumbnail (side benefit: this fixes the docstring in the Django admin docs for the tag) 3. register the tag the old Python 2.3 way for better compatibility
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
While we loop through VALID_OPTIONS in base.py, we might as well save the ordered list of options then, that way the filename generation will be a little cheaper.
Branches
sorl-merge-in-progress
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
added magic file recogn.
smil...@18c32c52-eb3f-0410-93bd-f15eff1430f4
Fix fallbacks to settings. Good spot, sorl ;)
Branches
sorl-merge-in-progress
mi...@sorl.net@18c32c52-eb3f-0410-93bd-f15eff1430f4
metion the new stuff in docs.
smil...@18c32c52-eb3f-0410-93bd-f15eff1430f4
Change back to using a dict for self.opts (note that the opts argument is still a list though) because it's much faster for accessing options. Also got rid of the size() helper method. If someone wants that, they can get it out of .data
Branches
sorl-merge-in-progress
  1. Prev
  2. Next