Re: [Zope-dev] Wrox Book

2000-10-16 Thread Chris Withers

Brad Clements wrote:
 
  Yeah, that project has just been pulled, I think ;-)
 
 Pulled as in cancelled?

yup...

Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] ZMYSALDA - Ports

2000-10-16 Thread Andy Dawkins

People

Has anyone managed to patch the MYSQLDA so that you can access a MySQL
server on a different port?

i.e. port 3307 instead of the default 3306

If so would you care to share the breakthrough with me please?

Andy Dawkins


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Writelocking Proposal rev 3.1

2000-10-16 Thread Jeffrey P Shell

http://dev.zope.org/Wikis/DevSite/Proposals/WriteLocking

The proposal has been updated with a new deliverable discussing
documentation as noted and requested by Brian.


Jeffrey P Shell, [EMAIL PROTECTED]
http://www.digicool.com/ | http://www.zope.org




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] SQL user source, how is this?

2000-10-16 Thread Harry Henry Gebel

I am writing a UserSource that gets it's information from an SQL database,
here it is:

''' CCUserSource, a LoginManager user source for the # project. '''

from sha import sha

from Products.LoginManager.UserSources import BasicUserSource


class CCUserSource(BasicUserSource):
  """
CCUserSource is a ZPatterns plug-in intended to be used as a user source in
LoginManager. It queries a database adapter to acquire authentication
information on a user, and sets a user's role based on the user's age. A
database connection with an id of cc_user_database must be visible. """

  # string displayed in "Add Product" drop-down box. 
  meta_type = "# User Source"

  # public functions

  def retrieveItem(self, name):
'''
Return a user object if user exists in database, otherwise return None '''

# call database adapter, if we can't connect return None
try:
  result = self.__query(
"select username from users where username='%s'" % name)
except:
  return None

# return a user object if user exists in database
if result:
  return self._RawItem(name)
else:
  return None


  def rolesForUser(self, user):
''' Calculate role from age '''
return ['Manager']


  def domainsForUser(self, user):
''' Allow users from all domains '''
return []


  def authenticateUser(self, user, password, request):
""" Verify user's password, return true if correct, 0 if incorrect """

# get SHA encoded password and salt from the database
passw = self.__query(
  "select password from users where username = '%s'" % user.getUserName())
(salt, passw) = (passw[:2], passw[2:])

# apply salt to user-supplied password and generate hash
hash = sha(salt + password).hexdigest()

# return result of match
return hash == passw

  # private functions

  def __query(self, query):
'''
Perform a query on cc_user_database, return the results of the query, return
None on no result '''

# find database connection, let caller catch exceptions
dbc = getattr(self, 'cc_user_database')
db = dbc()

# return results of database query
# query returns result in form
# ([field_data], [(row1), ...])
# all of our queries have max 1 result and only 1 column, so process
# accordingly
try:
  result = db.query(query)[1][0][0]
except:
  result = None
  
return result

It is working, but I have some questions:

1. Am I doing anything wrong that will bite me later, especially I have not
implemented all of the cache* methods called in GenericUserFolder because I
don't understand what these do or what they are for. Are these important
for my product? 

2. I would like my client to be able to specify an alternate database
connection id if he does not want to use the default connection id of
cc_user_database. If he goes to his CCUserSource's "properties" tab and
adds a property of use_database_id with the connection id he wants to use,
how do I access it (this is my first Zope product, so I am learning the
internals as I go along). Can I use

self.use_database_id

or do I have to use

getattr(self, 'use_database_id')

or do I have to use a completely different method to access properties.

PS: I know I am giving everybody that passes authentication the manager role, I
did this for testing purposes and haven't changed it yet because I have not
been given me a list of the roles they want to use.

-- 
Harry Henry Gebel, ICQ# 76308382
West Dover Hundred, Delaware

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Recursive folders from Python

2000-10-16 Thread Jason Spisak

Zopists,

Yesterday I was trying to create recursive folders from DTML.
I'd like to do the same from Python.
Does anyonw know why this code won't create a folder within a folder. 
It's tells me the id is already in use, so that means it's not
descending into the newly created folder to make another folder.

def create(self):
for digit in range(0, 10):
folder= self.manage_addFolder(str(digit), str(digit))
subfolder = self.folder.manage_addFolder(str(digit), str(digit))

All my best,

Jason Spisak
[EMAIL PROTECTED]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Recursive folders from Python

2000-10-16 Thread Andy McKay

Try using getattr to get the object... heres a python script to do it a
little more cleanly:

import string

def create_folders(self):
 path = '/a/b/c'  # create a folder for each part of the string, nested.

 for p in string.split(path, '/'):
  if p != '':
   self = create_folder(self, p)

 return 'Done'


def create_folder(folder, id):
 try: folder.manage_addFolder(id)
 except: pass

 new_folder = getattr(folder, id)
 return new_folder


- Original Message -
From: "Jason Spisak" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 16, 2000 10:46 AM
Subject: [Zope-dev] Recursive folders from Python


 Zopists,

 Yesterday I was trying to create recursive folders from DTML.
 I'd like to do the same from Python.
 Does anyonw know why this code won't create a folder within a folder.
 It's tells me the id is already in use, so that means it's not
 descending into the newly created folder to make another folder.

 def create(self):
 for digit in range(0, 10):
 folder= self.manage_addFolder(str(digit), str(digit))
 subfolder = self.folder.manage_addFolder(str(digit), str(digit))

 All my best,

 Jason Spisak
 [EMAIL PROTECTED]

 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope] List from another list in DTML?

2000-10-16 Thread Kapil Thangavelu

Alexander Chelnokov wrote:
 
 Hello All,
 
 A form contains data items ['firstname','secondname','dofb' etc]
 and some "service" fields ['submit','sid','form','nform'].
 With REQUEST.form.items() all these fields are included in a single
 list. How can another list be created from the list which contains
 only data fields? Is it possible with DTML only?

form is an instance of the python cgi FieldStorage the docs included
with your python distro will give you more info.

try (untested)

REQUEST.form.values()

 --
 Best regards,
 Alexander N. Chelnokov
 Ural Scientific Institute of Traumatology and Orthopaedics
 7, Bankovsky str. Ekaterinburg 620014 Russia
 ICQ: 25640913
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] NEWBIE: assign next free ID automatically

2000-10-16 Thread Kapil Thangavelu

ola, 

the below will should work fine, although the _string.atoi is unesc
since you can just use 0, or 1 by itself inside "" and have it treated
as an int and its a bit inefficient to use objectValues over objectIds
(list of objects vs. list of strings) although it saves you from having
to do a dtml-let doc_id=sequence-item to evaluate in pythonish "" dtml

although the code below makes it obvious it should also be stated that
ids are strings.

one caveat, i wouldn't count on the id naming sequence to nesc reflect
the order of the items, as an item maybe deleted etc and have new ones
created which replace them. if you've not going to be deleting items,
another possibility is

dtml-call "REQUEST.set(id, _.str(_.len(objectIds(['DTML
Document'])+1))"

another caveat, in a heavily hit site you're going to be generating id
errors(both methods) because one thread will commit a new doc while the
other tries a moment later to commit with the same id. hence the reason
why i would just use a random int like dtml-call "REQUEST.set(id,
_.str(_.whrandom.randint(0,100))"

kapil


jensebaer wrote:
 
 Hi,
 
 it is not tested but may it works
 
 dtml-call "REQUEST.set('newid', _.string.atoi('0'))"
 dtml-in "objectValues('DTML Document')"
   dtml-if "_.int(id) = newid"
 dtml-call "REQUEST.set('newid', _.int(id) + _.string.atoi('1'))"
   /dtml-if
 /dtml-in
 
 Your new id is: dtml-var newid
 
 may you have to use _.string.atoi(id) instead _.int(id)
 
 Viel Gl├╝ck
 
 Jens
 
 - Original Message -
 From: "Patrick Koetter" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, October 16, 2000 2:59 AM
 Subject: [Zope] NEWBIE: assign next free ID automatically
 
  Hi,
 
  I've been through the Guides, How-Tos and also some of the list-archives.
  Though I am not a programmer I finally decided to ask that question to all
  of you...
 
  I want to give Users the possibility to add documents in a folder
  things_to_do ;-).
  so far so good ... Then I want to control the IDs simply by assigning an
 ID
  to their Form.
  I found a few articles generating either randomIDs or calculating IDs from
  ZopeTime().
 
  What is it that I want to do?
  I want to evaluate the highest ID (all are 'int') within the folder and
  assign the next highest.
  I'm sure this is easy to you...
 
  If there's a RTFM-document I'd be glad to read that.
 
  thanks,
 
  p@rick
 
 
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope-dev )
 
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] bunch patches for zopeshell uploaded to sourceforge...

