Skip to content

Commit

Permalink
S3 settings config
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed May 31, 2022
1 parent 8b5ae5d commit fdcbdb1
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 76 deletions.
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ PyYAML = "*"
sentry-sdk = "*"
sqlparse = "*"
whitenoise = "*"
boto3 = "*"

[dev-packages]
black = "*"
Expand Down
182 changes: 107 additions & 75 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 14 additions & 1 deletion app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,19 @@
)


# Object storage : Scaleway (S3-like)
# ------------------------------------------------------------------------------

S3_ENDPOINT = os.getenv("S3_ENDPOINT")
S3_BUCKET_NAME = os.getenv("S3_BUCKET_NAME")
S3_BUCKET_REGION = os.getenv("S3_BUCKET_REGION")
S3_ACCESS_KEY = os.getenv("S3_ACCESS_KEY")
S3_SECRET_KEY = os.getenv("S3_SECRET_KEY")

QUESTION_FOLDER_NAME = "questions"
QUIZ_FOLDER_NAME = "quizs"


# Django Bootstrap5
# https://django-bootstrap5.readthedocs.io/
# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -318,7 +331,7 @@
"import csv, json, yaml",
"from datetime import datetime, date, timedelta",
"from core import constants",
"from core.utils import utilities, notion, github, sendinblue",
"from core.utils import utilities, notion, github, sendinblue, s3",
"from stats import utilities as utilities_stats",
]

Expand Down

0 comments on commit fdcbdb1

Please sign in to comment.