示例#1
0
def created(context):
        created = IZopeDublinCore(context).created
        created = unicode(created)
        created = created.split(u'.')
        created.reverse()
        created = created.pop()
        return created
示例#2
0
 def gimmeURL(self):
     cat = getUtility(IQreatureCatalog, context=self.context)
     int_ids = getUtility(IQreatureIntIds, context=self.context)
     quizes = cat['quizes'].apply((None,None))
     quizes = [int_ids.getObject(quiz) for quiz in quizes]
     for quiz in quizes:
         if IPublished.providedBy(quiz):
             loc = absoluteURL(quiz,self.request) + '/go.html'
             loc = loc[:7] + 'www.' + loc[7:]
             created = IZopeDublinCore(quiz).created
             created = unicode(created)
             created = created.split(u'.')
             created.reverse()
             created = created.pop()
             created = created.split(u' ')
             created.reverse()
             lastmod = created.pop()
             changefreq= "weekly"
             priority="0.5"
             yield {'loc':loc,'lastmod':lastmod,'changefreq':changefreq,'priority':priority}