2000-10-16 Thread Anthony Baxter

FWIW, I just posted a series of patches for ZopeShell, and a 
few other bits, that add:

  editing of PythonMethods and Z SQL Methods (also enables ZSQL through FTP)
  Add host:port to the prompt 
  Add a 'login' command to switch to a different Zope Server 
  Don't upload the file if the temp file's mtime hasn't changed. 
  Prompt for username and password if not given. 

see the patch tracker at 
  http://sourceforge.net/projects/zopeshell/
They're patches 101923 - 101927 in the patch tracker. 

I'll copy the relevant Zope patches into the Collector...

Anthony

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] image attachments in dtml-sendmail and dtml-mime

2000-10-16 Thread Kapil Thangavelu

Matt wrote:
 
 I have benn having a problem with attaching images to a dtml-sendmail.
 The following is my dtml code :
 
 dtml-sendmail mailhost="MailHost"
 To: Feedback Recipient [EMAIL PROTECTED]
 From: Zope Feedback Form [EMAIL PROTECTED]
 Subject: Feedback from the web
 
  Feedback from : Matt
 
 dtml-mime type=image/jpeg encode=7bitdtml-var "paris"
   /dtml-mime
 
  /dtml-sendmail
 
 "paris" is the ID  of an image I uploaded into a node inherited when I
 action this dtml document, so there are no key errors or similar.
 
 The result in the email I get is :
 
  Feedback from : Matt Comments:
 Hello there, this is a sample email message for testing.
 
 Content-Type: multipart/mixed;
 boundary="127.0.0.1.500.953.971655250.628.16056"
 
 --127.0.0.1.500.953.971655250.628.16056
 Content-Type: image/jpeg
 Content-Transfer-Encoding: 7bit
 
 img src="http://localhost:8080/admin_test/paris" alt="paris"
 height="630" width="472" border="0"
 
 --127.0.0.1.500.953.971655250.628.16056--
 
 I understand that the dtml-mime tag is modifying the action of dtml-var
 that follows it, but what I want is the actual text coded binary to be
 dumped and not a source tag ... i.e. it's an email, not a webpage.
 
 I thought of embedding that in an external method that returns the text
 coded binary w.r.t the encoding type placed in the attributes, but was
 wondering if there was a method like this already available, and maybe
 not just image centric.

i don't have much experience with the mime-tags but, if you're problem
seems to be that you want the binary data of the image. when the dtml
tag renders its just dropping a string link to the Image. what you want
here is (i think) the binary data that represents the image. hmmm...
looking through the source of Image.py i don't see a web accessible
manner to get this info:(

another option is to set the mime on the email to text/html and send the
image as a link.

Kapil

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] image attachments in dtml-sendmail and dtml-mime

2000-10-16 Thread Kapil Thangavelu

spoke to soon..

replace dtml-var "paris"
with dtml-var "paris.data"

Kapil


Matt wrote:
 
 I have benn having a problem with attaching images to a dtml-sendmail.
 The following is my dtml code :
 
 dtml-sendmail mailhost="MailHost"
 To: Feedback Recipient [EMAIL PROTECTED]
 From: Zope Feedback Form [EMAIL PROTECTED]
 Subject: Feedback from the web
 
  Feedback from : Matt
 
 dtml-mime type=image/jpeg encode=7bitdtml-var "paris"
   /dtml-mime
 
  /dtml-sendmail
 
 "paris" is the ID  of an image I uploaded into a node inherited when I
 action this dtml document, so there are no key errors or similar.
 
 The result in the email I get is :
 
  Feedback from : Matt Comments:
 Hello there, this is a sample email message for testing.
 
 Content-Type: multipart/mixed;
 boundary="127.0.0.1.500.953.971655250.628.16056"
 
 --127.0.0.1.500.953.971655250.628.16056
 Content-Type: image/jpeg
 Content-Transfer-Encoding: 7bit
 
 img src="http://localhost:8080/admin_test/paris" alt="paris"
 height="630" width="472" border="0"
 
 --127.0.0.1.500.953.971655250.628.16056--
 
 I understand that the dtml-mime tag is modifying the action of dtml-var
 that follows it, but what I want is the actual text coded binary to be
 dumped and not a source tag ... i.e. it's an email, not a webpage.
 
 I thought of embedding that in an external method that returns the text
 coded binary w.r.t the encoding type placed in the attributes, but was
 wondering if there was a method like this already available, and maybe
 not just image centric.
 
 Matt Bion
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] image attachments in dtml-sendmail and dtml-mime

2000-10-16 Thread Matt

Thanks Kapil, that works brilliantly, I didn't see a 'data' member in the
quick reference and certainly didn't see a data() method which I was
expecting.  I guess I should be looking at the source.  The following is
what I ended up with

dtml-sendmail mailhost="MailHost"
To: Feedback Recipient [EMAIL PROTECTED]
From: Zope Feedback Form [EMAIL PROTECTED]
Subject: Feedback from the web

 Feedback from : Matt
 Comments:
 dtml-var some_text

dtml-mime type=image/jpeg encode=base64 name=paris.jpgdtml-var
"paris.data"
  /dtml-mime

 /dtml-sendmail

Giving the mime tag a name and setting encoding to base64 made it a nicer
experience at the other end.

thanks
Matt Bion


Kapil Thangavelu wrote:

 spoke to soon..

 replace dtml-var "paris"
 with dtml-var "paris.data"

 Kapil

 Matt wrote:
 
  I have benn having a problem with attaching images to a dtml-sendmail.
  The following is my dtml code :
 
  dtml-sendmail mailhost="MailHost"
  To: Feedback Recipient [EMAIL PROTECTED]
  From: Zope Feedback Form [EMAIL PROTECTED]
  Subject: Feedback from the web
 
   Feedback from : Matt
 
  dtml-mime type=image/jpeg encode=7bitdtml-var "paris"
/dtml-mime
 
   /dtml-sendmail
 
  "paris" is the ID  of an image I uploaded into a node inherited when I
  action this dtml document, so there are no key errors or similar.
 
  The result in the email I get is :
 
   Feedback from : Matt Comments:
  Hello there, this is a sample email message for testing.
 
  Content-Type: multipart/mixed;
  boundary="127.0.0.1.500.953.971655250.628.16056"
 
  --127.0.0.1.500.953.971655250.628.16056
  Content-Type: image/jpeg
  Content-Transfer-Encoding: 7bit
 
  img src="http://localhost:8080/admin_test/paris" alt="paris"
  height="630" width="472" border="0"
 
  --127.0.0.1.500.953.971655250.628.16056--
 
  I understand that the dtml-mime tag is modifying the action of dtml-var
  that follows it, but what I want is the actual text coded binary to be
  dumped and not a source tag ... i.e. it's an email, not a webpage.
 
  I thought of embedding that in an external method that returns the text
  coded binary w.r.t the encoding type placed in the attributes, but was
  wondering if there was a method like this already available, and maybe
  not just image centric.
 
  Matt Bion
 
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope-dev )

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] backing up

2000-10-16 Thread Cornelis J. de Brabander

You can export specific folders and save the resulting file either to the
server or to your local machine (in the management interface view the
content of a folder, choose the import/export tab and click export)
cb

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of matt
 Sent: zaterdag 14 oktober 2000 5:59
 To: [EMAIL PROTECTED]
 Subject: [Zope] backing up


 Is there a nice way to backup dtml documents and methods from a
 certain point
 in the object tree onwards without having to save all the other
 objects too?

 regards
 Matt


 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )





___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] ZClass derrived from Image does not call view fromwithin dtml-var

2000-10-16 Thread Stefan H. Holek

On Sun, 15 Oct 2000, Noah wrote:

 I'm a Zope beginner. I'm trying to create an ImageTemplate ZClass. This will work
 similar to an Image, but the user can insert it directly in DTML using dtml-var 
MyImage
 and it will get expanded into HTML (with formatting, img tag, caption, etc.)

FWIW the Image object does exactly that already.

 2. The Publisher does not call the view method (index_html) of the object!
 Instead it calls str() which is __str__ in Image and that calls Image.tag().
 I can't overload __str__ because Zope does not allow a method to start
 with _ underscore.

This is the way it works! For creating ZClasses that render on __str__
see http://www.zope.org/Members/lalo/Renderable-ZClass

HTH
Stefan


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] I want to use html_quote as a function

2000-10-16 Thread Soren Roug

Hi,

I can render text that potentially has html in it safely with

dtml-var description html_quote

but what if I want to assign the quoted result to another variable.

I tried

dtml-call "REQUEST.set('htmldesc',html_quote(REQUEST['description']))"

It didn't work. How do I solve this problem?

Sincerely yours,

