Improve date rendering.

This commit is contained in:
Roberto Rosario
2015-08-20 00:08:28 -04:00
parent 68f3c6eee7
commit 0d3c2defe2
3 changed files with 25 additions and 18 deletions

View File

@@ -15,6 +15,7 @@ from django.utils.http import urlencode, urlquote
from django.utils.translation import ugettext_lazy as _
from acls.models import AccessControlList
from common.utils import return_attrib
from permissions import Permission
logger = logging.getLogger(__name__)
@@ -289,6 +290,14 @@ class SourceColumn(object):
self.__class__._registry.setdefault(source, [])
self.__class__._registry[source].append(self)
def resolve(self, context):
if self.attribute:
result = return_attrib(context['object'], self.attribute)
elif self.func:
result = self.func(context=context)
return result
class CombinedSource(object):
"""