-
Notifications
You must be signed in to change notification settings - Fork 365
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
Moves constants to settings.py
; #993
#1079
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.
Also merge master or rebase on master to get linter.
@@ -312,7 +391,7 @@ | |||
ENABLE_FTS = False | |||
|
|||
# Bridged configuration | |||
BRIDGED_JUDGE_ADDRESS = [('localhost', 9999)] | |||
BRIDGED_JUDGE_ADDRESS = [('localhost', 8080)] |
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.
Revert this.
@@ -9,7 +9,7 @@ | |||
from django.forms.utils import flatatt | |||
from django.utils.safestring import mark_safe | |||
|
|||
ACE_URL = getattr(settings, 'ACE_URL', '//cdnjs.cloudflare.com/ajax/libs/ace/1.1.3/ext-split.js') |
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.
Can inline this now.
@@ -6,8 +6,8 @@ | |||
from judge.models import Submission | |||
from judge.timezone import from_database_time | |||
|
|||
PP_STEP = getattr(settings, 'DMOJ_PP_STEP', 0.95) | |||
PP_ENTRIES = getattr(settings, 'DMOJ_PP_ENTRIES', 100) | |||
PP_STEP = settings.DMOJ_PP_STEP |
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.
Inline these.
excluded=getattr(settings, 'DMOJ_CAMO_EXCLUDE', ()), | ||
https=getattr(settings, 'DMOJ_CAMO_HTTPS', False)) | ||
if settings.DMOJ_CAMO_URL and settings.DMOJ_CAMO_KEY: | ||
client = CamoClient(settings.DMOJ_CAMO_URL, key = settings.DMOJ_CAMO_KEY, |
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.
No spaces before/after =
.
@@ -5,4 +5,4 @@ | |||
else: | |||
Subscription = None | |||
|
|||
newsletter_id = None if Subscription is None else getattr(settings, 'NEWSLETTER_ID_ON_REGISTER', None) | |||
newsletter_id = None if Subscription is None else settings.NEWSLETTER_ID_ON_REGISTER |
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.
Rename with DMOJ_
prefix.
judge/widgets/select2.py
Outdated
'django_select2.js'), | ||
css={'screen': (getattr(settings, 'SELECT2_CSS_URL', DEFAULT_SELECT2_CSS),)} | ||
css={'screen': (settings.SELECT2_CSS_URL)} |
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.
The original was a tuple; this no longer is.
TERMS_OF_SERVICE_URL = None | ||
DEFAULT_USER_LANGUAGE = 'PY2' | ||
|
||
COMPRESS_ENABLED = 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.
I guess this should still be not DEBUG
.
SITE_ADMIN_EMAIL = False | ||
|
||
# Constants | ||
DMOJ_SSL = 0 |
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.
Add comment for what the possible values here are (https://github.com/DMOJ/site/pull/1079/files#diff-43f2be90fc113eb0e09a185fcfc97b69L20)
This will prevent #1058 from causing confusion.
Fixes #993