Soren Roug

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Distribution Tab

2000-10-16 Thread Chris Withers

Seb Bacon wrote:
 
 In the Zope PTK there are a couple of products that have been packaged as
 product.dats.
 What format are these?  How do I do it?

If you go into any of your TTW products in the Control Panel, you'll see
a 'Distribution' management tab.
That'll let you create your own distributions...

cheers,

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] MySQL and Zope struggles

2000-10-16 Thread Richard Moon

I'm struggling to migrate an application from Zope/PostgreSQL to Zope MySQL 
(Why ? - because I've got a kind offer of free hosting if I use MySQL).

MySQL offers a limited set of features and is missing, among other things, 
the ability to use subqueries - so for example in PostgreSQL you can say

update note set notes =dtml-sqlvar notes type=string
 where note_id =
 (select note_id from artist where dtml-sqltest artist_id type=int)

and in MySQL you can't.

If you were working in a traditional programming environment you could 
overcome this by splitting the above into two parts - a select to retrieve 
the value of note_id from the artist table followed by an update of the 
note table using the returned value of note-id.

For example

select note-id into note-id-var from artist where artist-id = 23;
update note set notes = 'asdasda' where note-id = note-id-var;

The problem is that in Zope I believe you can't use a returned value within 
an SQL Method,  so the above code would fail. The only way I can see to do 
the above is to have two separate SQL Methods, one for the select, 
returning the note-id-var and another for the update. This is very clumsy.

I was wondering if anyone could tell me if there was a better way.

Many thanks


Richard

Richard Moon
[EMAIL PROTECTED]



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] MySQL and Zope struggles

2000-10-16 Thread administrator

I don't know if the following link can solve your problem,
but maybe it gives you an idea:
http://www.zope.org/Members/Roug/new_record_with_subrecords
(How-To: Creating a new record with subrecords in MySQL)
 Arno


 I'm struggling to migrate an application from Zope/PostgreSQL to Zope MySQL
 (Why ? - because I've got a kind offer of free hosting if I use MySQL).

 MySQL offers a limited set of features and is missing, among other things,
 the ability to use subqueries - so for example in PostgreSQL you can say

 update note set notes =dtml-sqlvar notes type=string
  where note_id =
  (select note_id from artist where dtml-sqltest artist_id type=int)

 and in MySQL you can't.

 If you were working in a traditional programming environment you could
 overcome this by splitting the above into two parts - a select to retrieve
 the value of note_id from the artist table followed by an update of the
 note table using the returned value of note-id.

 For example

 select note-id into note-id-var from artist where artist-id = 23;
 update note set notes = 'asdasda' where note-id = note-id-var;

 The problem is that in Zope I believe you can't use a returned value within
 an SQL Method,  so the above code would fail. The only way I can see to do
 the above is to have two separate SQL Methods, one for the select,
 returning the note-id-var and another for the update. This is very clumsy.

 I was wondering if anyone could tell me if there was a better way.

 Many thanks


 Richard

 Richard Moon
 [EMAIL PROTECTED]



 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )


 To: [EMAIL PROTECTED]



[Zope] How to use the date fmt's

2000-10-16 Thread Jonathan Cheyne

Hi all, in the various docs it shows various fmt= to display different
date types etc. It also shows some date formats that seem more like
methods themselves, ie IsCurrentMonth returns true if etc.

How can I use these in expressions?

Jonathan


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Manipulating acl_users with DTML methods

2000-10-16 Thread Harris Peter

Hi
I am new to this, and probably trying to do things the wrong way but:

I have a PostgreSQL table of users for my Zope application, and ZSQL methods
for inserting, updating and deleting users from the table. The only reason I
am doing this is to associate their real name and email address with their
user id.

Is it possible to do some kind of dtml-call to insert, update or delete Zope
users? I don't want the administrator of the application to have to maintain
user information in 2 places.

Also, is there some way for a user to change their own password, without
them having permissions to manage other users?

Peter Harris



This message and any files transmitted with it are confidential.  
The contents may not be disclosed or used by anyone other 
than the addressee. 
If you have received this communication in error, please delete 
the message and notify JBB (Greater Europe) Plc immediately 
on 0141-249-6285.

The views expressed in this email are not necessarily the views 
of JBB (Greater Europe) PLC.  
 As it has been transmitted over a public network, 
JBB (Greater Europe) PLC makes no representation nor accepts 
any liability for the email's accuracy or completeness unless 
expressly stated to the contrary.

Should you, as the intended recipient, suspect that the message 
has been intercepted or amended, please notify 
JBB (Greater Europe) Plc immediately on 0141-249-6285.



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] How to use the date fmt's

2000-10-16 Thread Tony McDonald

At 2:08 pm +0100 16/10/00, Jonathan Cheyne wrote:
Hi all, in the various docs it shows various fmt= to display different
date types etc. It also shows some date formats that seem more like
methods themselves, ie IsCurrentMonth returns true if etc.


try this

http://www.zope.org/Members/AlexR/CustomDateFormats

tone
--
Dr Tony McDonald,  FMCC, Networked Learning Environments Project 
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5116
A Zope list for UK HE/FE  http://www.fmcc.org.uk/mailman/listinfo/zope

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Need help with date comparisons

2000-10-16 Thread Jonathan Cheyne

Hi all again.

I have a blank in my mind where I hoped the answer might be to this
probably straightforward exercise.

I have a zclass containing a date property called event_date.

I want a page that loops through the months of the year, starting with
the current month, and in each loop displays all the instances from the
catalog with an event_date within the month in question.

I just get stuck, completely stuck, trying to get the month value from
the event_date and to compare it with the current month value.

Anyone done this or something like this? Is this hard or am I a bit, you
know, dense?

thanks

Jonathan




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Zope Discussion Forum @ DevShed.com

2000-10-16 Thread J. Atwood

http://www.devshed.com/cgi-bin/ubb/forumdisplay.cgi?action=topicsforum=Zope
number=10DaysPrune=60LastLogin=

I found this awhile ago and it has been pretty inactive (until last week
when I started posting.. :) ). It would be great to see some of the list
subscribers here and other members of the Zope community get involved. It is
something that I think is much needed on Zope.org (A bulletin board
system... I am SURE that I could suggest one!) as it helps Newbies and
provides a more solid, long lasting and manageable discussion.

Maybe something for ZDP if not for Zope.org.

Comments? Suggestions?

Thanks,
J




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Need help with date comparisons

2000-10-16 Thread Jason Spisak

Jonathan:

You can try:

dtml-in "['January', 'February', 'March', 'April',
   'May', 'June', 'July', 'August', 'September',
   'October', 'November', 'December']"
 dtml-if "event_date.Month() == _['sequence-item']"
  dtml-var event_date
 /dtml-if
/dtml-in

The source for DateTime() is pretty easy to follow.  You can look for you
format's there.

All my best,

 Hi all again.
 
 I have a blank in my mind where I hoped the answer might be to this
 probably straightforward exercise.
 
 I have a zclass containing a date property called event_date.
 
 I want a page that loops through the months of the year, starting with
 the current month, and in each loop displays all the instances from the
 catalog with an event_date within the month in question.
 
 I just get stuck, completely stuck, trying to get the month value from
 the event_date and to compare it with the current month value.
 
 Anyone done this or something like this? Is this hard or am I a bit, you
 know, dense?
 
 thanks
 
 Jonathan
 
 
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 


Jason Spisak
CIO
HireTechs.com
6151 West Century Boulevard
Suite 900
Los Angeles, CA 90045
P. 310.665.3444
F. 310.665.3544

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] LoginManager - With SQL

2000-10-16 Thread ed colmar

Thanks for the tips everyone!

I keep going between UserDb and LoginManager to try to get this to work.
UserDb gives me weird errors, and isn't really current, so I'm focusing on
LM.

I feel like I'm getting closer to a solution, but I'm still having
difficuties...

I followed jPenny's how to regarding accessing SQL method variables from
within python, and wrapped the retrieveItem result in a User Class.  It
seems like it is at least running my code now, but no authentication...

Am I close?  Can Anyone working with LoginManager offer any insight into
this?

Thanks!

-e-

Here's the code I have in UserSources.py

class User(BasicUser):
"""  A wrapper for the basic user class """
icon='misc_/UserDb/User_icon'

def __init__(self, name, password, roles, domains):
self.name   =name
self.__ =password
self.roles  =filter(None, map(strip, split(roles, ',')))
self.domains=filter(None, map(strip, split(domains, ',')))

def getUserName(self):
return self.name

def _getPassword(self):
return self.__

def getRoles(self):
return self.roles

def getDomains(self):
return self.domains



class PGCryptUserSource(BasicUserSource):
"""  A sql based encrypted user source """
meta_type="PG Crypt User Source"
__plugin_kind__="User Source"

