app/soc/logic/models/base.py
changeset 459 2cfcedaf7c16
parent 447 83b49d60effd
child 481 94834a1e6c01
--- a/app/soc/logic/models/base.py	Mon Nov 10 00:41:01 2008 +0000
+++ b/app/soc/logic/models/base.py	Mon Nov 10 00:41:54 2008 +0000
@@ -94,6 +94,19 @@
 
     raise NotImplementedError
 
+  def getSuffixValues(self, entity):
+    """Returns an array with the public values of the Key Fields
+
+    Defaults to getKeyValues
+    If any of the Key Fields should not be made public, this method
+    should return their public counterparts instead.
+
+    Args:
+      entity: the entity for which to construct the suffix 
+    """
+
+    return self.getKeyValues(entity)
+
   def getKeyValuesFromFields(self, fields):
     """Exctracts the key values from a dict and returns them
 
@@ -119,7 +132,7 @@
     if not entity:
       return None
 
-    key_values = self.getKeyValues(entity)
+    key_values = self.getSuffixValues(entity)
     suffix = '/'.join(key_values)
 
     return suffix