# Environment
* refactors settings into env usage * adds proxy usage for schneider parcel fetching (using public web address instead of internal ip address)
This commit is contained in:
@@ -9,7 +9,7 @@ from django.core.mail import send_mail
|
||||
from django.template.loader import render_to_string
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from konova.sub_settings.django_settings import DEFAULT_FROM_EMAIL, EMAIL_REPLY_TO, SUPPORT_MAIL_RECIPIENT
|
||||
from konova.sub_settings.django_settings import DEFAULT_FROM_EMAIL, EMAIL_REPLY_TO
|
||||
|
||||
|
||||
class Mailer:
|
||||
@@ -416,7 +416,7 @@ class Mailer:
|
||||
"EMAIL_REPLY_TO": EMAIL_REPLY_TO,
|
||||
}
|
||||
msg = render_to_string("email/api/verify_token.html", context)
|
||||
user_mail_address = [SUPPORT_MAIL_RECIPIENT]
|
||||
user_mail_address = [EMAIL_REPLY_TO]
|
||||
self.send(
|
||||
user_mail_address,
|
||||
_("Request for new API token"),
|
||||
|
||||
@@ -11,6 +11,7 @@ from json import JSONDecodeError
|
||||
import requests
|
||||
|
||||
from konova.sub_settings import schneider_settings
|
||||
from konova.sub_settings.proxy_settings import PROXIES
|
||||
|
||||
|
||||
class ParcelFetcher:
|
||||
@@ -43,6 +44,7 @@ class ParcelFetcher:
|
||||
|
||||
response = requests.post(
|
||||
url=post_url,
|
||||
proxies=PROXIES,
|
||||
data=self.geojson,
|
||||
headers={
|
||||
self.auth_header: self.auth_header_token
|
||||
|
||||
Reference in New Issue
Block a user