def retrieveItem(self, name):
try: res=self.getuserbyusername(username=name)
except: return None

fields2index={}
fieldnames=res._schema.items()

for i in range(len(fieldnames)):
fields2index[fieldnames[i][0]]=fieldnames[i][1]

username=res[0][fields2index['username']]
password=res[0][fields2index['password']]
roles=res[0][fields2index['roles']]
domains=res[0][fields2index['domains']]

return User(username, password, roles, domains)


def rolesForUser(self, user):
name = user.getUserName()
res = self.getuserbyusername(username=name)
fields2index={}
fieldnames=res._schema.items()
for i in range(len(fieldnames)):
fields2index[fieldnames[i][0]]=fieldnames[i][1]
roles=res[0][fields2index['roles']]
return roles

def domainsForUser(self, user):
name = user.getUserName()
res = self.getuserbyusername(username=name)
fields2index={}
fieldnames=res._schema.items()
for i in range(len(fieldnames)):
fields2index[fieldnames[i][0]]=fieldnames[i][1]
domains=res[0][fields2index['domains']]
return domains

def authenticateUser(self, user, password, request):
name = user.getUserName()
res = self.getuserbyusername(username=name)
fields2index={}
fieldnames=res._schema.items()
for i in range(len(fieldnames)):
fields2index[fieldnames[i][0]]=fieldnames[i][1]
passwd=res[0][fields2index['password']]
if crypt.crypt(password,'ab')==passwd:
return 1
else:
return 0




Here's one of the tracebacks that I get:

Error Type: TypeError
Error Value: argument 1: expected read-only character buffer, None found

Traceback (innermost last): File
/usr/local/zope/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 187, in publish
File /usr/local/zope/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook (Object: Traversable)
File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 162, in publish
File /usr/local/zope/lib/python/ZPublisher/BaseRequest.py, line 440, in
traverse
File /usr/local/zope/lib/python/Products/LoginManager/LoginManager.py, line
108, in validate (Object: ProviderContainer)
File /usr/local/zope/lib/python/Products/LoginManager/LoginMethods.py, line
235, in findLogin (Object: PlugInBase)
File /usr/local/zope/lib/python/Products/LoginManager/LoginManager.py, line
65, in getItem (Object: ProviderContainer)
File /usr/local/zope/lib/python/Products/ZPatterns/Rack.py, line 60, in
getItem (Object: ProviderContainer)
File /usr/local/zope/lib/python/Products/LoginManager/UserSources.py, line
522, in retrieveItem (Object: ProviderContainer)
File /usr/local/zope/lib/python/Products/LoginManager/UserSources.py, line
485, in __init__ TypeError: (see above)


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Creating Recursive Folders

2000-10-16 Thread Jason Spisak

Dieter:

Perhaps you misunderstood me.
THis is an example of how convuluted DTML can get, but if you have an
example of how to do it clearly, I'd love to see it. 

 Jason Spisak writes:
   dtml-in expr="_.range(0, 10)"
 dtml-call "_.getitem(_.str(a), 1)._.getitem(_.str(a),
   1).manage_addFolder(_.str(_['sequence-item']),
   _.str(_['sequence-item']))"
   Throws an unathorized no matter who I am. How can I get 3 levels of
   recursion.  I tried using 'let' to stand for the object, with no luck.
 That's the just penalty for writing weird code ;-)
 

Actually, that's the penalty for using DTML.  There's a difference.

 When you would introduce names for destination folder
 and id, you could use the same pattern for *all* levels.

I don't understand what you are getting at here.

 You and other persons would understand what you do
 and you would not accidentally use the attribute "_".
 

I personally, don't like using the "_" attribute at all. But in situation
like this, I don't see another way.  Please enlighten me.



Jason Spisak
[EMAIL PROTECTED]

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Using ProxyPass and SiteRoot

2000-10-16 Thread Marcin Kasperski

"\"Geoffrey L. Wright\"
 
 knight writes:
 
   Timothy,
  
   Without going into too much detail, you are going to want to set up a
   virtual host in apache for the hostname www.isd197.k12.mn.us, and inside
   that virtual host you will want to add your ProxyPass lines similar to my
   example:
 
 [...]
 
 And just for reference, here's another working example with ProxyPass:
 
   NameVirtualHost 172.17.10.13
 
   VirtualHost 172.17.10.13
   ServerName syslog.integritysi.com
   ServerAdmin [EMAIL PROTECTED]
   ProxyPass / http://vishnu.integritysi.com:8080/syslog/
   ProxyPassReverse / http://vishnu.integritysi.com:8080/syslog/
   ProxyPass /misc_ http://vishnu.integritysi.com:8080/misc_
   ProxyPass /p_ http://vishnu.integritysi.com:8080/p_
   ErrorLog logs/syslog.integritysi.com
   TransferLog logs/syslog.integritysi.com
   /VirtualHost
 
 Good luck, and don't forget to enable the ProxyPass module.
 

Some remarks:

1) If you use custom product which contain images, it is useful to add
sth like

ProxyPass /Control_Panel/Products/Mycustomproduct
http://localhost:9673/Control_Panel/Products/Mycustomproduct

(otherwise you will not see the images which belong to the product - in
my case I couldn't see the product icons on management screens). Reverse
pass for this purpose is not needed.

2) ZCatalog does not work with SiteRoot. Smaller problem: the URLs
returned are incorrect (you can parse them with dtml). Greater problem:
attempt to find new items fails (the only solution I found is to remove
SiteRoot, find/update ZCatalog, add SiteRoot again).

3) You loose original IP address (you can use mod_proxy_add_forward
custom Apache module to preserve it in the custom X-Forwarded-For
header, so far I have not managed to recover original addresses in zope
log and for logging verification).

--
http://www.mk.w.pl /
 Marcin.Kasperski | Poradnik dla kupujcych mieszkanie:   
   @softax.com.pl |   http://www.kupmieszkanie.prv.pl 
 @bigfoot.com  \

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] I want to use html_quote as a function

2000-10-16 Thread Ryan M. Dolensek

try...

dtml-call
"REQUEST.set('htmldesc',utils.httpEscapedString(REQUEST['description']))"

ryan

Soren Roug wrote:

 Hi,

 I can render text that potentially has html in it safely with

 dtml-var description html_quote

 but what if I want to assign the quoted result to another variable.

 I tried

 dtml-call "REQUEST.set('htmldesc',html_quote(REQUEST['description']))"

 It didn't work. How do I solve this problem?

 Sincerely yours,

 Soren Roug

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

--
Ryan Dolensek
Software Engineer
Global Crossing
(920)405-4812
[EMAIL PROTECTED]



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] how to include Flash/SWF objects in Zope website?

2000-10-16 Thread Fred Yankowski

I want to include some Flash/SWF objects in a Zope website, but I
don't see any built-in way to do this or any Product that would help.
Any suggestions?

If all else fails, I'm thinking about creating a simple product for
this, modeled on ImageFile.py.

-- 
Fred Yankowski   [EMAIL PROTECTED]  tel: +1.630.879.1312
Principal Consultant www.OntoSys.com   fax: +1.630.879.1370
OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] HELP! Permissions problem, ZClass

2000-10-16 Thread Eric Walstad

Help, pls! I have a ZClass that is functioning beautifully if I am logged
in, but the anonymous user keeps getting prompted for a password.  The
problem occurs when my DTML method trys to  create a new instance of the
ZClass.  I tried giving that DTML method a Proxy of "Manager" but that isn't
helping.

Any pointers?

Thanks,

Eric.

Here's the traceback:
Zope Error

 Zope has encountered an error while publishing this resource.

 Unauthorized

 You are not authorized to access CNewsItem.

 Traceback (innermost last):
   File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line
222, in publish_module
   File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line
187, in publish
   File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line
171, in publish
   File /usr/local/Zope/lib/python/ZPublisher/mapply.py, line
160, in mapply
 (Object: buildNews)
   File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line
112, in call_object
 (Object: buildNews)
   File /usr/local/Zope/lib/python/OFS/DTMLMethod.py, line 172,
in __call__
 (Object: buildNews)
   File
/usr/local/Zope/lib/python/DocumentTemplate/DT_String.py, line 528, in
__call__
 (Object: buildNews)
   File /usr/local/Zope/lib/python/DocumentTemplate/DT_With.py,
line 146, in render
 (Object: manage_addProduct['NewsItem'])
   File /usr/local/Zope/lib/python/DocumentTemplate/DT_Util.py,
line 337, in eval
 (Object: CNewsItem_add(_.None, _, NoRedir=1))
 (Info: _)
   File string, line 0, in ?
   File /usr/local/Zope/lib/python/OFS/DTMLMethod.py, line 168,
in __call__
 (Object: CNewsItem_add)
   File
/usr/local/Zope/lib/python/DocumentTemplate/DT_String.py, line 528, in
__call__
 (Object: CNewsItem_add)
   File /usr/local/Zope/lib/python/DocumentTemplate/DT_With.py,
line 133, in render
 (Object: CNewsItem.createInObjectManager(REQUEST['id'],
REQUEST))
   File /usr/local/Zope/lib/python/DocumentTemplate/DT_Util.py,
line 331, in eval
 (Object: CNewsItem.createInObjectManager(REQUEST['id'],
REQUEST))
 (Info: CNewsItem)
   File /usr/local/Zope/lib/python/OFS/DTMLMethod.py, line 194,
in validate
 (Object: buildNews)
   File
/usr/local/Zope/lib/python/AccessControl/SecurityManager.py, line 139, in
validate
   File
/usr/local/Zope/lib/python/AccessControl/ZopeSecurityPolicy.py, line 209, in
validate
 Unauthorized: (see above)


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] Help Debugging External Methods

2000-10-16 Thread Robert_J_Roberts

I do pretty much the same things myself.  I assign sys.stderr = sys.stdout,
then I create my own log file object from a module I wrote a few years ago,
and then assign something like sys.stderr = self.logObj.

That works well for any errors that occur after those assignments have
occurred but doesn't do much for anything that happens earlier.

I also run the python code outside of Zope to get it all working.

It's just a pain when I have to make some minor change in the Zope to
External Method logic and it breaks.  That's where I start to lose it some
in the debugging.

Using something like:

import sys, traceback, string
try:
trysomething()
except:
type, val, tb = sys.exc_info()

sys.stderr.write(string.join(traceback.format_exception(type, val, tb), ''))
del type, val, tb

...helps, but even with that I seem to get errors that I just can't seem to
catch and report properly.

I'm not sure what you are referring to with "...the Python debugger
"pdb"...".  I've never used it.

Thanks for your help,

Robert J. Roberts
LMSI-SDI
509.376.6343
[EMAIL PROTECTED]



-Original Message-
From: Dieter Maurer [mailto:[EMAIL PROTECTED]]
Sent: Saturday, October 14, 2000 1:51 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [Zope] Help Debugging External Methods


[EMAIL PROTECTED] writes:
  What are my options for debugging External Methods in Zope running on
  Windows NT?
I work under Unix. Maybe my technics are not applicable for NT.

Usually, I use "print" statements for debugging purposes.
Under Unix, I can redirect "stdout" to a file and
view the output (be sure to flush stdout after "print").

You can also use "zLog" (may be spelled differently!).
This writes log entries into the log file.
The advantages: will work under Windows, contains a timestamp.

If the external method does not need too many Zope infrastructure,
I test it outside of Zope and integrate only, when it works
properly.

When everything else does not work, I use "Test.py" and
the Python debugger "pdb".


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Microsoft Zope

2000-10-16 Thread Damien Morton

http://msdn.microsoft.com/library/default.asp?URL=/library/techart/DesignKMS
ols.htm

Looks like MS has embraced the Zope way of doing things

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] how to include Flash/SWF objects in Zope website?

2000-10-16 Thread J. Atwood

You could just upload them into Zope and point to them.

http://www.gotschool.com (see flash demos).

It uploads as a "application/octet-stream"

I am sure you are talking about much more interaction.

J


 From: Fred Yankowski [EMAIL PROTECTED]
 Date: Mon, 16 Oct 2000 11:06:53 -0500
 To: [EMAIL PROTECTED]
 Subject: [Zope] how to include Flash/SWF objects in Zope website?
 
 I want to include some Flash/SWF objects in a Zope website, but I
 don't see any built-in way to do this or any Product that would help.
 Any suggestions?
 
 If all else fails, I'm thinking about creating a simple product for
 this, modeled on ImageFile.py.
 
 -- 
 Fred Yankowski   [EMAIL PROTECTED]  tel: +1.630.879.1312
 Principal Consultant www.OntoSys.com   fax: +1.630.879.1370
 OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )
 
 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] MySQL and Zope struggles

2000-10-16 Thread dale . w . lance

Or you could renormalize your data to have:

 - ---
|  Artist |   |  Note |
|-|---|---|
|  id |   | id|
 -| artist_id |
  | note_str  |
   ---

you now have a list of notes by artist_id.
You typically won't have a screen that doesn't have an Artist context
to be adding a note to. (or to remove all notes from).
Of course this means more work to migrate :-(
And I don't know all possible scenarios for which you would
need the structure you gave, but it is another way around this.
It probably doesn't solve real complex scenarios either.

JAT

Dale

-Original Message-
From: administrator [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 16, 2000 6:11 AM
To: zope
Cc: administrator
Subject: Re: [Zope] MySQL and Zope struggles


I don't know if the following link can solve your problem,
but maybe it gives you an idea:
http://www.zope.org/Members/Roug/new_record_with_subrecords
(How-To: Creating a new record with subrecords in MySQL)
 Arno


 I'm struggling to migrate an application from Zope/PostgreSQL to Zope 
MySQL
 (Why ? - because I've got a kind offer of free hosting if I use 
MySQL).

 MySQL offers a limited set of features and is missing, among other 
things,
 the ability to use subqueries - so for example in PostgreSQL you can 
say

 update note set notes =dtml-sqlvar notes type=string
  where note_id =
  (select note_id from artist where dtml-sqltest artist_id 
type=int)

 and in MySQL you can't.

 If you were working in a traditional programming environment you could
 overcome this by splitting the above into two parts - a select to 
retrieve
 the value of note_id from the artist table followed by an update of 
the
 note table using the returned value of note-id.

 For example

 select note-id into note-id-var from artist where artist-id = 23;
 update note set notes = 'asdasda' where note-id = note-id-var;

 The problem is that in Zope I believe you can't use a returned value 
within
 an SQL Method,  so the above code would fail. The only way I can see 
to do
 the above is to have two separate SQL Methods, one for the select,
 returning the note-id-var and another for the update. This is very 
clumsy.

 I was wondering if anyone could tell me if there was a better way.

 Many thanks


 Richard

 Richard Moon
 [EMAIL PROTECTED]



 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )


 To: [EMAIL PROTECTED]



[Zope] Question!

2000-10-16 Thread Carlos Vasconez



Hi

I am read about zope.
Question?
I can use Zope with NT Server, IIS 4 and SQLServer 
?
I have a Database in SQLServer

Thanks

Carlos
-


Re: [Zope] how to include Flash/SWF objects in Zope website?

2000-10-16 Thread Jim Washington

N.B. You probably should add your Flash/SWF objects as "File" objects. 
DTML Method/Document objects can do amusing things with binary data, 
which is why there are "File" objects.

-- Jim Washington

J. Atwood wrote:

 You could just upload them into Zope and point to them.
 
 http://www.gotschool.com (see flash demos).
 
 It uploads as a "application/octet-stream"
 
 I am sure you are talking about much more interaction.
 
 J
 



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] Question!

2000-10-16 Thread Farrell, Troy

Yes you can.  You will need ZODBC to connect to the SQLServer.  Make sure
that SQL server is available as a "System DSN" on it's host.  You will also
need a username and password to connect.  Zope will ask you for this in the
DSN string.  Best of luck to you.

Troy
Troy Farrell
Video Operations Technician III
Williams VYVX Services
918.573.3029
918.573.1441 fax
mailto:[EMAIL PROTECTED]
http://www.williams.com


-Original Message-
From: Carlos Vasconez [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 16, 2000 6:48 AM
To: [EMAIL PROTECTED]
Subject: [Zope] Question!


Hi

I am read about zope.
Question?
I can use Zope with NT Server, IIS 4 and SQLServer ?
I have a Database in SQLServer

Thanks

Carlos
-

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] how to include Flash/SWF objects in Zope website?

2000-10-16 Thread Fred Yankowski

Thank you both for the help.  File objects are just the ticket (but it
turns out that Image objects work nearly as well).  For the record,
here's what I did:

 + create File object with id "foo_swf".
 + upload my local foo.swf file into foo_swf.
 + create DTML Method object "foo_flash" to provide all the HTML
   OBJECT and EMBED elements needed to wrap the flash object,
   referring to that flash object as 'PARAM NAME=movie VALUE="foo_swf"'
   and 'src="foo_swf"', respectively.
 + use 'dtml-var foo_flash' to display the flash object in a DTML
Document.


