Login

Snippets by izibi

Snippet List

sorl.thumbnail processor: white background

If you want to resize transparent PNGs with the `{% thumbnail %}` templatetag, they'll sometimes get an ugly black background that looks even more ugly on a white background. This processor puts the image on a white background. You can simply change the background color by replacing `white` with any other color. To use this filter simple put the following two lines of code in your settings file: from sorl.thumbnail.defaults import PROCESSORS as THUMBNAIL_PROCESSORS THUMBNAIL_PROCESSORS = ('path.to.white_background',) + THUMBNAIL_PROCESSORS

  • png
  • background
  • sorl.thumbnail
Read More

Update All Apps to Latest Revision

This snippet is based on [#844](http://www.djangosnippets.org/snippets/844/) and updates all apps in the current directory using hg, svn, git or bzr.

  • update
  • svn
  • git
  • hg
  • bzr
Read More

izibi has posted 2 snippets.