diff -r d1a9c7179bbb -r d212d5f4c41a app/soc/models/base.py --- a/app/soc/models/base.py Sun Jan 25 11:31:40 2009 +0000 +++ b/app/soc/models/base.py Sun Jan 25 11:44:25 2009 +0000 @@ -47,7 +47,21 @@ """ _fields_cache = None - + + def toDict(self): + """Returns a dict with all StringProperty values of this entity + """ + + result = {} + + for key, value in self.properties().iteritems(): + # Skip everything but StringProperties + if not isinstance(value, db.StringProperty): + continue + result[key] = getattr(self, key) + + return result + @classmethod def fields(cls): """Called by the Django template engine during template instantiation.