On Mon, Oct 16, 2000 at 02:10:03PM -0400, Jim Washington wrote:
 N.B. You probably should add your Flash/SWF objects as "File" objects. 
 DTML Method/Document objects can do amusing things with binary data, 
 which is why there are "File" objects.
 
 -- Jim Washington
 
 J. Atwood wrote:
 
  You could just upload them into Zope and point to them.
  
  http://www.gotschool.com (see flash demos).
  
  It uploads as a "application/octet-stream"
  
  I am sure you are talking about much more interaction.
  
  J

-- 
Fred Yankowski   [EMAIL PROTECTED]  tel: +1.630.879.1312
Principal Consultant www.OntoSys.com   fax: +1.630.879.1370
OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Re: Zope digest, Vol 1 #1018 - 39 msgs (I will be out of theoffice Monday, October 16th)office Monday, October 16th)

2000-10-16 Thread Darin Lee

I will be out of the office on Monday, October 16. If you require assistance, please 
contact the DEQ helpdesk at 241-7495.






___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] What's the status of ZEO?

2000-10-16 Thread Oliver Sturm

Hi,

is there any information available about the general usability of ZEO?
Mainly  stability is interesting to me, feature completeness is not so
important.

MfG, 
Oliver Sturm

-- 
Who is General Failure and why is he reading my disk?
-- 
Oliver Sturm / [EMAIL PROTECTED]

Key ID: 71D86996
Fingerprint: 8085 5C52 60B8 EFBD DAD0  78B8 CE7F 38D7 71D8 6996



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Medusa Monitor

2000-10-16 Thread Karl Anderson

Terry Kerr [EMAIL PROTECTED] writes:

 I don't think the monitor gives you any advantage?  I have never used a ptyhon 
prompt before...I will have to give it a go.
 
 terry

Actually, the advantage of the monitor is that it runs in the same
process as your server, so you can track resource issues.  Mounting
the database separately avoids this.

-- 
Karl Anderson  [EMAIL PROTECTED]

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] how to include Flash/SWF objects in Zope website?

2000-10-16 Thread Bob Corriher

Hi Fred,

We use Flash in most of the sites we develop with Zope. We just upload
the swf file into a File object and call it from the index_html method
as follows:

HTML
HEAD
TITLEsplashpage/TITLE
/HEAD
BODY bgcolor="#FF"
!-- URL's used in the movie--
!-- text used in the movie--
CENTER
OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-44455354"
 codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"

 ID=splashpage WIDTH=550 HEIGHT=400
 PARAM NAME=movie VALUE="splashpage.swf" PARAM NAME=loop VALUE=false
PARAM NAME=quality VALUE=high PARAM NAME=bgcolor VALUE=#FF
EMBED src="splashpage.swf" loop=false quality=high bgcolor=#FF
WIDTH=550 HEIGHT=400 TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"/EMBED

/OBJECT
/CENTER
/BODY
/HTML

The File object is named splaspage.swf, but the extension is not
necessary. It could have been called splashpage or anything else.

Hope this helps.


Bob Corriher
P-Wave Inc.


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Zope Discussion Forum @ DevShed.com

2000-10-16 Thread J. Atwood

I am more than happy to set up a ZUBB somewhere as well. A sort of Zope
starter, question and/answer forum. Is this something that the community is
generally interested in or not?

J

 From: "Peter Bengtsson" [EMAIL PROTECTED]
 Date: Mon, 16 Oct 2000 20:19:09 +0100
 To: "J. Atwood" [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [Zope] Zope Discussion Forum @ DevShed.com
 
 here here! 
 
 I definitly agree! Forum's are much easier to categorize and browse for
 answers than the mailing list.
 Categorization should be per subject, not per experience.
 
 If Zope.org doesn't want to set one up, then let the best man win. (i.e. make
 it fast)
 
 
 
 http://www.devshed.com/cgi-bin/ubb/forumdisplay.cgi?action=topicsforum=Zope
 number=10DaysPrune=60LastLogin=
 
 I found this awhile ago and it has been pretty inactive (until last week
 when I started posting.. :) ). It would be great to see some of the list
 subscribers here and other members of the Zope community get involved. It is
 something that I think is much needed on Zope.org (A bulletin board
 system... I am SURE that I could suggest one!) as it helps Newbies and
 provides a more solid, long lasting and manageable discussion.
 
 Maybe something for ZDP if not for Zope.org.
 
 Comments? Suggestions?
 
 Thanks,
 J
 
 
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )
 
 
 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] About your ShareWare

2000-10-16 Thread aschneider


As a Shareware Author, you should be listing your files on FileMine... it's fast, easy 
and free!

This Week's Most Popular file, Bugtoaster 1.0.00.2710 BETA, has been downloaded 17331 
times! There's no reason this can't be your file - use the link below to add it now:

http://www.filemine.com/AddYourFiles

(This is a one time email and serves as a reminder only. You will not receive any 
further emails from us or anyone affiliated with us again.)

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] test

2000-10-16 Thread Jens Grewen






Re: [Zope] Zope Discussion Forum @ DevShed.com

2000-10-16 Thread Bak @ kedai

On Tuesday 17 October 2000 09:57, J. Atwood wrote:
 I am more than happy to set up a ZUBB somewhere as well. A sort of Zope
 starter, question and/answer forum. Is this something that the community is
 generally interested in or not?

 J


i would think that having a forum at Zope.org or zdp.org is great.  this way 
we can really show how zope scales, and improve and show zope products.  if 
the board is at zope.org/zdp, then i would think most zopistas will be around 
to answer.  forum is unlike mailing lists.  you need that extra click to go 
to a forum. 

my .02 

-- 

http://www.kedai.com.my/kk 
http://www.kedai.com.my/eZine 

Get the tables!


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] I want to use html_quote as a function

2000-10-16 Thread Kapil Thangavelu

Hello,


"Ryan M. Dolensek" wrote:
 
 try...
 
 dtml-call
 "REQUEST.set('htmldesc',utils.httpEscapedString(REQUEST['description']))"


huh??, what is this, i'm not aware of anything resembling this being in
zope's core, i think you are using some type of custom lib. if not i'd
like to hear about it?

 ryan
 
 Soren Roug wrote:
 
  Hi,
 
  I can render text that potentially has html in it safely with
 
  dtml-var description html_quote
 
  but what if I want to assign the quoted result to another variable.
 
  I tried
 
  dtml-call "REQUEST.set('htmldesc',html_quote(REQUEST['description']))"
 
  It didn't work. How do I solve this problem?

the html_quote of dtml-var is done on rendering so you really can't
capture the variable in a transformed state. 

the solution is to roll your own pythonmethod. here's one to the trick.


html_encode ttw python method
PARAMETERS: text

BODY
string = _.string

character_entities={"''":"amp;","":"lt;",
"''":"gt;","\213": 'lt;',
   
"\233":'gt;','"':"quot;"}  
text=str(text)
for re,name in character_entities.items():
if string.find(text, re) = 0:
text=string.join(string.split(text,re),name)
return text
/END BODY


so for your example you would do

dtml-call "REQUEST.set('htmldesc', html_encode(description))"

qualifying description if you need to.


cheers

kapil

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] new LocalFS release: 0.9.6

2000-10-16 Thread Jonothan Farr

Changes v0.9.6

 - Fixed saving large File and Image objects.

 - Added ZCatalog support.

http://www.zope.org/Members/jfarr/Products/LocalFS/

--jfarr



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Newbie question : ZopeTime permissions

2000-10-16 Thread Manuel Amador (Rudd-O)


access contents information
I guess.
Aaron Straup Cope wrote:
Hi,
My name is Aaron.
I am trying to set up zope with (atleast) three roles : manager, admin,
user.
I'd like to give the last two the bare minimum Security permissions
possible and adding them as needed later on.
My problem is that I can't seem to figure out, specifically, which
permissions to give a user that will allow them to read ZopeTime().
(see below)
For the admin user, I have set the Access content information and View
*
options globally. I've tried guessing at some others, but there are
alot
of possible combinations to try so I thought maybe I would just ask.
Related, is there a detailed description of the default Security
settings? I've checked the mailing lists and the Zope docs and if it's
there, I guess I missed it.
Thanks,
dtml-call "REQUEST.set('ts', ZopeTime())">
dtml-call "REQUEST.set('foo',_.str(_.int(ts)))">
dtml-var foo>
Traceback (innermost last):
 File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line
222, in
publish_module
 File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line
187, in
publish
 File /usr/local/zope.old/lib/python/Zope/__init__.py, line 221,
in
zpublisher_exception_hook
 (Object: Traversable)
 File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line
171, in
publish
 File /usr/local/zope.old/lib/python/ZPublisher/mapply.py, line
160, in
mapply
 (Object: test)
 File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line
112, in
call_object
 (Object: test)
 File /usr/local/zope.old/lib/python/OFS/DTMLDocument.py, line
