Add signals for token creation and update

Review Request #9275 — Created Oct. 17, 2017 and submitted — Latest diff uploaded

Information

Djblets
release-0.10.x
0488c6b...

Reviewers

We now emit a signal (djblets.webapi.signals.webapi_token_created)
when we generate a token via WebAPITokens.objects.generate_token()
method. In addition, this method now takes an auto_generated parameter
to indicate whether or not the created token is being automatically
generated by some process (such as an integration). This can be used by
signal consumers to determine, e.g., whether or not an e-mail should be
sent upon token generation.

Ran /r/9285/ unit tests.