Skip to content

Commit

Permalink
bugfix/test fix (#7)
Browse files Browse the repository at this point in the history
* Add logic for confidence_indicator api usage

* Add google-auth and requests

* Add variable for usps service info

* Remove CSRF middleware

Removing the csrf middleware since by default, when using the Django
Rest Framework (which is used commonly within give, but not for this
service at this time), the usage of views.APIView implies that the view
is exempt from csrf checking. See
https://github.com/encode/django-rest-framework/blob/fd017d00f938c6629d2eeb1b4d81716dff6d006e/rest_framework/views.py

* Read secrets from environment

* Add usps public key for ssl validation

* Remove keyerror on invalid settings
  • Loading branch information
Garrett Folks authored Apr 12, 2021
1 parent 1cfb6f0 commit 2c36456
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions usps/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

# USPS-specific settings
if not DEBUG:
USPS_SERVICE_INFO = os.environ["USPS_SERVICE_INFO"]
USPS_TARGET_AUDIENCE = os.environ["USPS_TARGET_AUDIENCE"]
USPS_SERVICE_INFO = os.environ.get("USPS_SERVICE_INFO")
USPS_TARGET_AUDIENCE = os.environ.get("USPS_TARGET_AUDIENCE")

# Set production renderer to JSONRenderer instead of the browsable API
if not DEBUG:
Expand Down

0 comments on commit 2c36456

Please sign in to comment.