Added changes to expand the scope of the document grouping functionality

This commit is contained in:
Roberto Rosario
2011-05-09 23:57:23 -04:00
parent 94134bc83e
commit b6d2654cc7
5 changed files with 59 additions and 39 deletions

12
apps/documents/classes.py Normal file
View File

@@ -0,0 +1,12 @@
from django.utils.translation import ugettext_lazy as _
class MetadataObject(object):
def __init__(self, dictionary):
self.dictionary = dictionary
def __getattr__(self, name):
if name in self.dictionary:
return self.dictionary.get(name)
else:
raise AttributeError(_(u'\'metadata\' object has no attribute \'%s\'') % name)