Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
f1b13595
Commit
f1b13595
authored
Jul 27, 2017
by
John Eskew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only display debug toolbar on non-ajax requests.
parent
8eb4e469
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
cms/envs/devstack.py
+6
-1
lms/envs/devstack.py
+6
-2
No files found.
cms/envs/devstack.py
View file @
f1b13595
...
@@ -92,7 +92,12 @@ DEBUG_TOOLBAR_CONFIG = {
...
@@ -92,7 +92,12 @@ DEBUG_TOOLBAR_CONFIG = {
def
should_show_debug_toolbar
(
request
):
def
should_show_debug_toolbar
(
request
):
# We always want the toolbar on devstack unless running tests from another Docker container
# We always want the toolbar on devstack unless running tests from another Docker container
return
not
request
.
get_host
()
.
startswith
(
'edx.devstack.studio:'
)
if
request
.
get_host
()
.
startswith
(
'edx.devstack.studio:'
):
return
False
# Only display for non-ajax requests.
if
request
.
is_ajax
():
return
False
return
True
# To see stacktraces for MongoDB queries, set this to True.
# To see stacktraces for MongoDB queries, set this to True.
...
...
lms/envs/devstack.py
View file @
f1b13595
...
@@ -89,8 +89,12 @@ DEBUG_TOOLBAR_CONFIG = {
...
@@ -89,8 +89,12 @@ DEBUG_TOOLBAR_CONFIG = {
def
should_show_debug_toolbar
(
request
):
def
should_show_debug_toolbar
(
request
):
# We always want the toolbar on devstack unless running tests from another Docker container
# We always want the toolbar on devstack unless running tests from another Docker container
return
not
request
.
get_host
()
.
startswith
(
'edx.devstack.lms:'
)
if
request
.
get_host
()
.
startswith
(
'edx.devstack.lms:'
):
return
False
# Only display for non-ajax requests.
if
request
.
is_ajax
():
return
False
return
True
########################### PIPELINE #################################
########################### PIPELINE #################################
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment