Skip to content

Commit

Permalink
Merge branch 's3_upload' of https://github.com/loydbanks/seed into pr…
Browse files Browse the repository at this point in the history
…/loydbanks/3431
  • Loading branch information
Alex Chapin committed Aug 2, 2022
2 parents 93afcbb + ab3b009 commit c783aad
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 5 deletions.
5 changes: 0 additions & 5 deletions config/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,11 @@

USE_S3 = os.getenv('USE_S3') == 'TRUE'
if USE_S3:
print("credentials", os.getenv('AWS_ACCESS_KEY_ID'),
os.getenv('AWS_SECRET_ACCESS_KEY'),
os.getenv('AWS_STORAGE_BUCKET_NAME'),
os.getenv('AWS_S3_REGION_NAME'))
# aws settings
AWS_ACCESS_KEY_ID = os.getenv('AWS_ACCESS_KEY_ID')
AWS_SECRET_ACCESS_KEY = os.getenv('AWS_SECRET_ACCESS_KEY')
AWS_STORAGE_BUCKET_NAME = os.getenv('AWS_STORAGE_BUCKET_NAME')
AWS_S3_CUSTOM_DOMAIN = f"{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com"
print("custom domain", f"{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com")
AWS_S3_OBJECT_PARAMETERS = {'CacheControl': 'max-age=86400'}
AWS_S3_REGION_NAME = os.getenv('AWS_S3_REGION_NAME')
# s3 media settings
Expand Down
Binary file modified locale/en_US/LC_MESSAGES/django.mo
Binary file not shown.
10 changes: 10 additions & 0 deletions locale/en_US/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ msgstr "API Documentation"
msgid "API Key"
msgstr "API Key"

msgid "AT_EMAIL_TEXT"
msgstr "Use the email associated with your account from <a href=\"{link}/\" target=\"_blank\" rel=\"noopener noreferrer\">Building Energy Score website</a>."

msgid "AT_PASS_TEXT"
msgstr "Use the password associated with your account from <a href=\"{link}/\" target=\"_blank\" rel=\"noopener noreferrer\">Building Energy Score website</a>."

#. Helper text for the Audit Template token in organization settings.
msgid "AT_TOKEN_TEXT"
msgstr "Please refer to the <a href=\"{link}/reports/api/\" target=\"_blank\" rel=\"noopener noreferrer\">Audit Template documentation</a> to learn how to get an API key. Note, do not prefix the token with \"Token \", only include the token itself."

msgid "About"
msgstr "About"

Expand Down
Binary file modified locale/fr_CA/LC_MESSAGES/django.mo
Binary file not shown.
10 changes: 10 additions & 0 deletions locale/fr_CA/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ msgstr "Documentation de l'API"
msgid "API Key"
msgstr "Clé API"

msgid "AT_EMAIL_TEXT"
msgstr "Utilisez l'e-mail associé à votre compte depuis <a href=\"{link}/\" target=\"_blank\" rel=\"noopener noreferrer\"> Building Energy Score </a> ."

msgid "AT_PASS_TEXT"
msgstr "Utilisez le mot de passe associé à votre compte sur le <a href=\"{link}/\" target=\"_blank\" rel=\"noopener noreferrer\"> Building Energy Score </a> ."

#. Helper text for the Audit Template token in organization settings.
msgid "AT_TOKEN_TEXT"
msgstr "Veuillez consulter la <a href=\"{link}/reports/api/\" target=\"_blank\" rel=\"noopener noreferrer\"> documentation sur Audit Template </a> pour savoir comment obtenir une clé API. Remarque, ne préfixez pas le jeton avec \"Jeton \", incluez uniquement le jeton lui-même."

msgid "About"
msgstr "À Propos"

Expand Down
3 changes: 3 additions & 0 deletions seed/static/seed/locales/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"AND": "AND",
"API Documentation": "API Documentation",
"API Key": "API Key",
"AT_EMAIL_TEXT": "Use the email associated with your account from <a href=\"{link}/\" target=\"_blank\" rel=\"noopener noreferrer\">Building Energy Score website</a>.",
"AT_PASS_TEXT": "Use the password associated with your account from <a href=\"{link}/\" target=\"_blank\" rel=\"noopener noreferrer\">Building Energy Score website</a>.",
"AT_TOKEN_TEXT": "Please refer to the <a href=\"{link}/reports/api/\" target=\"_blank\" rel=\"noopener noreferrer\">Audit Template documentation</a> to learn how to get an API key. Note, do not prefix the token with \"Token \", only include the token itself.",
"About": "About",
"About SEED Platform™": "About SEED Platform™",
"Accept": "Accept",
Expand Down
3 changes: 3 additions & 0 deletions seed/static/seed/locales/fr_CA.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"AND": "ET",
"API Documentation": "Documentation de l'API",
"API Key": "Clé API",
"AT_EMAIL_TEXT": "Utilisez l'e-mail associé à votre compte depuis <a href=\"{link}/\" target=\"_blank\" rel=\"noopener noreferrer\"> Building Energy Score </a> .",
"AT_PASS_TEXT": "Utilisez le mot de passe associé à votre compte sur le <a href=\"{link}/\" target=\"_blank\" rel=\"noopener noreferrer\"> Building Energy Score </a> .",
"AT_TOKEN_TEXT": "Veuillez consulter la <a href=\"{link}/reports/api/\" target=\"_blank\" rel=\"noopener noreferrer\"> documentation sur Audit Template </a> pour savoir comment obtenir une clé API. Remarque, ne préfixez pas le jeton avec \"Jeton \", incluez uniquement le jeton lui-même.",
"About": "À Propos",
"About SEED Platform™": "À propos de SEED Platform™",
"Accept": "Acceptez",
Expand Down
3 changes: 3 additions & 0 deletions seed/static/seed/partials/organization_settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ <h3 translate>Audit Template Organization Token</h3>
<form class="form-horizontal" role="form">
<div class="form-group">
<div class="col-sm-4">
<p translate="AT_TOKEN_TEXT" translate-values="{ link: org.at_host_url }"></p>
<input type="text" class="form-control" ng-model="org.at_organization_token" ng-disabled="::!auth.requires_owner">
</div>
</div>
Expand All @@ -117,6 +118,7 @@ <h3 translate>Audit Template Email</h3>
<form class="form-horizontal" role="form">
<div class="form-group">
<div class="col-sm-4">
<p translate="AT_EMAIL_TEXT" translate-values="{ link: org.at_host_url }"></p>
<input type="text" class="form-control" ng-model="org.audit_template_user" ng-disabled="::!auth.requires_owner">
</div>
</div>
Expand All @@ -130,6 +132,7 @@ <h3 translate>Audit Template Password</h3>
<form class="form-horizontal" role="form">
<div class="form-group">
<div class="col-sm-4">
<p translate="AT_PASS_TEXT" translate-values="{ link: org.at_host_url }"></p>
<input type="text" class="form-control" ng-model="org.audit_template_password" ng-disabled="::!auth.requires_owner">
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions seed/views/v3/organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def _dict_org(request, organizations):
'at_organization_token': o.at_organization_token,
'audit_template_user': o.audit_template_user,
'audit_template_password': o.audit_template_password,
'at_host_url': settings.AUDIT_TEMPLATE_HOST,
}
orgs.append(org)

Expand Down

0 comments on commit c783aad

Please sign in to comment.