def created(context): created = IZopeDublinCore(context).created created = unicode(created) created = created.split(u'.') created.reverse() created = created.pop() return created
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}