Support not sending e-mails on WebAPI token creation

Review Request #9258 — Created Oct. 10, 2017 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x
de65698...

Reviewers

Currently when a WebAPI token is created, we always send an e-mail
notifying the user of its creation. However, this is not always ideal.
Some extensions and/or integrations require a WebAPI token in order to
communicate with Review Board from some external service (such as
CircleCI). In this case, we do not need to bother the user with a
notification that the token was created.

Djblets now has support for token update and create signals (via
/r/9275). We use these signals to determine if the token generated was
auto-generated. The notifications module has been modified to listen
to the new signals (instead of the generic post_save signal it was
listening to before) and not send e-mails when the token in question
is auto-generated.

Ran unit tests.