Make an HttpRequest optional when rendering avatars or fetching URLs.

Review Request #10515 — Created April 4, 2019 and submitted

chipx86
Djblets
release-1.0.x
djblets

Avatar rendering and URL fetching currently takes a request, but this
prevents avatars from being used if rendering outside HTTP requests or
in places where the request is not available (such as in form widgets).

This change makes these arguments optional. Avatar implementations must
take care to respect this, checking if a request is None before
accessing it, and falling back in some manner if needed.

Unit tests pass.

Tested manually (with some changes in Review Board) and verified that
different avatars rendered without having a request present.

Summary
Make an HttpRequest optional when rendering avatars or fetching URLs.
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-1.0.x (c5b2160)
Loading...