mirror of
https://github.com/pallets-eco/flask-debugtoolbar.git
synced 2025-12-31 02:29:33 -06:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72e8e277af | ||
|
|
75bac4e961 | ||
|
|
f84087156a | ||
|
|
56be56de86 | ||
|
|
7e8a8e280e | ||
|
|
672fdb59e6 | ||
|
|
b5a6fbe839 | ||
|
|
824f73d9aa | ||
|
|
d8d2fb7a85 | ||
|
|
8a922a2a5c |
13
CHANGES.rst
13
CHANGES.rst
@@ -1,6 +1,19 @@
|
||||
Changes
|
||||
=======
|
||||
|
||||
0.6.3.1 (2012-04-16)
|
||||
------------------
|
||||
|
||||
New release to add missing changelog for 0.6.3
|
||||
|
||||
|
||||
0.6.3 (2012-04-16)
|
||||
------------------
|
||||
Fixes:
|
||||
|
||||
- Compatibility with Flask-SQLAlchemy 0.16 package name
|
||||
|
||||
|
||||
0.6.2 (2012-02-18)
|
||||
------------------
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import hashlib
|
||||
|
||||
try:
|
||||
from flaskext.sqlalchemy import get_debug_queries, SQLAlchemy
|
||||
from flask.ext.sqlalchemy import get_debug_queries, SQLAlchemy
|
||||
except ImportError:
|
||||
sqlalchemy_available = False
|
||||
get_debug_queries = SQLAlchemy = None
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for key, value in headers.iteritems() %}
|
||||
<tr class="{{ loop.cycle('djDebugOdd' 'djDebugEven') }}">
|
||||
<tr class="{{ loop.cycle('flDebugOdd', 'flDebugEven') }}">
|
||||
<td>{{ key|escape }}</td>
|
||||
<td>{{ value|escape }}</td>
|
||||
</tr>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for record in records %}
|
||||
<tr class="{{ loop.cycle('fjDebugOdd' 'fjDebugEven') }}">
|
||||
<tr class="{{ loop.cycle('flDebugOdd', 'flDebugEven') }}">
|
||||
<td>{{ record.level }}</td>
|
||||
<td>{{ record.time }}</td>
|
||||
<td>{{ record.message }}</td>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in function_calls %}
|
||||
<tr class="{{ loop.cycle('flDebugOdd' 'flDebugEven') }}">
|
||||
<tr class="{{ loop.cycle('flDebugOdd', 'flDebugEven') }}">
|
||||
<td>{{ row.ncalls }}</td>
|
||||
<td>{{ row.tottime }}</td>
|
||||
<td>{{ '%.4f'|format(row.percall) }}</td>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for key, value in map %}
|
||||
<tr class="{{ loop.cycle('flDebugOdd' 'flDebugEven') }}">
|
||||
<tr class="{{ loop.cycle('flDebugOdd', 'flDebugEven') }}">
|
||||
<td>{{ key|printable }}</td>
|
||||
<td>{{ value|printable }}</td>
|
||||
</tr>
|
||||
@@ -74,7 +74,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for key, value in map %}
|
||||
<tr class="{{ loop.cycle('flDebugOdd' 'flDebugEven') }}">
|
||||
<tr class="{{ loop.cycle('flDebugOdd', 'flDebugEven') }}">
|
||||
<td>{{ key|printable }}</td>
|
||||
<td>
|
||||
{%- set sep = joiner() -%}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for query in queries %}
|
||||
<tr class="{{ loop.cycle('flDebugOdd' 'flDebugEven') }}">
|
||||
<tr class="{{ loop.cycle('flDebugOdd', 'flDebugEven') }}">
|
||||
<td>{{ '%.4f'|format(query.duration) }}</td>
|
||||
<td>
|
||||
{% if query.params %}
|
||||
@@ -26,7 +26,7 @@
|
||||
{{ query.context }}
|
||||
</td>
|
||||
<td class="syntax">
|
||||
<div class="djDebugSqlWrap">
|
||||
<div class="flDebugSqlWrap">
|
||||
<div class="flDebugSql">{{ query.sql|safe }}</div>
|
||||
{#
|
||||
{% if query.stacktrace %}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<dt>Time</dt>
|
||||
<dd>{{ '%.4f'|format(duration) }} ms</dd>
|
||||
</dl>
|
||||
<table class="djSqlExplain">
|
||||
<table class="flSqlExplain">
|
||||
<thead>
|
||||
<tr>
|
||||
{% for h in headers %}
|
||||
@@ -20,7 +20,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in result %}
|
||||
<tr class="{{ loop.cycle('fjDebugOdd' 'fjDebugEven') }}">
|
||||
<tr class="{{ loop.cycle('fjDebugOdd', 'fjDebugEven') }}">
|
||||
{% for column in row %}
|
||||
<td>{{ column }}</td>
|
||||
{% endfor %}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in result %}
|
||||
<tr class="{{ loop.cycle('fjDebugOdd' 'fjDebugEven') }}">
|
||||
<tr class="{{ loop.cycle('flDebugOdd', 'flDebugEven') }}">
|
||||
{% for column in row %}
|
||||
<td>{{ column }}</td>
|
||||
{% endfor %}
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
{% if templates %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Filename</th>
|
||||
<th>Context vars</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for template in templates %}
|
||||
<tr class="{{ loop.cycle('fjDebugOdd' 'fjDebugEven') }}">
|
||||
<td>{{ template.template.name }}</td>
|
||||
<td>{{ template.context.keys()|join(', ') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% for template in templates %}
|
||||
<h4>{{ template.template.name }}</h4>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Variable</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for k, v in template.context|dictsort %}
|
||||
<tr class="{{ loop.cycle('flDebugOdd', 'flDebugEven') }}">
|
||||
<td>{{ k }}</td>
|
||||
<td>{{ v|printable }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p>No templates rendered.</p>
|
||||
<p>No template rendered</p>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import urllib
|
||||
|
||||
from flask import url_for, current_app
|
||||
|
||||
|
||||
@@ -52,7 +54,8 @@ class DebugToolbar(object):
|
||||
"""
|
||||
Populate debug panels
|
||||
"""
|
||||
activated = self.request.cookies.get('fldt_active', '').split(';')
|
||||
activated = self.request.cookies.get('fldt_active', '')
|
||||
activated = urllib.unquote(activated).split(';')
|
||||
|
||||
for panel_class in self.panel_classes:
|
||||
panel_instance = panel_class(
|
||||
|
||||
Reference in New Issue
Block a user