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
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
3d08bfd2
Commit
3d08bfd2
authored
11 years ago
by
Dave St.Germain
Browse files
Options
Downloads
Patches
Plain Diff
Fixes devstack settings to work with new version of debug toolbar
parent
ab938c09
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cms/envs/devstack.py
+2
-1
2 additions, 1 deletion
cms/envs/devstack.py
common/lib/check_debug.py
+14
-0
14 additions, 0 deletions
common/lib/check_debug.py
lms/envs/devstack.py
+1
-1
1 addition, 1 deletion
lms/envs/devstack.py
with
17 additions
and
2 deletions
cms/envs/devstack.py
+
2
−
1
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.
...
...
This diff is collapsed.
Click to expand it.
common/lib/check_debug.py
0 → 100644
+
14
−
0
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
'
,
''
))
This diff is collapsed.
Click to expand it.
lms/envs/devstack.py
+
1
−
1
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 #################################
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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