[csw-devel] SF.net SVN: gar:[13056] csw/mgar/gar/v2/lib/python/models.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sun Jan 23 08:59:06 CET 2011
Revision: 13056
http://gar.svn.sourceforge.net/gar/?rev=13056&view=rev
Author: wahwah
Date: 2011-01-23 07:59:06 +0000 (Sun, 23 Jan 2011)
Log Message:
-----------
pkgdb: Default __unicode__() for CswFile
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/models.py
Modified: csw/mgar/gar/v2/lib/python/models.py
===================================================================
--- csw/mgar/gar/v2/lib/python/models.py 2011-01-23 07:57:53 UTC (rev 13055)
+++ csw/mgar/gar/v2/lib/python/models.py 2011-01-23 07:59:06 UTC (rev 13056)
@@ -4,6 +4,7 @@
import logging
import sqlobject
+import os.path
from sqlobject import sqlbuilder
import cPickle
@@ -97,6 +98,9 @@
srv4_file = sqlobject.ForeignKey('Srv4FileStats')
basename_idx = sqlobject.DatabaseIndex('basename')
+ def __unicode__(self):
+ return u"File: %s" % os.path.join(self.path, self.basename)
+
class Srv4FileStatsBlob(sqlobject.SQLObject):
"""Holds pickled data structures.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list