Skip to content
This repository

_quote_params fails when params is None. #298

Closed
wants to merge 10 commits into from

3 participants

David Niergarth Kyoungchan LEE David Cramer
David Niergarth
jdnier commented

The method NormalCursorWrapper._quote_params(params) in debug_toolbar/utils/tracking/db.py does not handle the case where params is None, resulting in the following exception:

<type 'exceptions.TypeError'>: argument 2 to map() must support iteration

In a few places in our Django apps, we execute manual queries a la

django.db.connection.cursor.execute(sql, params)

It has always been valid to pass None in for params. Unfortunately, _quote_params doesn't deal with this case. This is only a problem when debug toolbar is activated.

I have not tried using debug toolbar for a couple years, so I'm just noticing the problem. _quote_params was added 9 months ago here: d6a3b17

FWIW, my database connector is psycopg2. It's default value for params is None, so passing None thorough is reasonable behavior, I think.

>>> help(cursor.execute)       
Help on built-in function execute:

execute(...)
    execute(query, vars=None) -- Execute query with bound vars.
Kyoungchan LEE

I have a same problem. This patch is right.

David Niergarth

This is a very simple fix. Would you prefer a patch?

David Niergarth jdnier closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
12 README.rst
Source Rendered
@@ -229,6 +229,12 @@ adding proper coverage (especially if it has a chance for a regression) in the t
229 229 A list of 3rd party panels can be found on the Django Debug Toolbar Github wiki:
230 230 https://github.com/django-debug-toolbar/django-debug-toolbar/wiki/3rd-Party-Panels
231 231
232   -TODOs and BUGS
233   -==============
234   -See: https://github.com/django-debug-toolbar/django-debug-toolbar/issues
  232 +Resources
  233 +=========
  234 +
  235 +* `Bug Tracker <http://github.com/django-debug-toolbar/django-debug-toolbar/issues>`_
  236 +* `Code <http://github.com/django-debug-toolbar/django-debug-toolbar>`_
  237 +* `Transifex <https://www.transifex.net/projects/p/django-debug-toolbar/>`_ (Help Translate!)
  238 +
  239 +The `in-development version <http://github.com/django-debug-toolbar/django-debug-toolbar/tarball/master#egg=django-debug-toolbar-dev>`_
  240 +of the Debug Toolbar can be installed with ``pip install django-debug-toolbar==dev`` or ``easy_install django-debug-toolbar==dev``.
4 debug_toolbar/panels/sql.py
@@ -77,9 +77,11 @@ def __init__(self, *args, **kwargs):
77 77 self._transaction_ids = {}
78 78
79 79 def get_transaction_id(self, alias):
  80 + if alias not in connections:
  81 + return
80 82 conn = connections[alias].connection
81 83 if not conn:
82   - return None
  84 + return
83 85
84 86 engine = conn.__class__.__module__.split('.', 1)[0]
85 87 if engine == 'psycopg2':
52 debug_toolbar/static/debug_toolbar/css/toolbar.css
@@ -22,9 +22,12 @@
22 22 #djDebug b, #djDebug u, #djDebug i, #djDebug center,
23 23 #djDebug dl, #djDebug dt, #djDebug dd, #djDebug ol, #djDebug ul, #djDebug li,
24 24 #djDebug fieldset, #djDebug form, #djDebug label, #djDebug legend,
25   -#djDebug table, #djDebug caption, #djDebug tbody, #djDebug tfoot, #djDebug thead, #djDebug tr, #djDebug th, #djDebug td {
  25 +#djDebug table, #djDebug caption, #djDebug tbody, #djDebug tfoot, #djDebug thead, #djDebug tr, #djDebug th, #djDebug td,
  26 +#djDebug button {
26 27 margin:0;
27 28 padding:0;
  29 + min-width:0;
  30 + width:auto;
