def manage_addBust(dispatcher, id, bigphoto, littleimage, title, description=u'', REQUEST=None, redirect_to=None): """ create instance """ if not id: id = title.replace('&',' o ').strip().replace(' ',' ') id = id.replace(' ','-') id = internationalizeID(id) dest = dispatcher.Destination() instance = Bust(id, title, description=description) dest._setObject(id, instance) object = dest._getOb(id) #object.DeployStandards() object.uploadPhoto(bigphoto) if getattr(littleimage, 'filename', None): object.uploadThumbnail(littleimage) else: object.convertPhotoToThumbnail() if REQUEST is not None: if redirect_to: REQUEST.RESPONSE.redirect(redirect_to) else: REQUEST.RESPONSE.redirect(REQUEST.URL1+'/BustManagement')
def manage_addGuestbook(dispatcher, id, title, REQUEST=None, redirect_to=None): """ create instance """ if not id: id = title.replace("&", " o ").strip().replace(" ", " ") id = id.replace(" ", "-") id = internationalizeID(id) title = unicodify(title) dest = dispatcher.Destination() instance = Guestbook(id, title) dest._setObject(id, instance) object = dest._getOb(id) if REQUEST is not None: if redirect_to: REQUEST.RESPONSE.redirect(redirect_to) else: REQUEST.RESPONSE.redirect(REQUEST.URL1 + "/manage_workspace")
def manage_addBlogContainer(dispatcher, id, title=u'', REQUEST=None): """ create instance """ dest = dispatcher.Destination() id = id.strip() title = unicodify(title.strip()) if title and not id: id = internationalizeID(title.replace(' ','-')) instance = BlogContainer(id, title) dest._setObject(id, instance) object = dest._getOb(id) if REQUEST is not None: if REQUEST.get('goto_after'): url = REQUEST.get('goto_after') else: url = REQUEST.URL1+'/manage_workspace' REQUEST.RESPONSE.redirect(url)
def manage_addNewsContainer(dispatcher, id, title='', REQUEST=None): """ create instance """ dest = dispatcher.Destination() if not id and title: id = internationalizeID(title) id = id.replace(' ','-') title = unicodify(title) instance = NewsContainer(id, title) dest._setObject(id, instance) object = dest._getOb(id) #object.DeployStandards() if REQUEST is not None: if REQUEST.get('goto_after'): url = REQUEST.get('goto_after') else: url = REQUEST.URL1+'/manage_workspace' REQUEST.RESPONSE.redirect(url) else: return object
def searchable_text_ascii(self): """ return the value of searchable_text() ASCII encoded """ return internationalizeID(self.searchable_text())
def getTitle_ascii(self): """ return getTitle() ascii encoded """ return internationalizeID(self.getTitle())
def getTitle_ascii(self): """ Return the value of getTitle() ASCII encoded """ return internationalizeID(self.getTitle())