Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-debug-toolbar-mongo
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
OpenEdx
django-debug-toolbar-mongo
Commits
b0686a76
Commit
b0686a76
authored
Jan 05, 2015
by
Colin Howe
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #20 from prymitive/patch-1
django-debug-toolbar==1.0 support
parents
13957ffa
5ff1f7a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
debug_toolbar_mongo/panel.py
+8
-9
No files found.
debug_toolbar_mongo/panel.py
View file @
b0686a76
...
...
@@ -21,6 +21,7 @@ class MongoDebugPanel(DebugPanel):
"""
name
=
'MongoDB'
has_content
=
True
template
=
'mongo-panel.html'
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
MongoDebugPanel
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
...
...
@@ -66,12 +67,10 @@ class MongoDebugPanel(DebugPanel):
def
url
(
self
):
return
''
def
content
(
self
):
context
=
self
.
context
.
copy
()
context
[
'queries'
]
=
operation_tracker
.
queries
context
[
'inserts'
]
=
operation_tracker
.
inserts
context
[
'updates'
]
=
operation_tracker
.
updates
context
[
'removes'
]
=
operation_tracker
.
removes
return
render_to_string
(
'mongo-panel.html'
,
context
)
def
process_response
(
self
,
request
,
response
):
self
.
record_stats
({
'queries'
:
operation_tracker
.
queries
,
'inserts'
:
operation_tracker
.
inserts
,
'updates'
:
operation_tracker
.
updates
,
'removes'
:
operation_tracker
.
removes
})
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