mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Merge branch 'dashboard3' of https://github.com/samuelclay/NewsBlur into dashboard3
This commit is contained in:
commit
994bff88b9
1 changed files with 2 additions and 2 deletions
|
@ -153,8 +153,8 @@ class SQLLogToConsoleMiddleware:
|
|||
query['sql'] = re.sub(r'INSERT', '~FGINSERT', query['sql'])
|
||||
query['sql'] = re.sub(r'UPDATE', '~FY~SBUPDATE', query['sql'])
|
||||
query['sql'] = re.sub(r'DELETE', '~FR~SBDELETE', query['sql'])
|
||||
t = Template("{% for sql in sqllog %}{% if not forloop.first %} {% endif %}[{{forloop.counter}}] ~FC{{sql.time}}s~FW: {{sql.sql|safe}}{% if not forloop.last %}\n{% endif %}{% endfor %}")
|
||||
if settings.DEBUG:
|
||||
if settings.DEBUG and settings.DEBUG_QUERIES:
|
||||
t = Template("{% for sql in sqllog %}{% if not forloop.first %} {% endif %}[{{forloop.counter}}] ~FC{{sql.time}}s~FW: {{sql.sql|safe}}{% if not forloop.last %}\n{% endif %}{% endfor %}")
|
||||
logging.debug(t.render(Context({
|
||||
'sqllog': queries,
|
||||
'count': len(queries),
|
||||
|
|
Loading…
Add table
Reference in a new issue