177, in
__call__
 (Object: test)
 File /usr/local/zope.old/lib/python/DocumentTemplate/DT_String.py,
line
528, in __call__
 (Object: test)
 File /usr/local/zope.old/lib/python/DocumentTemplate/DT_Util.py,
line
337, in eval
 (Object: REQUEST.set('ts', ZopeTime()))
 (Info: REQUEST)
 File string>, line 0, in ?
NameError: (see above)
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev
)

--
Manuel Amador (Rudd-O)



Re: [Zope] DTML Method not working

2000-10-16 Thread Manuel Amador (Rudd-O)


dtml-with "PARENT[0]">
dtml-tree>
Phil Harris wrote:
Is the code you used in a DTML Method or a DTML Document?
Is it in a DTML Method being called from a DTML Document?
If the answer to either of these is 'yes' then it's doing as you ask!
The thing that gets most new zope users is that a DTML Document is itself
a
container. This means that anytime you use code similar to yours
or when
using a dtml-tree ...> it will probably return a blank, as the
DTML
Dopcument has no children(?!?).
Solutions:
1. Try moving the code into a DTML Method.
2. Use a dtml-with around it.
The second one works most places but if in the root then it's slightly
more
difficult as the top object is hard to reference (please someone tell
me I'm
wrong here).
You could try something like:
dtml-with expr="resolve_url(BASE0+'/')">
ul>
dtml-in expr="objectValues('Folder')">
li>a href="dtml-absolute_url;">dtml-var title_or_id>/a>br>/li>
/dtml-in>
/ul>
/dtml-with>
The resolve_url(BASE0+'/') should give you a reference to the top Zope
object (root).
hth
Phil
[EMAIL PROTECTED]
- Original Message -
From: "Ronald L. Chichester" [EMAIL PROTECTED]>
To: [EMAIL PROTECTED]>
Sent: Sunday, October 08, 2000 8:58 PM
Subject: [Zope] DTML Method not working
> I took some code that was in the (work-in-progress) O'Riley book on
> Zope. In that example, then had a DTML Method used for identifying
> folders and hyperlinking to them. The code is as follows:
>
> ul>
> dtml-in expr="objectValues('Folder')">
> li>a href="dtml-absolute_url;">dtml-var title_or_id>/a>br>/li>
> /dtml-in>
> /ul>
>
> The problem is, it doesn't work. I know the method is being
invoked
> because there is some other text that is indeed being inserted.
> Moreover, there are sub-folders in the folder that calls the method.
>
> Does anyone know what the problem is? Is it a permission issue.
The
> standard_html_header and _footer, show up just fine, along with logos
> and such. The only part that isn't showing up is the stuff
that was
> supposed to be generated by the dtml-in> block.
>
> Any hints?
>
> Thanks in advance.
>
> Ron
> ./.
>
>
> ___
> Zope maillist - [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev
)
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev
)

--
Manuel Amador (Rudd-O)



Re: [Zope] Socket.error problem

2000-10-16 Thread Manuel Amador (Rudd-O)


user processes cannot bind to ports lower than 1024. Never forget
dat.
"Ronald L. Chichester" wrote:
I'm getting the exact same socket.error message that
appeared on this
list in March, 2000. (See the attached problem.txt file.)
Specifically, this is the error message that I get when I start zope.
The person who kindly identified the problem didn't provide a solution.
I have my netstat -a results attached as netstat.txt. Could someone
tell me how I can resolve this port conflict?
Incidentally, I'm using Mandrake 7.1 in a fairly standard configuration.
Thanks in advance,
Ron
./.
This is the reply that was provided to the first person who encountered
this problem (and submitted it to the list):
MESSAGE>
You have another process that is "bind" to port 98...
this is the registered port for "tacnews".
try "netstat -a" under the shell...
- Message d'origine -
De : Ulf Byskov [EMAIL PROTECTED]>
 : [EMAIL PROTECTED]>
Envoy : lundi 13 mars 2000 11:28
Objet : [Zope] socket problem
> When I try to start Z Server i get the following error messages:
>
> File
>
"/WWW/Docs/product_development/teams/AMD_framework/dev/Zope/ZServer/medusa/a
syncore.py",
> line 205, in bind
> return self.socket.bind (addr)
> socket.error: (98, 'Address already in use')
>
>
> I don't use the number 98 in any address or port (http=80, ftp=''
and
> monitor='')
> so what could this error be about ?
>
>
>
/MESSAGE>
 
[nobody@localhost Zope-2.2.2-linux2-x86]$ ./start
--
2000-10-08T-5:31:03 PROBLEM(100) ZServer Computing default hostname
--
2000-10-08T-5:31:03 INFO(0) ZServer Medusa (V1.16.4.3) started at Sun
OCt 8 00:31:03 2000
 Hostname: localhost.localdomain
 Port:8080
Traceback (innermost last):
 File ?/usr/local/Zope-2.2.2-linux2-x86/z2.py?,
line 634, in ?

logger_object=lg)
 File "/usr/local/Zope-2.2.2-linux2-x86/ZServer/FTPServer.py?,
line 619, in __init__

apply(ftp_server.__init__, (self, None) + args, kw)
 File ?/usr/local/Zope-2.2.2-linux2-x86/ZServer/medusa/ftp_server.py?,
line 725, in
__init__ self.bind ((self.ip, self.port))
 File ?/usr/local/Zope-2.2.2-linux2-x86/ZServer/medusa/asyncore.py?,
line 242, in bind
return self.socket.bind (addr)
socket.error: (98, ?Address already in use?)
 
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address
Foreign Address State
tcp 0
0 *:6000
*:*
LISTEN
tcp 0
0 *:3053
*:*
LISTEN
tcp 0
0 *:8021
*:*
LISTEN
tcp 0
0 *:postgres
*:*
LISTEN
tcp 0
0 *:www
*:*
LISTEN
tcp 0
0 *:smtp
*:*
LISTEN
tcp 0
0 *:printer
*:*
LISTEN
tcp 0
0 *:pop3
*:*
LISTEN
tcp 0
0 *:telnet
*:*
LISTEN
tcp 0
0 *:ftp
*:*
LISTEN
tcp 0
0 *:auth
*:*
LISTEN
tcp 0
0 *:sunrpc
*:*
LISTEN
udp 0
0 *:xdmcp
*:*
udp 0
0 *:sunrpc
*:*
raw 0
0 *:icmp
*:*
7
raw 0
0 *:tcp
*:*
7
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type
State I-Node Path
unix 1 [ ]
STREAM CONNECTED 26342
@00d9
unix 0 [ ACC ]
STREAM LISTENING 1402
public/showq
unix 0 [ ACC ]
STREAM LISTENING 1398
private/smtp
unix 0 [ ACC ]
STREAM LISTENING 1389
private/bounce
unix 0 [ ]
STREAM CONNECTED 194
@001d
unix 1 [ ]
STREAM CONNECTED 26259
@00cb
unix 0 [ ACC ]
STREAM LISTENING 2816
/var/run/pcgi.soc
unix 0 [ ACC ]
STREAM LISTENING 1406
private/error
unix 9 [ ]
DGRAM
382 /dev/log
unix 0 [ ACC ]
STREAM LISTENING 2792
/tmp/.font-unix/fs-1
unix 0 [ ACC ]
STREAM LISTENING 1687
/dev/gpmctl
unix 0 [ ACC ]
STREAM LISTENING 1410
private/local
unix 0 [ ACC ]
STREAM LISTENING 1414
private/cyrus
unix 1 [ ]
STREAM CONNECTED 26267
@00ce
unix 1 [ ]
STREAM CONNECTED 26253
@00c8
unix 0 [ ACC ]
STREAM LISTENING 2848
/tmp/.X11-unix/X0
unix 0 [ ACC ]
STREAM LISTENING 1418
private/uucp
unix 1 [ ]
STREAM CONNECTED 26269
@00cf
unix 0 [ ACC ]
STREAM LISTENING 1422
private/ifmail
unix 1 [ ]
STREAM CONNECTED 26263
@00cc
unix 0 [ ACC ]
STREAM LISTENING 1427
private/bsmtp
unix 1 [ ]
STREAM CONNECTED 26265
@00cd
unix 1 [ N ]
STREAM CONNECTED 26277
@00d1
unix 0 [ ACC ]
STREAM LISTENING 473
/dev/printer
unix 1 [ ]
STREAM CONNECTED 26292
@00d2
unix 0 [ ACC ]
STREAM LISTENING 26275
/tmp//kfm_501_1753localhost.localdomain_0
unix 1 [ ]
STREAM CONNECTED 26247
@00c6
unix 1 [ ]
STREAM CONNECTED 26177
@00b5
unix 1 [ N ]
STREAM CONNECTED 26271
@00d0
unix 1 [ ]
STREAM CONNECTED 26180
@00b6
unix 0 [ ACC ]
STREAM LISTENING 1378
private/cleanup
unix 1 [ ]
STREAM CONNECTED 26312
@00d5
unix 0 [ ACC ]
STREAM LISTENING 1385
private/rewrite
unix 0 [ ACC ]
STREAM LISTENING 26273
/tmp//kio_501_1753localhost.localdomain_0
unix 0 [ ACC ]
STREAM LISTENING 2749
/tmp/.s.PGSQL.5432
unix 0 [ ACC ]
STREAM LISTENING 1393
private/defer
unix 0 [ ]
DGRAM
26354
unix 1 [ ]
STREAM CONNECTED 26343
/tmp/.X11-unix/X0
unix 1 [ ]
STREAM CONNECTED 26313
/tmp/.X11-unix/X0
unix 1 [ N ]
STREAM CONNECTED 26293
/tmp/.X11-unix/X0
unix 1 [ ]
STREAM CONNECTED 26278
/tmp/.X11-unix/X0
unix 1 [ 

Re: [Zope] Zope in Windows is faster than Linux ???

2000-10-16 Thread Manuel Amador (Rudd-O)


which publications?
it sounded like  dunno, if there is a publication that dares to
say that, they ARElying.
knight wrote:
> Don't you all Zope mailinglist participants think
that Aitor Grajal owe us all an excuse in the form of a NEW TEST with the
Win32 ZServer running properly?
> ;-)
> Especially to all Linux supporters for the badwill of the emails
title.
>
> I would really be interested in its correct results.
>
> Cheers everyone
Especially with all this press I've seen in publications over the last
month or two regarding Windows 2000 is outperforming *nix. (over my
dead
_dead_ body)
Knight
>
> > > Failed requests: 137
> >
> > No - look at your results. Every request failed on the win32
> > box (and they all succeeded on linux). You have some sort of
> > problem in your windows setup, and you'll always get higher
> > throughput for errors than you can for completed requests...
> >
> >
> > Brian Lloyd [EMAIL PROTECTED]
> > Software Engineer 540.371.6909
> > Digital Creations http://www.digicool.com
> >
> >
> >
> > ___
> > Zope maillist - [EMAIL PROTECTED]
> > http://lists.zope.org/mailman/listinfo/zope
> > ** No cross posts or HTML encoding! **
> > (Related lists -
> > http://lists.zope.org/mailman/listinfo/zope-announce
> > http://lists.zope.org/mailman/listinfo/zope-dev
)
> >
>
>
> ___
> Zope maillist - [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev
)
>
>
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev
)

