-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat(#22): add django models #29
Conversation
6f34a0e
to
a434760
Compare
backend/kernelCI/settings.py
Outdated
@@ -27,6 +29,8 @@ | |||
|
|||
ALLOWED_HOSTS = [] | |||
|
|||
env = environ.Env(DEBUG=(bool, False)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should be using get_json_env_var()
https://github.com/profusion/kernelCI-dashboard/blob/main/backend/kernelCI/settings.py#L18C5-L18C21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just rebase your branch and you can use get_json_env_var
backend/kernelCI/settings.py
Outdated
@@ -27,6 +29,8 @@ | |||
|
|||
ALLOWED_HOSTS = [] | |||
|
|||
env = environ.Env(DEBUG=(bool, False)) | |||
environ.Env.read_env(os.path.join(BASE_DIR, '.env')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is never to be used from within the code, but rather from some external env loader. Be it a source .env
in the shell that calls the server, https://pypi.org/project/python-dotenv/ with a forced import before it runs...
anyway, never to be done/called-directly in the project code
a434760
to
eaa5df9
Compare
eaa5df9
to
9e83c79
Compare
Description
Related Issues
How to test it
cp .env.example .env
poetry run python3 manage.py inspectdb
to check if the app can get the db valuespoetry run python3 manage.py shell
and inside the shelland check if there is any issue object