Fix some issues with avatar services
Review Request #8257 — Created June 22, 2016 and submitted — Latest diff uploaded
The avatar services code has been cleaned up. Docstrings have been
touched up so that they now document all parameters and do not document
unnecessary ones. TheRB.ReviewReplyEditorView
now renders the avatar
with asrcset=
attribute instead of thedata-at2x
attribute, which
is no longer used. Finally, a new template tag,{% avatar_urls %}
, has
been introduced to serialize all avatar URLs for a given user and
requsested size to a Javascript object. This preventsKeyError
s from
being raised when avatar services only provide1x
resolution avatars,
as well as provides all additional resolutions that they can provide.
(Previously, we were hardcoding1x
and2x
resolutions.)
- Able to use an avatar service (the file upload avatar service, in this
case) that only provides1x
resolution avatars. - Ran unit tests.