Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, March 26th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
ab146154
Commit
ab146154
authored
11 years ago
by
Will Daly
Browse files
Options
Downloads
Patches
Plain Diff
Moved CSRF override into its own settings file
parent
39030c66
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
cms/envs/aws.py
+0
-8
0 additions, 8 deletions
cms/envs/aws.py
cms/envs/dev.py
+0
-9
0 additions, 9 deletions
cms/envs/dev.py
lms/envs/aws.py
+1
-9
1 addition, 9 deletions
lms/envs/aws.py
lms/envs/dev.py
+0
-9
0 additions, 9 deletions
lms/envs/dev.py
lms/envs/load_test.py
+11
-0
11 additions, 0 deletions
lms/envs/load_test.py
with
12 additions
and
35 deletions
cms/envs/aws.py
+
0
−
8
View file @
ab146154
...
@@ -126,14 +126,6 @@ LOGGING = get_logger_config(LOG_DIR,
...
@@ -126,14 +126,6 @@ LOGGING = get_logger_config(LOG_DIR,
#theming start:
#theming start:
PLATFORM_NAME
=
ENV_TOKENS
.
get
(
'
PLATFORM_NAME
'
,
'
edX
'
)
PLATFORM_NAME
=
ENV_TOKENS
.
get
(
'
PLATFORM_NAME
'
,
'
edX
'
)
# Disable CSRF for load testing
if
MITX_FEATURES
.
get
(
'
AUTOMATIC_AUTH_FOR_LOAD_TESTING
'
):
exclude_csrf
=
lambda
elem
:
not
elem
in
\
[
'
django.core.context_processors.csrf
'
,
'
django.middleware.csrf.CsrfViewMiddleware
'
]
TEMPLATE_CONTEXT_PROCESSORS
=
filter
(
exclude_csrf
,
TEMPLATE_CONTEXT_PROCESSORS
)
MIDDLEWARE_CLASSES
=
filter
(
exclude_csrf
,
MIDDLEWARE_CLASSES
)
################ SECURE AUTH ITEMS ###############################
################ SECURE AUTH ITEMS ###############################
# Secret things: passwords, access keys, etc.
# Secret things: passwords, access keys, etc.
...
...
This diff is collapsed.
Click to expand it.
cms/envs/dev.py
+
0
−
9
View file @
ab146154
...
@@ -182,15 +182,6 @@ SEGMENT_IO_KEY = os.environ.get('SEGMENT_IO_KEY')
...
@@ -182,15 +182,6 @@ SEGMENT_IO_KEY = os.environ.get('SEGMENT_IO_KEY')
if
SEGMENT_IO_KEY
:
if
SEGMENT_IO_KEY
:
MITX_FEATURES
[
'
SEGMENT_IO
'
]
=
True
MITX_FEATURES
[
'
SEGMENT_IO
'
]
=
True
########################## LOAD TESTING ########################
# Disable CSRF for load testing
if
MITX_FEATURES
.
get
(
'
AUTOMATIC_AUTH_FOR_LOAD_TESTING
'
):
exclude_csrf
=
lambda
elem
:
not
elem
in
\
[
'
django.core.context_processors.csrf
'
,
'
django.middleware.csrf.CsrfViewMiddleware
'
]
TEMPLATE_CONTEXT_PROCESSORS
=
filter
(
exclude_csrf
,
TEMPLATE_CONTEXT_PROCESSORS
)
MIDDLEWARE_CLASSES
=
filter
(
exclude_csrf
,
MIDDLEWARE_CLASSES
)
#####################################################################
#####################################################################
# Lastly, see if the developer has any local overrides.
# Lastly, see if the developer has any local overrides.
...
...
This diff is collapsed.
Click to expand it.
lms/envs/aws.py
+
1
−
9
View file @
ab146154
...
@@ -10,6 +10,7 @@ Common traits:
...
@@ -10,6 +10,7 @@ Common traits:
# We intentionally define lots of variables that aren't used, and
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
# pylint: disable=W0401, W0614
import
json
import
json
from
.common
import
*
from
.common
import
*
...
@@ -177,15 +178,6 @@ for name, value in ENV_TOKENS.get("CODE_JAIL", {}).items():
...
@@ -177,15 +178,6 @@ for name, value in ENV_TOKENS.get("CODE_JAIL", {}).items():
COURSES_WITH_UNSAFE_CODE
=
ENV_TOKENS
.
get
(
"
COURSES_WITH_UNSAFE_CODE
"
,
[])
COURSES_WITH_UNSAFE_CODE
=
ENV_TOKENS
.
get
(
"
COURSES_WITH_UNSAFE_CODE
"
,
[])
# Disable CSRF for load testing
if
MITX_FEATURES
.
get
(
'
AUTOMATIC_AUTH_FOR_LOAD_TESTING
'
):
exclude_csrf
=
lambda
elem
:
not
elem
in
\
[
'
django.core.context_processors.csrf
'
,
'
django.middleware.csrf.CsrfViewMiddleware
'
]
TEMPLATE_CONTEXT_PROCESSORS
=
filter
(
exclude_csrf
,
TEMPLATE_CONTEXT_PROCESSORS
)
MIDDLEWARE_CLASSES
=
filter
(
exclude_csrf
,
MIDDLEWARE_CLASSES
)
############################## SECURE AUTH ITEMS ###############
############################## SECURE AUTH ITEMS ###############
# Secret things: passwords, access keys, etc.
# Secret things: passwords, access keys, etc.
...
...
This diff is collapsed.
Click to expand it.
lms/envs/dev.py
+
0
−
9
View file @
ab146154
...
@@ -255,15 +255,6 @@ SEGMENT_IO_LMS_KEY = os.environ.get('SEGMENT_IO_LMS_KEY')
...
@@ -255,15 +255,6 @@ SEGMENT_IO_LMS_KEY = os.environ.get('SEGMENT_IO_LMS_KEY')
if
SEGMENT_IO_LMS_KEY
:
if
SEGMENT_IO_LMS_KEY
:
MITX_FEATURES
[
'
SEGMENT_IO_LMS
'
]
=
True
MITX_FEATURES
[
'
SEGMENT_IO_LMS
'
]
=
True
########################## LOAD TESTING ########################
# Disable CSRF for load testing
if
MITX_FEATURES
.
get
(
'
AUTOMATIC_AUTH_FOR_LOAD_TESTING
'
):
exclude_csrf
=
lambda
elem
:
not
elem
in
\
[
'
django.core.context_processors.csrf
'
,
'
django.middleware.csrf.CsrfViewMiddleware
'
]
TEMPLATE_CONTEXT_PROCESSORS
=
filter
(
exclude_csrf
,
TEMPLATE_CONTEXT_PROCESSORS
)
MIDDLEWARE_CLASSES
=
filter
(
exclude_csrf
,
MIDDLEWARE_CLASSES
)
########################## USER API ########################
########################## USER API ########################
EDX_API_KEY
=
None
EDX_API_KEY
=
None
...
...
This diff is collapsed.
Click to expand it.
lms/envs/load_test.py
0 → 100644
+
11
−
0
View file @
ab146154
# Settings for load testing
from
.aws
import
*
# Disable CSRF for load testing
if
MITX_FEATURES
.
get
(
'
AUTOMATIC_AUTH_FOR_LOAD_TESTING
'
):
exclude_csrf
=
lambda
elem
:
not
elem
in
\
[
'
django.core.context_processors.csrf
'
,
'
django.middleware.csrf.CsrfViewMiddleware
'
]
TEMPLATE_CONTEXT_PROCESSORS
=
filter
(
exclude_csrf
,
TEMPLATE_CONTEXT_PROCESSORS
)
MIDDLEWARE_CLASSES
=
filter
(
exclude_csrf
,
MIDDLEWARE_CLASSES
)
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment