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
05211d4f
Commit
05211d4f
authored
Mar 06, 2013
by
chrisndodge
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1607 from MITx/feature/christina/djdebug
Enable Django debug toolbar on Studio (including Mongo panel).
parents
12b6b7d4
de225e66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
3 deletions
+32
-3
cms/envs/dev.py
+32
-3
No files found.
cms/envs/dev.py
View file @
05211d4f
...
...
@@ -4,9 +4,6 @@ This config file runs the simplest dev environment"""
from
.common
import
*
from
logsettings
import
get_logger_config
import
logging
import
sys
DEBUG
=
True
TEMPLATE_DEBUG
=
DEBUG
LOGGING
=
get_logger_config
(
ENV_ROOT
/
"log"
,
...
...
@@ -107,3 +104,35 @@ CACHE_TIMEOUT = 0
# Dummy secret key for dev
SECRET_KEY
=
'85920908f28904ed733fe576320db18cabd7b6cd'
################################ DEBUG TOOLBAR #################################
INSTALLED_APPS
+=
(
'debug_toolbar'
,
'debug_toolbar_mongo'
)
MIDDLEWARE_CLASSES
+=
(
'django_comment_client.utils.QueryCountDebugMiddleware'
,
'debug_toolbar.middleware.DebugToolbarMiddleware'
,)
INTERNAL_IPS
=
(
'127.0.0.1'
,)
DEBUG_TOOLBAR_PANELS
=
(
'debug_toolbar.panels.version.VersionDebugPanel'
,
'debug_toolbar.panels.timer.TimerDebugPanel'
,
'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel'
,
'debug_toolbar.panels.headers.HeaderDebugPanel'
,
'debug_toolbar.panels.request_vars.RequestVarsDebugPanel'
,
'debug_toolbar.panels.sql.SQLDebugPanel'
,
'debug_toolbar.panels.signals.SignalDebugPanel'
,
'debug_toolbar.panels.logger.LoggingPanel'
,
'debug_toolbar_mongo.panel.MongoDebugPanel'
,
# Enabling the profiler has a weird bug as of django-debug-toolbar==0.9.4 and
# Django=1.3.1/1.4 where requests to views get duplicated (your method gets
# hit twice). So you can uncomment when you need to diagnose performance
# problems, but you shouldn't leave it on.
# 'debug_toolbar.panels.profiling.ProfilingDebugPanel',
)
DEBUG_TOOLBAR_CONFIG
=
{
'INTERCEPT_REDIRECTS'
:
False
}
# To see stacktraces for MongoDB queries, set this to True.
# Stacktraces slow down page loads drastically (for pages with lots of queries).
DEBUG_TOOLBAR_MONGO_STACKTRACES
=
False
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