28 31 border:0;
29 32 outline:0;
30 33 font-size:12px;
@@ -35,6 +38,52 @@
35 38 font-family:sans-serif;
36 39 text-align:left;
37 40 text-shadow: none;
  41 + -webkit-transition: none;
  42 + -moz-transition: none;
  43 + -o-transition: none;
  44 + transition: none;
  45 +}
  46 +
  47 +#djDebug button {
  48 + background-color: #eee;
  49 + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee), color-stop(100%, #cccccc));
  50 + background-image: -webkit-linear-gradient(top, #eee, #cccccc);
  51 + background-image: -moz-linear-gradient(top, #eee, #cccccc);
  52 + background-image: -ms-linear-gradient(top, #eee, #cccccc);
  53 + background-image: -o-linear-gradient(top, #eee, #cccccc);
  54 + background-image: linear-gradient(top, #eee, #cccccc);
  55 + border: 1px solid #ccc;
  56 + border-bottom: 1px solid #bbb;
  57 + -webkit-border-radius: 3px;
  58 + -moz-border-radius: 3px;
  59 + border-radius: 3px;
  60 + color: #333;
  61 + line-height: 1;
  62 + padding: 0 8px;
  63 + text-align: center;
  64 + text-shadow: 0 1px 0 #eee;
  65 +}
  66 +
  67 +#djDebug button:hover {
  68 + background-color: #ddd;
  69 + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ddd), color-stop(100%, #bbb));
  70 + background-image: -webkit-linear-gradient(top, #ddd, #bbb);
  71 + background-image: -moz-linear-gradient(top, #ddd, #bbb);
  72 + background-image: -ms-linear-gradient(top, #ddd, #bbb);
  73 + background-image: -o-linear-gradient(top, #ddd, #bbb);
  74 + background-image: linear-gradient(top, #ddd, #bbb);
  75 + border-color: #bbb;
  76 + border-bottom-color: #999;
  77 + cursor: pointer;
  78 + text-shadow: 0 1px 0 #ddd;
  79 +}
  80 +
  81 +#djDebug button:active {
  82 + border: 1px solid #aaa;
  83 + border-bottom: 1px solid #888;
  84 + -webkit-box-shadow: inset 0 0 5px 2px #aaa, 0 1px 0 0 #eee;
  85 + -moz-box-shadow: inset 0 0 5px 2px #aaa, 0 1px 0 0 #eee;
  86 + box-shadow: inset 0 0 5px 2px #aaa, 0 1px 0 0 #eee;
38 87 }
39 88
40 89 #djDebug #djDebugToolbar {
@@ -485,6 +534,7 @@
485 534
486 535 #djDebug .panelContent ul.stats {
487 536 position: relative;
  537 + list-style-type: none;
488 538 }
489 539 #djDebug .panelContent ul.stats li {
490 540 width: 30%;
2  debug_toolbar/static/debug_toolbar/css/toolbar.min.css
... ... @@ -1 +1 @@
1   -#djDebug .clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}#djDebug .clearfix{display:inline-block}/*\*/#djDebug .clearfix{display:block}* html #djDebug .clearfix{height:1%}/**/#djDebug{color:#000;background:#FFF}#djDebug,#djDebug div,#djDebug span,#djDebug applet,#djDebug object,#djDebug iframe,#djDebug h1,#djDebug h2,#djDebug h3,#djDebug h4,#djDebug h5,#djDebug h6,#djDebug p,#djDebug blockquote,#djDebug pre,#djDebug a,#djDebug abbr,#djDebug acronym,#djDebug address,#djDebug big,#djDebug cite,#djDebug code,#djDebug del,#djDebug dfn,#djDebug em,#djDebug font,#djDebug img,#djDebug ins,#djDebug kbd,#djDebug q,#djDebug s,#djDebug samp,#djDebug small,#djDebug strike,#djDebug strong,#djDebug sub,#djDebug sup,#djDebug tt,#djDebug var,#djDebug b,#djDebug u,#djDebug i,#djDebug center,#djDebug dl,#djDebug dt,#djDebug dd,#djDebug ol,#djDebug ul,#djDebug li,#djDebug fieldset,#djDebug form,#djDebug label,#djDebug legend,#djDebug table,#djDebug caption,#djDebug tbody,#djDebug tfoot,#djDebug thead,#djDebug tr,#djDebug th,#djDebug td{margin:0;padding:0;border:0;outline:0;font-size:12px;line-height:1.5em;color:#000;vertical-align:baseline;background-color:transparent;font-family:sans-serif;text-align:left;text-shadow:0}#djDebug #djDebugToolbar{background-color:#111;width:200px;z-index:100000000;position:fixed;top:0;bottom:0;right:0;opacity:.9}#djDebug #djDebugToolbar small{color:#999}#djDebug #djDebugToolbar ul{margin:0;padding:0;list-style:none}#djDebug #djDebugToolbar li{border-bottom:1px solid #222;color:#fff;display:block;font-weight:bold;float:none;margin:0;padding:0;position:relative;width:auto}#djDebug #djDebugToolbar li>a,#djDebug #djDebugToolbar li>div.contentless{font-weight:normal;font-style:normal;text-decoration:none;display:block;font-size:16px;padding:10px 10px 5px 25px;color:#fff}#djDebug #djDebugToolbar li a:hover{color:#111;background-color:#ffc}#djDebug #djDebugToolbar li.active{background:#333 no-repeat left center;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAgFJREFUeNqUlE1LAmEQx11fesNeDLt08hZ4KcgvIF7EgxcR9CT4IQwErx47WhFBdvPgwUNQeOiogiLRQSQUQaKD6Vpba7ar20izMe4+bjTwY5/Zl//OMzPPcCaTaRUwAxbTjynAdAHq84XGARuADQXN+MGEIJG1QmCaOZVK7WKUdmCdYMf7K/hDKwagwjRLPp9/cLvdzUKh8Ab+GgosExGz5hvFSJAbDAYKmFSpVM4DgUABX57l6wsYAR/AO64/MQUyyauiE1SdTqdTC4fDZ61W6x0FRUAAXvEqElGJCP5qzG3H5XIdFovFdCgUOgB3B3AC28AmyekSKSDH3LL2piRJcjabvU4kEnfg8sAL0Me1GulYE+ViQdWq1ep9NBrN9vv9J3B7KPyKOf3EtNAe1VVwzjwez36pVDoKBoMu3KpNs13dlg0FZ+ZwOJx+v3+PHATO6H2r0UOe54fJZPIil8vVSLtMjE7LQsFGo/EYiUSuut3uM/aimjPJSFQnCE0+hVNzE4/Hb1FoyOjBCasHdYKiKPLpdPo0k8k0GY1NKyvTyjIFe71eLRaLHZfLZYFx9AS8jhgR6gXb7faJ1+u9FATBglWU8cMxRjki0RmOMmu9Xo/4fL4y9pmVzEMZBcakGPJfw3YWzRY2rA19dWLLBMNCaAXXNHNPIVFO/zOtZ/YtwADKQgq0l7HbRAAAAABJRU5ErkJggg==");padding-left:10px}#djDebug #djDebugToolbar li.active a:hover{color:#b36a60;background-color:transparent}#djDebug #djDebugToolbar li small{font-size:12px;color:#999;font-style:normal;text-decoration:none;font-variant:small-caps}#djDebug #djDebugToolbarHandle{position:fixed;background-color:#fff;border:1px solid #111;top:30px;right:0;z-index:100000000;opacity:.75}#djDebug a#djShowToolBarButton{display:block;height:75px;width:30px;border-right:0;border-bottom:4px solid #fff;border-top:4px solid #fff;border-left:4px solid #fff;color:#fff;font-size:10px;font-weight:bold;text-decoration:none;text-align:center;text-indent:-999999px;background:#000 no-repeat left center;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAABLCAYAAAACnsWZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAATCSURBVGiB7ZlvSBtnHMe/sckZY5aMw06r7aTLjGOwTKOMEWYs7M2EaaUdjG6+GDoQ9mI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WCDVJgO4R7tx9gauwO5iZXiIAUA+r05fhi9D28/pZVluH9+XV8ctmBoJ98qQVIAGooNUZmr+KlV59TZMpsBHCl6Ss8Cu+T8uV+iz/4+qJiOOAg3Xz47eW8oQ5LtAcNdCWmtr55IlX8Oe3BX4sb2PTuIJ1Ko95cjResz6Kt0yKIy0Q8hY66awgFHxEBiqaZC91NArhYZB+fvu3E/M2/s9a32Ey4/ks/qs4c7OSocjUudDfhtx9cRICiQ9zc9rzgfPjzSVE44ODlGLr2q+BaPuFxVKKA9eZqwfnvP85Lmt362Q2WzURMfWN1jtryJApooCv5cmA7hGhI+j+PVDKNAPOQP9cbKwjxcsSghsrcKq/Q4FK/XZYhpdVk2h0q5ytRwFg0k8OeelqHzxzvKjbPtgRTKtEhjkXIzQuaqIM75FNV0C/9wUlKokPscW8SLzhXl/8hag+UNu7kKgGSqgRIqhIgqUqApCp6wH8B9cAOKo9Os8wAAAAASUVORK5CYII=");opacity:.5}#djDebug a#djShowToolBarButton:hover{background-color:#111;padding-right:6px;border-top-color:#ffe761;border-left-color:#ffe761;border-bottom-color:#ffe761;opacity:1.0}#djDebug code{display:block;font-family:Consolas,Monaco,"Bitstream Vera Sans Mono","Lucida Console",monospace;white-space:pre;overflow:auto}#djDebug tr.djDebugOdd{background-color:#f5f5f5}#djDebug .panelContent{display:none;position:fixed;margin:0;top:0;right:200px;bottom:0;left:0;background-color:#eee;color:#666;z-index:100000000}#djDebug .panelContent>div{border-bottom:1px solid #ddd}#djDebug .djDebugPanelTitle{position:absolute;background-color:#ffc;color:#666;padding-left:20px;top:0;right:0;left:0;height:50px}#djDebug .djDebugPanelTitle code{display:inline;font-size:inherit}#djDebug .djDebugPanelContent{position:absolute;top:50px;right:0;bottom:0;left:0;height:auto;padding:5px 0 0 20px}#djDebug .djDebugPanelContent .scroll{height:100%;overflow:auto;display:block;padding:0 10px 0 0}#djDebug h3{font-size:24px;font-weight:normal;line-height:50px}#djDebug h4{font-size:20px;font-weight:bold;margin-top:.8em}#djDebug .panelContent table{border:1px solid #ccc;border-collapse:collapse;width:100%;background-color:#fff;display:block;margin-top:.8em;overflow:auto}#djDebug .panelContent tbody td,#djDebug .panelContent tbody th{vertical-align:top;padding:2px 3px}#djDebug .panelContent tbody td.time{text-align:center}#djDebug .panelContent thead th{padding:1px 6px 1px 3px;text-align:left;font-weight:bold;font-size:14px;white-space:nowrap}#djDebug .panelContent tbody th{width:12em;text-align:right;color:#666;padding-right:.5em}#djDebug .djTemplateHideContextDiv{background-color:#fff}#djDebug .panelContent .djDebugClose{text-indent:-9999999px;display:block;position:absolute;top:4px;right:15px;height:40px;width:40px;background:no-repeat center center;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA7dJREFUeNqsWM1PE0EU3+7ShdJKoTRA8UYgIUKM3rmaEI0euXsw0YMHIZEbxBijEiIHLkb/A44SDYlXzkYPGBM+ri1NWz7aUmhp6+9tps10mLfdfrzkl2535r39zc77mvUdHh4abUoUCAD3xP/fQAFItWJkYmLC+e1p8eGPgQcC08ycf8BPgW2vhr0SeQa8AWIe5k4LvATiwCrwtZmS2WT8IfAL+OKRhCoxoftH2GqLyBLwHbhvdC53ha2lVrfmE/DKzbLP5yubplnt7e310f+rq6tqpVLxVatVy0VtHbgNLHohsupGIhQKFQG7v79f+8CLiwsjl8sVAZsxQbYTwFrDwpTwpaj4ptPu6+vLDw4OBkHA014QobOzs3yhUAgyUx4BP2rhq/rIe53GwMBAeXx83DMJEpobi8WCpMtMWeOc9TkwoyMRjUattrMedBkyM+KZN4isqDMDgUCuExIyGbKlGVpRiSzo8kQ4HA4ZXRLGVuzo6GhBJjKviw6dT5TLZSOTyRinp6cGQrV+n67hnEY6nTaur6+1PkM2NWTm5fCd0xDRhh89CKHpXCMijLGxMef6+PjYiRSSUqlUv6/arOlKMlcjQlV0qsGDTZPehpYIxurXRC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PoQBxEDCYgYJD6Oib7MqC0DLiOyKFPVU9TD2J8lqinY3Oo75R9lhC/oQbRhxoSIDZ63UGK9Xg/1ETsnwADAJrrTk7nZiozAAAAAElFTkSuQmCC")}#djDebug .panelContent .djDebugClose.djDebugBack{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA7FJREFUeNrMWM1PE0EU3+7S7bZdKSFNSIFgJJAgINE7VxOi0SP/gYkePAiJ3CDGGJUQOXAx+h9wlGhIvHI2fgQ08mEkkjZNIZR2+7Httr63zMoyOzPdthx8yS+bnZn3m9/OvDcfG9jd3ZVatDggDLhO3j8DioBMMySDg4P2s6PJzu8AbhKMcNr8AHwkWPNL7FfIPcATQMJH2xGCh4AkYAHwtpGT3KD+FuAT4I1PEbQliO8XwtWSkFnAe8ANqX2bIFyzzU7NK8AjEXMgELBkWa6HQqEAvpfL5XqtVgvU63VF4LYE6APM+BGyIBKh67oJUCORCLPDQqEg5fN5E6ByKJA7BVg892FU+mJWvGN5a5pmdHV1RUGAr7lAQdls1igWi1FOk9uAD0760jHynOXR2dlp9fb2+haBhm0TiUQUfTlNFnnBeh8wxhIRj8eVllc98OWIGSN9eoTM0y3D4XC+HRFuMcjFqJqnhUyz1olYLKa730uVCrMjXrmIy1ln9vb2pt1CpljZQcdE1ihIW/sHHrayWbHLq1ZNGDPIyaiacguZZAhhph+K+fpr39Ppqcg/wtHhcE46QnAXHT4XwbJssjJECwbtp1EqS99AjNNpSD0r//77wH7yRgW5qeJhmJ44ChmiHYLBIHOMY9GINDrQ9y8uHDEoEMs7FNl+x5HhieFwD6GQbs8GJMtBbtCBmIkrA3anOD0YH2ci+21RWJ4vldibG5u7W5b+E8O95oguhM0LP1PhBauTOfj1Tnxg+c+DpD0aOFq6pjE75HAfoZAdunGlUpH9iLh6uc9+nsaFt5xlHO4dmZwxtynVKm5avIUrqoWkaxAnTmdOnGC5SARyIjdVvA0bX8ZRt0E7GYZhNgpWb0b1c0UIODfcC9o6XZvL5VTYwrnp6zaMEyd9eYZcyMmoWncLWQUcemIim82xFjTeQiey4+Nj1qZ3CNOySu++zxhzeimTyVjtpiZywIiwNr0XrGPAMh20aCcnJ0o7YtAXOTj3nyXeKZ55ykaiZDKZZ2WS6KiIPhwRaI9F1wm8mT3lBJueSqWkdDptigRhHbbBtpzpQJujb4EdnFOTzjvJ4+kcYF8nFEWpqapqf4xpmjXLsmRynVAFg7VMn1dF95oZcuR/yWPDDqvVKsIp8nOknGOJaHTTQ4e7gM0L2NM2Cddiq3dfnMdxwANAugUBaeI73ujPgN9jwGtAD/mqFZJ6kuC3xApp20N8L+y3hHuE1lw/amKAUfK+hYtxsz9qHPsrwACHs5P9Qys/0AAAAABJRU5ErkJggg==")}#djDebug .panelContent .djDebugClose.djDebugBack:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA6hJREFUeNrMWF1Ik1EYPtt0pkuGa/aDJTY3nNvSfkglvEwQpa7CbrosKAghBedNikKgEgVe1m03SVeJXmSXBmIozpxpuiUS/eicSc75m73vx/nGt7Nzvm8/BR14+Pjec85znp297znv++kCgQBJs1kBuYDz9H0KEAWEUiGx2WzSMyvFxa8B6iicgjFzgBGKwWSJdUnuyB1AF+BUisK/AToBz7V2RK9B1ACYBDxLQwShc3Cuj3IJm5qQVsAQ4ALJvFVQrlbRAJGPPAE8UKU+2Ce/d6Jk98d36dV44iTR54DvGlTd7jGgCNCSjJBONRHR+Q8kMjtDooF5bn9uaRkxuTwkt+yciAK5UX2fmrNiVLzmzd77ukR+jr0j28GFpP6LIzYHMVdfIcais6IhjYBh2VlZITMANzsj4ntPwiNDaTmHpa6RmCov87r8AA8vau7yRGxOjactAhvOjUxP8LrcdM0EIR3syN0vAbL+djjjkAm/GZS4OK2DFdLEOyc2xsfi/3frcb4/COxqXPI5EwwGm5RC6nnRwTpmgdNNKpq9iZFiLZTsWXkmoRDkQk5Oq1cKqU3wDf80lxDFXGzvTlhUFqm2OwLOWlkI3qIOZc/h3s4hL0y3QyvSM7+4hFxq74otGg2txuyVzW3SU7QryM2YHfD3WFGIPeHQ3AjreETrc34y3d8b8wtZDApE+/5WRHrHnRGJEXDbUYiFte5HIsLtRTGTPR3Sovj3oH8oRaIotB8t5h9kAm6LnvwnDe+acILRJPZ+ZeTgr5f9A+2u2/el3cDd2lz+zF+Qzx1GIYus1WC2oEPptET4+vukp+wXrJ3XBNyLeppjxoWILjtHh5eW6OD6tbxEJno6Y4vJfoJ2NRHIidyMeQHum5DsI6PsJJPTremsvIgSiVDhHFXevnjMvmRHrL56QbaXFuN2hLeQyB43psROCm/c4nXdhB0ZkHdkALDGjjBXVXMPNNFBp9bM1TU88xqKYG/fR+woY7GDFFxtyDg0MScxnrHzunpEGdon9rj/h4kR1j/logKrlZcqIlH2MYt0laeUKlbVEOPpUtGQNq0CqxvwUDR766OPbM3NqibPeU4XySuvVNPplZNnUc6aUjlxACG8Rx01GyLHgKmBQbOKfaosJ7Rq3xaa8vcK6WBBQ75ZQgrNy5YRyVR6OOE6zbYzbX7K1ZdOyUloNe8B3AOspCFghc71aH0Z0KX4feSvf5bQctZkP9Sgg7jo+ywm6+l+qPkjwADNS26fFM/O1QAAAABJRU5ErkJggg==")}#djDebug .panelContent dt,#djDebug .panelContent dd{display:block}#djDebug .panelContent dt{margin-top:.75em}#djDebug .panelContent dd{margin-left:10px}#djDebug a.toggleTemplate{padding:4px;background-color:#bbb;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}#djDebug a.toggleTemplate:hover{padding:4px;background-color:#444;color:#ffe761;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}#djDebug a.djTemplateShowContext,#djDebug a.djTemplateShowContext span.toggleArrow{color:#999}#djDebug a.djTemplateShowContext:hover,#djDebug a.djTemplateShowContext:hover span.toggleArrow{color:#000;cursor:pointer}#djDebug .djDebugSqlWrap{position:relative}#djDebug .djDebugCollapsed{display:none;text-decoration:none;color:#333}#djDebug .djDebugUncollapsed{color:#333;text-decoration:none}#djDebug .djUnselected{display:none}#djDebug tr.djHiddenByDefault{display:none}#djDebug tr.djSelected{display:table-row}#djDebug .djDebugSql{z-index:100000002}#djDebug .djSQLDetailsDiv tbody th{text-align:left}#djDebug .djSqlExplain td{white-space:pre}#djDebug span.djDebugLineChart{background-color:#777;height:3px;position:absolute;bottom:0;top:0;left:0;display:block;z-index:1000000001}#djDebug span.djDebugLineChartWarning{background-color:#900}#djDebug .highlight{color:#000}#djDebug .highlight .err{color:#000}#djDebug .highlight .g{color:#000}#djDebug .highlight .k{color:#000;font-weight:bold}#djDebug .highlight .o{color:#000}#djDebug .highlight .n{color:#000}#djDebug .highlight .mi{color:#000;font-weight:bold}#djDebug .highlight .l{color:#000}#djDebug .highlight .x{color:#000}#djDebug .highlight .p{color:#000}#djDebug .highlight .m{color:#000;font-weight:bold}#djDebug .highlight .s{color:#333}#djDebug .highlight .w{color:#888}#djDebug .highlight .il{color:#000;font-weight:bold}#djDebug .highlight .na{color:#333}#djDebug .highlight .nt{color:#000;font-weight:bold}#djDebug .highlight .nv{color:#333}#djDebug .highlight .s2{color:#333}#djDebug .highlight .cp{color:#333}#djDebug .timeline{width:30%}#djDebug .djDebugTimeline{position:relative;height:100%;min-height:100%}#djDebug div.djDebugLineChart{position:absolute;left:0;right:0;top:0;bottom:0;vertical-align:middle}#djDebug div.djDebugLineChart strong{text-indent:-10000em;display:block;font-weight:normal;vertical-align:middle;background-color:#ccc}#djDebug div.djDebugLineChartWarning strong{background-color:#900}#djDebug .djDebugInTransaction div.djDebugLineChart strong{background-color:#d3ff82}#djDebug .djDebugStartTransaction div.djDebugLineChart strong{border-left:1px solid #94b24d}#djDebug .djDebugEndTransaction div.djDebugLineChart strong{border-right:1px solid #94b24d}#djDebug .djDebugHover div.djDebugLineChart strong{background-color:#000}#djDebug .djDebugInTransaction.djDebugHover div.djDebugLineChart strong{background-color:#94b24d}#djDebug .panelContent ul.stats{position:relative}#djDebug .panelContent ul.stats li{width:30%;float:left}#djDebug .panelContent ul.stats li strong.label{display:block}#djDebug .panelContent ul.stats li span.color{height:12px;width:3px;display:inline-block}#djDebug .panelContent ul.stats li span.info{display:block;padding-left:5px}#djDebug .panelcontent thead th{white-space:nowrap}#djDebug .djDebugRowWarning .time{color:red}#djdebug .panelcontent table .toggle{width:14px;padding-top:3px}#djDebug .panelContent table .actions{min-width:70px;white-space:nowrap}#djdebug .panelcontent table .color{width:3px}#djdebug .panelcontent table .color span{width:3px;height:12px;overflow:hidden;padding:0}#djDebug .djToggleSwitch{text-decoration:none;border:1px solid #999;height:12px;width:12px;line-height:12px;text-align:center;color:#777;display:inline-block;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF',endColorstr='#DCDCDC');background:-webkit-gradient(linear,left top,left bottom,from(#FFF),to(#dcdcdc));background:-moz-linear-gradient(center top,#fff 0,#dcdcdc 100%) repeat scroll 0 0 transparent}#djDebug .djNoToggleSwitch{height:14px;width:14px;display:inline-block}#djDebug .djSQLDetailsDiv{margin-top:.8em}#djDebug pre{white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;color:#555;border:1px solid #ccc;border-collapse:collapse;background-color:#fff;display:block;overflow:auto;padding:2px 3px;margin-bottom:3px;font-family:Consolas,Monaco,"Bitstream Vera Sans Mono","Lucida Console",monospace}#djDebug .stack span{color:#000;font-weight:bold}#djDebug .stack span.path{color:#777;font-weight:normal}#djDebug .stack span.code{font-weight:normal}@media print{#djDebug{display:none}}
  1 +#djDebug .clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}#djDebug .clearfix{display:inline-block}/*\*/#djDebug .clearfix{display:block}* html #djDebug .clearfix{height:1%}/**/#djDebug{color:#000;background:#FFF}#djDebug,#djDebug div,#djDebug span,#djDebug applet,#djDebug object,#djDebug iframe,#djDebug h1,#djDebug h2,#djDebug h3,#djDebug h4,#djDebug h5,#djDebug h6,#djDebug p,#djDebug blockquote,#djDebug pre,#djDebug a,#djDebug abbr,#djDebug acronym,#djDebug address,#djDebug big,#djDebug cite,#djDebug code,#djDebug del,#djDebug dfn,#djDebug em,#djDebug font,#djDebug img,#djDebug ins,#djDebug kbd,#djDebug q,#djDebug s,#djDebug samp,#djDebug small,#djDebug strike,#djDebug strong,#djDebug sub,#djDebug sup,#djDebug tt,#djDebug var,#djDebug b,#djDebug u,#djDebug i,#djDebug center,#djDebug dl,#djDebug dt,#djDebug dd,#djDebug ol,#djDebug ul,#djDebug li,#djDebug fieldset,#djDebug form,#djDebug label,#djDebug legend,#djDebug table,#djDebug caption,#djDebug tbody,#djDebug tfoot,#djDebug thead,#djDebug tr,#djDebug th,#djDebug td,#djDebug button{margin:0;padding:0;min-width:0;width:auto;border:0;outline:0;font-size:12px;line-height:1.5em;color:#000;vertical-align:baseline;background-color:transparent;font-family:sans-serif;text-align:left;text-shadow:none;-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}#djDebug button{background-color:#eee;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#eee),color-stop(100%,#ccc));background-image:-webkit-linear-gradient(top,#eee,#ccc);background-image:-moz-linear-gradient(top,#eee,#ccc);background-image:-ms-linear-gradient(top,#eee,#ccc);background-image:-o-linear-gradient(top,#eee,#ccc);background-image:linear-gradient(top,#eee,#ccc);border:1px solid #ccc;border-bottom:1px solid #bbb;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;color:#333;line-height:1;padding:0 8px;text-align:center;text-shadow:0 1px 0 #eee}#djDebug button:hover{background-color:#ddd;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ddd),color-stop(100%,#bbb));background-image:-webkit-linear-gradient(top,#ddd,#bbb);background-image:-moz-linear-gradient(top,#ddd,#bbb);background-image:-ms-linear-gradient(top,#ddd,#bbb);background-image:-o-linear-gradient(top,#ddd,#bbb);background-image:linear-gradient(top,#ddd,#bbb);border-color:#bbb;border-bottom-color:#999;cursor:pointer;text-shadow:0 1px 0 #ddd}#djDebug button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-moz-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee}#djDebug #djDebugToolbar{background-color:#111;width:200px;z-index:100000000;position:fixed;top:0;bottom:0;right:0;opacity:.9}#djDebug #djDebugToolbar small{color:#999}#djDebug #djDebugToolbar ul{margin:0;padding:0;list-style:none}#djDebug #djDebugToolbar li{border-bottom:1px solid #222;color:#fff;display:block;font-weight:bold;float:none;margin:0;padding:0;position:relative;width:auto}#djDebug #djDebugToolbar li>a,#djDebug #djDebugToolbar li>div.contentless{font-weight:normal;font-style:normal;text-decoration:none;display:block;font-size:16px;padding:10px 10px 5px 25px;color:#fff}#djDebug #djDebugToolbar li a:hover{color:#111;background-color:#ffc}#djDebug #djDebugToolbar li.active{background:#333 no-repeat left center;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAgFJREFUeNqUlE1LAmEQx11fesNeDLt08hZ4KcgvIF7EgxcR9CT4IQwErx47WhFBdvPgwUNQeOiogiLRQSQUQaKD6Vpba7ar20izMe4+bjTwY5/Zl//OMzPPcCaTaRUwAxbTjynAdAHq84XGARuADQXN+MGEIJG1QmCaOZVK7WKUdmCdYMf7K/hDKwagwjRLPp9/cLvdzUKh8Ab+GgosExGz5hvFSJAbDAYKmFSpVM4DgUABX57l6wsYAR/AO64/MQUyyauiE1SdTqdTC4fDZ61W6x0FRUAAXvEqElGJCP5qzG3H5XIdFovFdCgUOgB3B3AC28AmyekSKSDH3LL2piRJcjabvU4kEnfg8sAL0Me1GulYE+ViQdWq1ep9NBrN9vv9J3B7KPyKOf3EtNAe1VVwzjwez36pVDoKBoMu3KpNs13dlg0FZ+ZwOJx+v3+PHATO6H2r0UOe54fJZPIil8vVSLtMjE7LQsFGo/EYiUSuut3uM/aimjPJSFQnCE0+hVNzE4/Hb1FoyOjBCasHdYKiKPLpdPo0k8k0GY1NKyvTyjIFe71eLRaLHZfLZYFx9AS8jhgR6gXb7faJ1+u9FATBglWU8cMxRjki0RmOMmu9Xo/4fL4y9pmVzEMZBcakGPJfw3YWzRY2rA19dWLLBMNCaAXXNHNPIVFO/zOtZ/YtwADKQgq0l7HbRAAAAABJRU5ErkJggg==");padding-left:10px}#djDebug #djDebugToolbar li.active a:hover{color:#b36a60;background-color:transparent}#djDebug #djDebugToolbar li small{font-size:12px;color:#999;font-style:normal;text-decoration:none;font-variant:small-caps}#djDebug #djDebugToolbarHandle{position:fixed;background-color:#fff;border:1px solid #111;top:30px;right:0;z-index:100000000;opacity:.75}#djDebug a#djShowToolBarButton{display:block;height:75px;width:30px;border-right:0;border-bottom:4px solid #fff;border-top:4px solid #fff;border-left:4px solid #fff;color:#fff;font-size:10px;font-weight:bold;text-decoration:none;text-align:center;text-indent:-999999px;background:#000 no-repeat left center;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAABLCAYAAAACnsWZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAATCSURBVGiB7ZlvSBtnHMe/sckZY5aMw06r7aTLjGOwTKOMEWYs7M2EaaUdjG6+GDoQ9mIyupUxGIONwVZfDHwxg2E4igym24s5sFB0oDRq1yi1G0RijTjhjJBI86fR/LvbC+nFs7ncXR7jMsgXDp67e57vffI8v/s9z3NRAeBQxCr7rwGkVAIkVQmQVCVAUpUASVX0gGqxGxaLBTabDVqt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8Oe3BX4sb2PTuIJ1Ko95cjResz6Kt0yKIy0Q8hY66awgFHxEBiqaZC91NArhYZB+fvu3E/M2/s9a32Ey4/ks/qs4c7OSocjUudDfhtx9cRICiQ9zc9rzgfPjzSVE44ODlGLr2q+BaPuFxVKKA9eZqwfnvP85Lmt362Q2WzURMfWN1jtryJApooCv5cmA7hGhI+j+PVDKNAPOQP9cbKwjxcsSghsrcKq/Q4FK/XZYhpdVk2h0q5ytRwFg0k8OeelqHzxzvKjbPtgRTKtEhjkXIzQuaqIM75FNV0C/9wUlKokPscW8SLzhXl/8hag+UNu7kKgGSqgRIqhIgqUqApCp6wH8B9cAOKo9Os8wAAAAASUVORK5CYII=");opacity:.5}#djDebug a#djShowToolBarButton:hover{background-color:#111;padding-right:6px;border-top-color:#ffe761;border-left-color:#ffe761;border-bottom-color:#ffe761;opacity:1.0}#djDebug code{display:block;font-family:Consolas,Monaco,"Bitstream Vera Sans Mono","Lucida Console",monospace;white-space:pre;overflow:auto}#djDebug tr.djDebugOdd{background-color:#f5f5f5}#djDebug .panelContent{display:none;position:fixed;margin:0;top:0;right:200px;bottom:0;left:0;background-color:#eee;color:#666;z-index:100000000}#djDebug .panelContent>div{border-bottom:1px solid #ddd}#djDebug .djDebugPanelTitle{position:absolute;background-color:#ffc;color:#666;padding-left:20px;top:0;right:0;left:0;height:50px}#djDebug .djDebugPanelTitle code{display:inline;font-size:inherit}#djDebug .djDebugPanelContent{position:absolute;top:50px;right:0;bottom:0;left:0;height:auto;padding:5px 0 0 20px}#djDebug .djDebugPanelContent .scroll{height:100%;overflow:auto;display:block;padding:0 10px 0 0}#djDebug h3{font-size:24px;font-weight:normal;line-height:50px}#djDebug h4{font-size:20px;font-weight:bold;margin-top:.8em}#djDebug .panelContent table{border:1px solid #ccc;border-collapse:collapse;width:100%;background-color:#fff;display:block;margin-top:.8em;overflow:auto}#djDebug .panelContent tbody td,#djDebug .panelContent tbody th{vertical-align:top;padding:2px 3px}#djDebug .panelContent tbody td.time{text-align:center}#djDebug .panelContent thead th{padding:1px 6px 1px 3px;text-align:left;font-weight:bold;font-size:14px;white-space:nowrap}#djDebug .panelContent tbody th{width:12em;text-align:right;color:#666;padding-right:.5em}#djDebug .djTemplateHideContextDiv{background-color:#fff}#djDebug .panelContent .djDebugClose{text-indent:-9999999px;display:block;position:absolute;top:4px;right:15px;height:40px;width:40px;background:no-repeat center center;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA7dJREFUeNqsWM1PE0EU3+7ShdJKoTRA8UYgIUKM3rmaEI0euXsw0YMHIZEbxBijEiIHLkb/A44SDYlXzkYPGBM+ri1NWz7aUmhp6+9tps10mLfdfrzkl2535r39zc77mvUdHh4abUoUCAD3xP/fQAFItWJkYmLC+e1p8eGPgQcC08ycf8BPgW2vhr0SeQa8AWIe5k4LvATiwCrwtZmS2WT8IfAL+OKRhCoxoftH2GqLyBLwHbhvdC53ha2lVrfmE/DKzbLP5yubplnt7e310f+rq6tqpVLxVatVy0VtHbgNLHohsupGIhQKFQG7v79f+8CLiwsjl8sVAZsxQbYTwFrDwpTwpaj4ptPu6+vLDw4OBkHA014QobOzs3yhUAgyUx4BP2rhq/rIe53GwMBAeXx83DMJEpobi8WCpMtMWeOc9TkwoyMRjUattrMedBkyM+KZN4isqDMDgUCuExIyGbKlGVpRiSzo8kQ4HA4ZXRLGVuzo6GhBJjKviw6dT5TLZSOTyRinp6cGQrV+n67hnEY6nTaur6+1PkM2NWTm5fCd0xDRhh89CKHpXCMijLGxMef6+PjYiRSSUqlUv6/arOlKMlcjQlV0qsGDTZPehpYIxurXRCSRSFByq5NQ56hvhWwj8cm2p7A9UdKYVBX8fn+F2+tIJGIgmzaQkUnYtm0MDw+zvsLYniQiEc2q/WxxwmqRHxrISA9xxiyLDzTGdsRsJwJoK3QPo3vctnhpAzLqTexhiVOg6JAdU5bL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jtpiZywIiwNr0XrGPAMh20aCcnJ0o7YtAXOTj3nyXeKZ55ykaiZDKZZ2WS6KiIPhwRaI9F1wm8mT3lBJueSqWkdDptigRhHbbBtpzpQJujb4EdnFOTzjvJ4+kcYF8nFEWpqapqf4xpmjXLsmRynVAFg7VMn1dF95oZcuR/yWPDDqvVKsIp8nOknGOJaHTTQ4e7gM0L2NM2Cddiq3dfnMdxwANAugUBaeI73ujPgN9jwGtAD/mqFZJ6kuC3xApp20N8L+y3hHuE1lw/amKAUfK+hYtxsz9qHPsrwACHs5P9Qys/0AAAAABJRU5ErkJggg==")}#djDebug .panelContent .djDebugClose.djDebugBack:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA6hJREFUeNrMWF1Ik1EYPtt0pkuGa/aDJTY3nNvSfkglvEwQpa7CbrosKAghBedNikKgEgVe1m03SVeJXmSXBmIozpxpuiUS/eicSc75m73vx/nGt7Nzvm8/BR14+Pjec85znp297znv++kCgQBJs1kBuYDz9H0KEAWEUiGx2WzSMyvFxa8B6iicgjFzgBGKwWSJdUnuyB1AF+BUisK/AToBz7V2RK9B1ACYBDxLQwShc3Cuj3IJm5qQVsAQ4ALJvFVQrlbRAJGPPAE8UKU+2Ce/d6Jk98d36dV44iTR54DvGlTd7jGgCNCSjJBONRHR+Q8kMjtDooF5bn9uaRkxuTwkt+yciAK5UX2fmrNiVLzmzd77ukR+jr0j28GFpP6LIzYHMVdfIcais6IhjYBh2VlZITMANzsj4ntPwiNDaTmHpa6RmCov87r8AA8vau7yRGxOjactAhvOjUxP8LrcdM0EIR3syN0vAbL+djjjkAm/GZS4OK2DFdLEOyc2xsfi/3frcb4/COxqXPI5EwwGm5RC6nnRwTpmgdNNKpq9iZFiLZTsWXkmoRDkQk5Oq1cKqU3wDf80lxDFXGzvTlhUFqm2OwLOWlkI3qIOZc/h3s4hL0y3QyvSM7+4hFxq74otGg2txuyVzW3SU7QryM2YHfD3WFGIPeHQ3AjreETrc34y3d8b8wtZDApE+/5WRHrHnRGJEXDbUYiFte5HIsLtRTGTPR3Sovj3oH8oRaIotB8t5h9kAm6LnvwnDe+acILRJPZ+ZeTgr5f9A+2u2/el3cDd2lz+zF+Qzx1GIYus1WC2oEPptET4+vukp+wXrJ3XBNyLeppjxoWILjtHh5eW6OD6tbxEJno6Y4vJfoJ2NRHIidyMeQHum5DsI6PsJJPTremsvIgSiVDhHFXevnjMvmRHrL56QbaXFuN2hLeQyB43psROCm/c4nXdhB0ZkHdkALDGjjBXVXMPNNFBp9bM1TU88xqKYG/fR+woY7GDFFxtyDg0MScxnrHzunpEGdon9rj/h4kR1j/logKrlZcqIlH2MYt0laeUKlbVEOPpUtGQNq0CqxvwUDR766OPbM3NqibPeU4XySuvVNPplZNnUc6aUjlxACG8Rx01GyLHgKmBQbOKfaosJ7Rq3xaa8vcK6WBBQ75ZQgrNy5YRyVR6OOE6zbYzbX7K1ZdOyUloNe8B3AOspCFghc71aH0Z0KX4feSvf5bQctZkP9Sgg7jo+ywm6+l+qPkjwADNS26fFM/O1QAAAABJRU5ErkJggg==")}#djDebug .panelContent dt,#djDebug .panelContent dd{display:block}#djDebug .panelContent dt{margin-top:.75em}#djDebug .panelContent dd{margin-left:10px}#djDebug a.toggleTemplate{padding:4px;background-color:#bbb;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}#djDebug a.toggleTemplate:hover{padding:4px;background-color:#444;color:#ffe761;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}#djDebug a.djTemplateShowContext,#djDebug a.djTemplateShowContext span.toggleArrow{color:#999}#djDebug a.djTemplateShowContext:hover,#djDebug a.djTemplateShowContext:hover span.toggleArrow{color:#000;cursor:pointer}#djDebug .djDebugSqlWrap{position:relative}#djDebug .djDebugCollapsed{display:none;text-decoration:none;color:#333}#djDebug .djDebugUncollapsed{color:#333;text-decoration:none}#djDebug .djUnselected{display:none}#djDebug tr.djHiddenByDefault{display:none}#djDebug tr.djSelected{display:table-row}#djDebug .djDebugSql{z-index:100000002}#djDebug .djSQLDetailsDiv tbody th{text-align:left}#djDebug .djSqlExplain td{white-space:pre}#djDebug span.djDebugLineChart{background-color:#777;height:3px;position:absolute;bottom:0;top:0;left:0;display:block;z-index:1000000001}#djDebug span.djDebugLineChartWarning{background-color:#900}#djDebug .highlight{color:#000}#djDebug .highlight .err{color:#000}#djDebug .highlight .g{color:#000}#djDebug .highlight .k{color:#000;font-weight:bold}#djDebug .highlight .o{color:#000}#djDebug .highlight .n{color:#000}#djDebug .highlight .mi{color:#000;font-weight:bold}#djDebug .highlight .l{color:#000}#djDebug .highlight .x{color:#000}#djDebug .highlight .p{color:#000}#djDebug .highlight .m{color:#000;font-weight:bold}#djDebug .highlight .s{color:#333}#djDebug .highlight .w{color:#888}#djDebug .highlight .il{color:#000;font-weight:bold}#djDebug .highlight .na{color:#333}#djDebug .highlight .nt{color:#000;font-weight:bold}#djDebug .highlight .nv{color:#333}#djDebug .highlight .s2{color:#333}#djDebug .highlight .cp{color:#333}#djDebug .timeline{width:30%}#djDebug .djDebugTimeline{position:relative;height:100%;min-height:100%}#djDebug div.djDebugLineChart{position:absolute;left:0;right:0;top:0;bottom:0;vertical-align:middle}#djDebug div.djDebugLineChart strong{text-indent:-10000em;display:block;font-weight:normal;vertical-align:middle;background-color:#ccc}#djDebug div.djDebugLineChartWarning strong{background-color:#900}#djDebug .djDebugInTransaction div.djDebugLineChart strong{background-color:#d3ff82}#djDebug .djDebugStartTransaction div.djDebugLineChart strong{border-left:1px solid #94b24d}#djDebug .djDebugEndTransaction div.djDebugLineChart strong{border-right:1px solid #94b24d}#djDebug .djDebugHover div.djDebugLineChart strong{background-color:#000}#djDebug .djDebugInTransaction.djDebugHover div.djDebugLineChart strong{background-color:#94b24d}#djDebug .panelContent ul.stats{position:relative;list-style-type:none}#djDebug .panelContent ul.stats li{width:30%;float:left}#djDebug .panelContent ul.stats li strong.label{display:block}#djDebug .panelContent ul.stats li span.color{height:12px;width:3px;display:inline-block}#djDebug .panelContent ul.stats li span.info{display:block;padding-left:5px}#djDebug .panelcontent thead th{white-space:nowrap}#djDebug .djDebugRowWarning .time{color:red}#djdebug .panelcontent table .toggle{width:14px;padding-top:3px}#djDebug .panelContent table .actions{min-width:70px;white-space:nowrap}#djdebug .panelcontent table .color{width:3px}#djdebug .panelcontent table .color span{width:3px;height:12px;overflow:hidden;padding:0}#djDebug .djToggleSwitch{text-decoration:none;border:1px solid #999;height:12px;width:12px;line-height:12px;text-align:center;color:#777;display:inline-block;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF',endColorstr='#DCDCDC');background:-webkit-gradient(linear,left top,left bottom,from(#FFF),to(#dcdcdc));background:-moz-linear-gradient(center top,#fff 0,#dcdcdc 100%) repeat scroll 0 0 transparent}#djDebug .djNoToggleSwitch{height:14px;width:14px;display:inline-block}#djDebug .djSQLDetailsDiv{margin-top:.8em}#djDebug pre{white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;color:#555;border:1px solid #ccc;border-collapse:collapse;background-color:#fff;display:block;overflow:auto;padding:2px 3px;margin-bottom:3px;font-family:Consolas,Monaco,"Bitstream Vera Sans Mono","Lucida Console",monospace}#djDebug .stack span{color:#000;font-weight:bold}#djDebug .stack span.path{color:#777;font-weight:normal}#djDebug .stack span.code{font-weight:normal}@media print{#djDebug{display:none}}
16 debug_toolbar/utils/tracking/db.py
@@ -86,7 +86,9 @@ def _quote_expr(self, element):
86 86 return repr(element)
87 87
88 88 def _quote_params(self, params):
89   - if isinstance(params, dict):
  89 + if not params:
  90 + return params
  91 + elif isinstance(params, dict):
90 92 return dict((key, self._quote_expr(value))
91 93 for key, value in params.iteritems())
92 94 return map(self._quote_expr, params)
@@ -102,14 +104,6 @@ def execute(self, sql, params=()):
102 104 try:
103 105 return self.cursor.execute(sql, params)
104 106 finally:
105   - # FIXME: Sometimes connections which are not in the connections
106   - # dict are used (for example in test database destroying).
107   - # The code below (at least get_transaction_id(alias) needs to have
108   - # the connection in the connections dict. It would be good to
109   - # not have this requirement at all, but for now lets just skip
110   - # these connections.
111   - if self.db.alias not in connections:
112   - return
113 107 stop = datetime.now()
114 108 duration = ms_from_timedelta(stop - start)
115 109 enable_stacktraces = getattr(settings,
@@ -149,8 +143,8 @@ def execute(self, sql, params=()):
149 143 params = {
150 144 'engine': engine,
151 145 'alias': alias,
152   - 'sql': self.db.ops.last_executed_query(self.cursor, sql,
153   - self._quote_params(params)),
  146 + 'sql': self.db.ops.last_executed_query(
  147 + self.cursor, sql, self._quote_params(params)),
154 148 'duration': duration,
155 149 'raw_sql': sql,
156 150 'params': _params,

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.