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
3d08bfd2
Commit
3d08bfd2
authored
Feb 18, 2014
by
Dave St.Germain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes devstack settings to work with new version of debug toolbar
parent
ab938c09
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
cms/envs/devstack.py
+2
-1
common/lib/check_debug.py
+14
-0
lms/envs/devstack.py
+1
-1
No files found.
cms/envs/devstack.py
View file @
3d08bfd2
...
...
@@ -54,7 +54,8 @@ DEBUG_TOOLBAR_PANELS = (
)
DEBUG_TOOLBAR_CONFIG
=
{
'INTERCEPT_REDIRECTS'
:
False
'INTERCEPT_REDIRECTS'
:
False
,
'SHOW_TOOLBAR_CALLBACK'
:
'check_debug.should_show_debug_toolbar'
,
}
# To see stacktraces for MongoDB queries, set this to True.
...
...
common/lib/check_debug.py
0 → 100644
View file @
3d08bfd2
"""
Function to check debug status.
"""
import
os
def
should_show_debug_toolbar
(
request
):
"""
Return True/False to determine whether to show the Django
Debug Toolbar.
If HIDE_TOOLBAR is set in the process environment, the
toolbar will be hidden.
"""
return
not
bool
(
os
.
getenv
(
'HIDE_TOOLBAR'
,
''
))
lms/envs/devstack.py
View file @
3d08bfd2
...
...
@@ -53,7 +53,7 @@ DEBUG_TOOLBAR_PANELS = (
DEBUG_TOOLBAR_CONFIG
=
{
'INTERCEPT_REDIRECTS'
:
False
,
'SHOW_TOOLBAR_CALLBACK'
:
lambda
_
:
True
,
'SHOW_TOOLBAR_CALLBACK'
:
'check_debug.should_show_debug_toolbar'
,
}
########################### 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