From 053a5912add8aafe0da8cb4e6a32b5beae83214e Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Tue, 11 Nov 2014 03:36:43 -0400 Subject: [PATCH] Add label to the registered Document model fields --- mayan/apps/documents/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mayan/apps/documents/__init__.py b/mayan/apps/documents/__init__.py index c05c63801c..c4a1b9056e 100644 --- a/mayan/apps/documents/__init__.py +++ b/mayan/apps/documents/__init__.py @@ -3,8 +3,10 @@ from __future__ import absolute_import import tempfile from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import ugettext from acls.api import class_permissions +from common.classes import ModelAttribute from common.utils import encapsulate, validate_path from dynamic_search.classes import SearchModel from history.api import register_history_type @@ -158,3 +160,5 @@ namespace.add_statistic(DocumentStatistics(name='document_stats', label=_(u'Docu namespace.add_statistic(DocumentUsageStatistics(name='document_usage', label=_(u'Document usage'))) APIEndPoint('documents') + +ModelAttribute(Document, label=_('Label'), name='label', type_name='field')