Added encapsulate factory function to get around Django bug #15791

This commit is contained in:
Roberto Rosario
2011-08-05 09:30:26 -04:00
parent 7b0e177ba2
commit 1b7183be85
15 changed files with 57 additions and 37 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ from django.utils.http import urlencode
import sendfile
from common.utils import pretty_size, parse_range, urlquote, \
return_diff
return_diff, encapsulate
from common.widgets import two_state_template
from common.literals import PAGE_SIZE_DIMENSIONS, \
PAGE_ORIENTATION_PORTRAIT, PAGE_ORIENTATION_LANDSCAPE
@@ -978,7 +978,7 @@ def document_type_filename_list(request, document_type_id):
'extra_columns': [
{
'name': _(u'enabled'),
'attribute': lambda x: two_state_template(x.enabled),
'attribute': encapsulate(lambda x: two_state_template(x.enabled)),
}
]
}