comparison roundup/hyperdb.py @ 3601:7b25567f0f54

indexing may be turned off for FileClass "content" now
author Richard Jones <richard@users.sourceforge.net>
date Thu, 27 Apr 2006 01:39:47 +0000
parents f47bddab5a49
children 77ed6c517793
comparison
equal deleted inserted replaced
3600:1113e1456093 3601:7b25567f0f54
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: hyperdb.py,v 1.118 2006-03-03 02:02:50 richard Exp $ 18 # $Id: hyperdb.py,v 1.119 2006-04-27 01:39:47 richard Exp $
19 19
20 """Hyperdatabase implementation, especially field types. 20 """Hyperdatabase implementation, especially field types.
21 """ 21 """
22 __docformat__ = 'restructuredtext' 22 __docformat__ = 'restructuredtext'
23 23
853 853
854 class FileClass: 854 class FileClass:
855 ''' A class that requires the "content" property and stores it on 855 ''' A class that requires the "content" property and stores it on
856 disk. 856 disk.
857 ''' 857 '''
858 default_mime_type = 'text/plain'
859
860 def __init__(self, db, classname, **properties):
861 '''The newly-created class automatically includes the "content"
862 property.
863 '''
864 if not properties.has_key('content'):
865 properties['content'] = hyperdb.String(indexme='yes')
866
858 def export_propnames(self): 867 def export_propnames(self):
859 ''' Don't export the "content" property 868 ''' Don't export the "content" property
860 ''' 869 '''
861 propnames = self.getprops().keys() 870 propnames = self.getprops().keys()
862 propnames.remove('content') 871 propnames.remove('content')

Roundup Issue Tracker: http://roundup-tracker.org/