This block of code, and the `SENTRY_DSN` code below are stuff that needs to run in a production environment.  I'm not exactly sure how to do this in a DRY way.  Maybe this is ok.  It used to live in `settings_base.py` which I think was wrong.