From 9968492ee90b4e1e8f013ccd65eb15ba0e5b1e89 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Tue, 5 Jul 2011 00:36:17 -0400 Subject: [PATCH] Show settings name's and descriptions on the same columns to save space and improve appearance --- apps/smart_settings/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/smart_settings/views.py b/apps/smart_settings/views.py index e2673557d0..c57e79c678 100644 --- a/apps/smart_settings/views.py +++ b/apps/smart_settings/views.py @@ -1,6 +1,7 @@ from django.shortcuts import render_to_response from django.template import RequestContext from django.utils.translation import ugettext_lazy as _ +from django.utils.safestring import mark_safe from common.utils import return_type from common.widgets import exists_with_famfam @@ -27,10 +28,9 @@ def setting_list(request): 'hide_link': True, 'hide_object': True, 'extra_columns': [ - {'name': _(u'name'), 'attribute': 'global_name'}, + {'name': _(u'name'), 'attribute': lambda x: mark_safe(u'%s
%s' % (x.get('global_name'), x.get('description')))}, {'name': _(u'default'), 'attribute': lambda x: return_type(x['default'])}, {'name': _(u'value'), 'attribute': lambda x: return_type(getattr(x['module'], x['name']))}, - {'name': _(u'description'), 'attribute': 'description'}, {'name': _(u'exists'), 'attribute': lambda x: exists_with_famfam(getattr(x['module'], x['name'])) if x['exists'] else ''}, ] }