Skip to content

Commit

Permalink
filter fixes, template fixes (missing items)
Browse files Browse the repository at this point in the history
  • Loading branch information
starenka committed Dec 14, 2011
1 parent d1464f1 commit a9f225e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 5 additions & 2 deletions filters.py
Expand Up @@ -14,5 +14,8 @@ def datetimeformat(value, format='%H:%M %d.%m/%y'):
return value.as_datetime().strftime(format)

def filename(path):
path = os.path.split(path)
return path[-1]
try:
path = os.path.split(path)
return path[-1]
except:
return path
8 changes: 4 additions & 4 deletions templates/items.html
Expand Up @@ -16,15 +16,15 @@
alt="{{item.level}}"/></a>{{item.message}}
{% if item.exception %}<br/>
<small>
<strong>{{item.exception.message}} ({{item.exception.code }})</strong><br/>
{% if item.exception.message %}<strong>{{item.exception.message}} ({{item.exception.code }})</strong><br/>{% endif %}
<pre>{{item.exception.stackTrace }}</pre>
</small>
{% endif %}
</td>
<td>{{item.loggerName}}</td>
<td>{{item.fileName|filename}}:{{item.lineNumber}}
<small>{{item.method}} (#{{item.thread}})</small><br/>
<small>{{item.fileName}}</small>
<td>{% if item.fileName %}{{item.fileName|filename}}{% if item.lineNumber %}:{{item.lineNumber}}{% endif %}{% endif %}
{% if item.method %}<small>{{item.method}} (#{{item.thread}})</small>{% endif %}
{% if item.fileName %}<br/><small>{{item.fileName}}</small>{% endif %}
</td>
<td>
<small>{{item.timestamp|datetimeformat}}</small>
Expand Down

0 comments on commit a9f225e

Please sign in to comment.