version 1.98, 2004/06/07 08:50:14
|
version 1.99, 2004/06/07 14:30:16
|
Line 2314 class ECHO_partner(Image,Persistent):
|
Line 2314 class ECHO_partner(Image,Persistent):
|
|
|
meta_type="ECHO_partner" |
meta_type="ECHO_partner" |
|
|
def __init__(self, id, title,url, file, copyrightType,content_type='', precondition=''): |
def __init__(self, id, title,url, file, copyrightType, person, email, country, content_type='', precondition=''): |
self.__name__=id |
self.__name__=id |
self.title=title |
self.title=title |
self.url=url |
self.url=url |
|
self.person=person |
|
self.email=email |
|
self.country=country |
self.precondition=precondition |
self.precondition=precondition |
self.copyrightType=copyrightType |
self.copyrightType=copyrightType |
data, size = self._read_data(file) |
data, size = self._read_data(file) |
Line 2329 class ECHO_partner(Image,Persistent):
|
Line 2332 class ECHO_partner(Image,Persistent):
|
) |
) |
|
|
|
|
def changeECHO_partner(self,url,copyrightType,RESPONSE=None): |
def changeECHO_partner(self,url,copyrightType,person, email, country, RESPONSE=None): |
"""Change main information""" |
"""Change main information""" |
self.url=url |
self.url=url |
|
self.person=person |
|
self.email=email |
|
self.country=country |
self.copyrightType=copyrightType |
self.copyrightType=copyrightType |
if RESPONSE is not None: |
if RESPONSE is not None: |
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
Line 2351 manage_addECHO_partnerForm=DTMLFile('dtm
|
Line 2357 manage_addECHO_partnerForm=DTMLFile('dtm
|
|
|
|
|
|
|
def manage_addECHO_partner(self, id, file,url, title='', precondition='', content_type='', |
def manage_addECHO_partner(self, id, file,url, person, email, country, title='', precondition='', content_type='', |
REQUEST=None): |
REQUEST=None): |
""" |
""" |
Add a new ECHO_partner object. |
Add a new ECHO_partner object. |
Line 2370 def manage_addECHO_partner(self, id, fil
|
Line 2376 def manage_addECHO_partner(self, id, fil
|
self=self.this() |
self=self.this() |
|
|
# First, we create the image without data: |
# First, we create the image without data: |
self._setObject(id, ECHO_partner(id,title,url,'',content_type, precondition)) |
self._setObject(id, ECHO_partner(id,title,url,'',person, email, country, content_type, precondition)) |
|
|
# Now we "upload" the data. By doing this in two steps, we |
# Now we "upload" the data. By doing this in two steps, we |
# can use a database trick to make the upload more efficient. |
# can use a database trick to make the upload more efficient. |