Changeset 1370 for trunk/Story.py


Ignore:
Timestamp:
02/14/07 02:03:14 (13 years ago)
Author:
jukka
Message:

Worked on #1146. Search for suitable existing story is done and stories can be written. Must find out why portal_factory decides to keep stories, if user cancels or wanders off from story creation. Also the search for existing stories is tricky. Current way isn't fast, but I don't know if it can be done any faster -- and it's our front page, will get lots of hits.

Well, one way would be to combine stories' uids to one superuid and try to match that. We'll see..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Story.py

    r1264 r1370  
    4444 
    4545    ReferenceField('relatedContent', 
    46         relationship = 'relatesTo', 
     46        relationship = 'relatesToContent', 
    4747        multiValued = True, 
    4848        isMetadata = True, 
     
    6666            ) 
    6767        ), 
    68     ReferenceField('relatedActivities', 
    69         relationship = 'relatesToActivities', 
     68    ReferenceField('relatedMethods', 
     69        relationship = 'relatesToMethods', 
    7070        multiValued = True, 
    7171        isMetadata = True, 
     
    8282            size = 4, 
    8383            i18n_domain = "lemill", 
    84             label = "Related Activities", 
    85             label_msgid = "label_related_activities", 
     84            label = "Related Methods", 
     85            label_msgid = "label_related_methods", 
    8686            description = "", 
    87             description_msgid = "help_story_related_activities", 
     87            description_msgid = "help_story_related_methods", 
    8888            visible = {'edit' : 'invisible', 'view' : 'invisible' } 
    8989            ) 
     
    143143    security.declareObjectPublic() 
    144144 
    145 #FIXME: Should this be a method of the Story class? Right now it's a function of the Story module. --tarmo 
    146 def getHasCoverImage(self): 
    147     """ this gets asked often """ 
    148     return False 
     145    def getHasCoverImage(self): 
     146        """ this gets asked often """ 
     147        return False 
    149148 
     149    def getBlurp(self): 
     150        """ Some 1000 chars or something FIXME TO FIND NICE PLACES TO CUT (<p><br> etc.)""" 
     151        return self.getBodyText()[:200] 
    150152 
    151153registerType(Story, PROJECTNAME) 
Note: See TracChangeset for help on using the changeset viewer.