-
Notifications
You must be signed in to change notification settings - Fork 24
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
Clean settings #320
Clean settings #320
Conversation
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.
Reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @faucomte97)
backend/service/settings.py
line 203 at r1 (raw file):
# TODO: Go through the commented out middleware and decide if we still need them MIDDLEWARE = [
let's discuss this
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.
Reviewed 9 of 9 files at r3, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @faucomte97)
backend/service/settings.py
line 23 at r3 (raw file):
ALLOWED_HOSTS = ["*"] # Application definition
can we not delete this header?
backend/service/settings.py
line 23 at r3 (raw file):
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases DATABASES = {
add the following to CFL package
# Database
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
def get_databases(base_dir: Path):
"""Get the databases for the Django project.
Args:
base_dir: The base directory of the Django project.
Returns:
The databases for the django project.
"""
return {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": base_dir / "db.sqlite3",
"ATOMIC_REQUESTS": True,
}
}
after from codeforlife.settings import *
, write:
DATABASES = get_databases(BASE_DIR)
backend/service/settings.py
line 34 at r3 (raw file):
# https://docs.djangoproject.com/en/3.2/howto/static-files/ STATIC_ROOT = BASE_DIR / "static"
some of these static settings are repeated in the RR settings below
backend/service/settings.py
line 45 at r3 (raw file):
MEDIA_ROOT = os.path.join(STATIC_ROOT, "email_media/") LOGIN_REDIRECT_URL = "/teach/dashboard/" SILENCED_SYSTEM_CHECKS = ["captcha.recaptcha_test_key_error"]
do we need this captcha setting?
backend/service/settings.py
line 46 at r3 (raw file):
LOGIN_REDIRECT_URL = "/teach/dashboard/" SILENCED_SYSTEM_CHECKS = ["captcha.recaptcha_test_key_error"] RECAPTCHA_DOMAIN = "www.recaptcha.net"
do we need this captcha setting?
Previously, SKairinos (Stefan Kairinos) wrote…
please also do this to omit it from coverage report def get_databases(base_dir: Path): # pragma: no cover we don't need to test this helper |
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.
Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @faucomte97)
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.
Reviewable status: 5 of 9 files reviewed, 2 unresolved discussions (waiting on @SKairinos)
backend/service/settings.py
line 23 at r3 (raw file):
Previously, SKairinos (Stefan Kairinos) wrote…
can we not delete this header?
Done.
backend/service/settings.py
line 23 at r3 (raw file):
Previously, SKairinos (Stefan Kairinos) wrote…
please also do this to omit it from coverage report
def get_databases(base_dir: Path): # pragma: no coverwe don't need to test this helper
Done.
backend/service/settings.py
line 34 at r3 (raw file):
Previously, SKairinos (Stefan Kairinos) wrote…
some of these static settings are repeated in the RR settings below
Done.
backend/service/settings.py
line 45 at r3 (raw file):
Previously, SKairinos (Stefan Kairinos) wrote…
do we need this captcha setting?
Yes, to silence this error that occurs otherwise during the run script:
backend/service/settings.py
line 46 at r3 (raw file):
Previously, SKairinos (Stefan Kairinos) wrote…
do we need this captcha setting?
Not sure for this one, it might be used by the captcha app to get the Recaptcha script from this domain but I'm not 100% sure. Hard to tell since if I remember correctly we haven't implemented recaptcha yet for the register endpoints.
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.
Reviewed 4 of 4 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @faucomte97)
backend/service/settings.py
line 46 at r3 (raw file):
Previously, faucomte97 (Florian Aucomte) wrote…
Not sure for this one, it might be used by the captcha app to get the Recaptcha script from this domain but I'm not 100% sure. Hard to tell since if I remember correctly we haven't implemented recaptcha yet for the register endpoints.
Let's leave it for now, then.
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.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @faucomte97)
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.
Reviewed 3 of 3 files at r6, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @faucomte97)
This change is