--
Manuel Amador (Rudd-O)



Re: [Zope] security quickie

2000-10-16 Thread Manuel Amador (Rudd-O)


I too have a doubt about security stuff.
It so happens that I have this setup
rootfolder
+ myfolderobjects
 + inheritedstuff
i have an user X in root folder. Roles are so that anonymous doesn't
have permission for anything. Then, there is a user role, that
is allowed some stuff, and i assign local role of User to X into Inheritedstuff.
He now can see index_html. I proxy-role index_html to the User role
so i can dtml-var somestuff> that is into myfolderobjects, being
somestuff a DTMLmethod.
It works. X can access index_html which in turn includes somestuff
from its parent folder, and I did not have to give him explicit rights
to any of the objects into myfolderobjects

BUT, if I try to dtmlvar somesqlmethod>, it won't work. Note
that the User role does have permission to run SQL methods.
That's in my point of view, a mistake in Zope's security policy.
If i proxy-role a document or method, i should be able to acquire anything
specified into it, from its parent hierarchy.
Please help or tip. Thanks =)

Seb Bacon wrote:
Does Zope security provide a way of restricting what
objects are listed to
an authenticated user inside the Zope 'manage' interface? I'm
getting my
head all twisted up over this security / proxy roles /local roles lark.
Thanks, seb
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev
)

--
Manuel Amador (Rudd-O)



Re: [Zope] Zope in Windows is faster than Linux ???

2000-10-16 Thread Manuel Amador (Rudd-O)


I feel zserver somewhat dumber on windows 95 than on linux. a p200
machine with windows 95 is considerably slower inrentering pages than a
p166 with linux.

Toby Dickenson wrote:
On Sat, 07 Oct 2000 01:57:40 +0200, "Ansgar W. Konermann"
[EMAIL PROTECTED]> wrote:
>Definitely, yea!
>
>> I would really be interested in its correct results.
We have been stress testing our Zope application on NT and Linux. Our
conclusion is that OS is not a factor in Zope performance.
Toby Dickenson
[EMAIL PROTECTED]
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev
)

--
Manuel Amador (Rudd-O)



Re: [Zope] Animated GIFs

2000-10-16 Thread Manuel Amador (Rudd-O)


correct me if i'm wrong, but the repeat attribute is IN the gif file.
that means zope is mangling the file.
try creating the image as a file changing its mimetype and referrring
it outside zope via an HTML page, to see if that's the case.

Lars Heber wrote:
Peter Bengtsson schrieb:
> [Just checking.]
> Have you tried to acctually _use_ the animated gif in context with
other HTML?
> I have experienced problem some single time with images (can't remember
what the problem/image was) viewed directly from the View management tab.
>
> Excuse the childish suggestion.
Any help is appreciated!!!
I tried your suggestion. The animGif works fine with every kind of HTML.
I really think it's a Zope problem.
Also the gif downloaded from Zope works with HTML outside Zope.
The following doesn't work as well:
Refer to the gif situated on your Zope server from a HTML file outside
Zope. - Same problem...
html>
head>title>the title/title>/head>
body>img src="http://localhost:8080/animGif">/body>
/html>
I also tried to name the animGif explicitely animGif.gif instead of
animGif - guessed what? - same problem!
Any more ideas, please?
Thanks.
Lars
> - Original Message -
> From: "Lars Heber" [EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]>
> Sent: Friday, October 06, 2000 3:24 PM
> Subject: [Zope] Animated GIFs
>
> > Hi there,
> >
> > I've got a strange problem.
> >
> > I want to upload an animated GIF to my Zope, but when I want to
view it,
> >
> > animation stops at the last frame instead of looping indefinitely.
> >
> > When not uploaded to Zope, the animation works fine,
> > also, when I download the GIF by rightclick from a Zope site and
view
> > it again outside Zope, it works perfectly!
> >
> > What's going on here??? Any ideas?
> >
> > PS.: The content_type is image/gif.
> > Do animGifs have
another one? Just an idea...
>
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev
)

--
Manuel Amador (Rudd-O)



Re: [Zope] How: /foo?var=bar equiv to /foo/bar

2000-10-16 Thread Manuel Amador (Rudd-O)


Question marks are used for GETmethods. I think that if you're
trying to make a form send you to another page without question marks,
you'd have to use POST method in the form.
Heymann William wrote:
I am trying to get rid of those question marks in
my urls since it
seems to confuse the users but I am not sure really how to do that.
I have
heard that it can but done but so far I have not found out how it can
be
done. I want for the last piece of the url to be assigned to the varialbe
if a valid object can not by found. I don't really have a problem if
this
involves python coding I just need a place to start.
Thanks
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev
)

--
Manuel Amador (Rudd-O)



Re: [Zope] zope 2.2.2 not compiling

2000-10-16 Thread Manuel Amador (Rudd-O)


I think you need the cygwin development environment. Or there is
a zip around, called UnxUtils.zip. do a google search and get it.
Lace its contents into a folder in your PATH.
Roland Tepp wrote:
Hi. I downloaded Zope 2.2.2 source and I am trying
to compile it on
WinNT to run without pcgi and it fails (console output following this
letter).
I tried to track down the problem but I don't seem to make any progress.
Could You help me please...
--
Compiling python modules
--
Building extension modules

Compiling extensions in lib/python
cp D:\Python/lib/python/config/Makefile.pre.in .
The name specified is not recognized as an
internal or external command, operable program or batch file.
Traceback (innermost last):
 File "D:\Python\Zope-2.2.2\wo_pcgi.py", line 116, in ?
 if __name__=='__main__': main(sys.argv[0])
 File "D:\Python\Zope-2.2.2\wo_pcgi.py", line 104, in main
 import build_extensions
 File "D:\Python\Zope-2.2.2\inst\build_extensions.py", line 96,
in ?
 make('lib','python')
 File "D:\Python\Zope-2.2.2\inst\do.py", line 135, in make
 do("cp %s ." % wheres_Makefile_pre_in())
 File "D:\Python\Zope-2.2.2\inst\do.py", line 104, in do
 if i and picky: raise SystemError, i
SystemError: 1
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev
)

--
Manuel Amador (Rudd-O)