twaddington / django-gravatar

Essential Gravatar support for Django. Features helper methods, templatetags and a full test suite!
MIT License
151 stars 33 forks source link

When passing invalid input, should fail silently #3

Closed Bouke closed 12 years ago

Bouke commented 12 years ago

From the django manual:

render() should never raise TemplateSyntaxError or any other exception. It should fail silently, just as template filters should.

Added a test which fails if the passed variable evaluates to None (or anything the helper chokes upon). I had a problem with an optional foreignkey and didn't like the foresight of creating if-conditions all over the place.

twaddington commented 12 years ago

Thanks for your contributions Bouke!