Skip to content

Commit

Permalink
Merge pull request #98 from lsst-ts/tickets/LOVE-29
Browse files Browse the repository at this point in the history
tickets/LOVE-29
  • Loading branch information
sebastian-aranda authored Mar 4, 2021
2 parents 10db83e + 80c000e commit 470a3f9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[flake8]
max-line-length = 120
ignore = D100
ignore = D100, W503
35 changes: 14 additions & 21 deletions manager/manager/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

# Define wether the system is being tested or not:
TESTING = os.environ.get("TESTING", False)
"""Define wether or not this instance is being created for testing or not, get from the `TESTING` environment variable (`string`)"""
"""Define wether or not this instance is being created for testing or not,
get from the `TESTING` environment variable (`string`)"""

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.getenv(
Expand Down Expand Up @@ -106,9 +107,7 @@
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [
os.path.join(BASE_DIR, "templates"),
],
"DIRS": [os.path.join(BASE_DIR, "templates")],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
Expand All @@ -135,20 +134,15 @@
{
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
},
{
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
},
{
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
},
{
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
},
{"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"},
{"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"},
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"},
]

# Password for other processes
PROCESS_CONNECTION_PASS = os.environ.get("PROCESS_CONNECTION_PASS", "dev_pass")
"""Password that Producers use to connect to eh Manager, read from the `PROCESS_CONNECTION_PASS` environment variable (`string`)"""
"""Password that Producers use to connect to eh Manager,
read from the `PROCESS_CONNECTION_PASS` environment variable (`string`)"""

# Internationalization
# https://docs.djangoproject.com/en/2.2/topics/i18n/
Expand Down Expand Up @@ -227,16 +221,16 @@
+ "/0"
],
"symmetric_encryption_keys": [SECRET_KEY],
"capacity": 1500,
"expiry": 10,
},
},
}
"""Django Channels Channel Layer configuration (`dict`)"""

else:
CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels.layers.InMemoryChannelLayer",
},
"default": {"BACKEND": "channels.layers.InMemoryChannelLayer"},
}

# LDAP
Expand All @@ -255,13 +249,12 @@
AUTH_LDAP_BIND_PASSWORD = ""

AUTH_LDAP_USER_SEARCH = LDAPSearch(
"ou=people,dc=planetexpress,dc=com",
ldap.SCOPE_SUBTREE,
"(uid=%(user)s)",
"ou=people,dc=planetexpress,dc=com", ldap.SCOPE_SUBTREE, "(uid=%(user)s)",
)

TRACE_TIMESTAMPS = True
"""Define wether or not to add tracing timestamps to websocket messages. Read from TRACE_TIMESTAMPS` environment variable (`bool`)"""
"""Define wether or not to add tracing timestamps to websocket messages.
Read from TRACE_TIMESTAMPS` environment variable (`bool`)"""

if os.environ.get("HIDE_TRACE_TIMESTAMPS", False):
TRACE_TIMESTAMPS = False

0 comments on commit 470a3f9

Please sign in to comment.