Skip to content

Commit

Permalink
Fixes fields vanishing from admin task view. Closes #130
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed Apr 20, 2012
1 parent 4c864fd commit 3835ea9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions djcelery/admin_utils.py
Expand Up @@ -4,6 +4,11 @@

from django.utils.html import escape

FIXEDWIDTH_STYLE = '''\
<span title="%s", style="font-size: %spt; \
font-family: Menlo, Courier; ">%s</span> \
'''


def attrs(**kwargs):
def _inner(fun):
Expand Down Expand Up @@ -38,7 +43,7 @@ def f(task):

if len(shortval) > maxlen:
shortval = shortval[:maxlen] + "..."
return """<span title="%s", style="font-size: %spt;\
font-family: Menlo, Courier; ">%s</span>""" % (
escape(val[:255]), pt, escape(shortval)).replace("|br/|", "<br/>")
styled = FIXEDWIDTH_STYLE % (escape(val[:255]), pt,
escape(shortval))
return styled.replace("|br/|", "<br/>")
return f

0 comments on commit 3835ea9

Please sign in to comment.