Fixed permission grant revoke button text no appearing

This commit is contained in:
Roberto Rosario
2011-05-10 03:40:50 -04:00
parent b6d2654cc7
commit b4daa2d52b
3 changed files with 3 additions and 2 deletions

12
apps/metadata/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)