Re: [Zope] NEWBIE: assign next free ID automatically
Hi, it is not tested but may it works = newid"> Your new id is: 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 > ;-). > 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 )
Re: [Zope] Fw: mysqldb
- Original Message - From: "jensebaer" <[EMAIL PROTECTED]> To: "Dale Lance" <[EMAIL PROTECTED]> Sent: Friday, October 13, 2000 2:43 PM Subject: Re: [Zope] Fw: mysqldb > Hi Dale, > > put this in your setup or/and setup.in file under > ../lib/python/Products/ZMySQLDA/MySQLdb-0.1.2/ > > *shared* > # Only one line should be uncommented. > # Adjust -L and -I as necessary for your local configuration. > # If you have dynamic MySQL libraries, they will need to be on your > # LD_LIBRARY_PATH at runtime. > _mysql _mysqlmodule.c -L/usr/lib/mysql -I/usr/include/mysql -lmysqlclient > # Uncomment for Windows > #_mysql > _mysqlmodule.c -L/mysql/lib/opt -I/mysql/include -lmysqlclient -lwsock32 > > > or may _mysql > _mysqlmodule.c -L/usr/local/lib/mysql -I/usr/local/include/mysql -lmysqlclie > nt > > Jens > > - Original Message - > From: "Dale Lance" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, October 13, 2000 1:59 PM > Subject: [Zope] Fw: mysqldb > > > > Hi, > > I am trying to build ZMySQLDA 1.20 > > mysql has been built successfully on RedHat 7.0 and resides in > > /usr/local/mysql > > I have followed the instructions for editing /etc/ld/so/conf adding > > /usr/local/mysql/lib/mysql > > /usr/local/mysql/lib > > /usr/local/mysql > > to it. (just tomake sure) > > yet I still get the following error > > anyone know where mysqlclient is supposed to be? > > > > Dale > > > > > > > gcc -shared _mysqlmodule.o -L/usr/local/mysql/lib -lmysqlclient -o > > > _mysqlmodule.so > > > /usr/bin/ld: cannot find -lmysqlclient > > > collect2: ld returned 1 exit status > > > make: *** [_mysqlmodule.so] Error 1 > > > Traceback (innermost last): > > > File "build.py", line 14, in ? > > > import MySQLdb > > > File "MySQLdb.py", line 19, in ? > > > from _mysql import * > > > ImportError: No module named _mysql > > > > > > > > > > > > > > ___ > > 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] Sorry LocalFS manage_addLocalFS not manage_addFolder
Sorry I want to write manage_addLocalFS not manage_addFolder Hi all, I want to create an LocalFS object. I use but that doesn´t work. Simular to that works Error Type: NameError Error Value: manage_addLocalFS Traceback (innermost last): File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 179, in publish File /home/zope/Zope-2.1.6-src/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook (Object: ElementWithAttributes) File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 165, in publish File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: addlocalfs) File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: addlocalfs) File /home/zope/Zope-2.1.6-src/lib/python/OFS/DTMLMethod.py, line 150, in __call__ (Object: addlocalfs) File /home/zope/Zope-2.1.6-src/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: addlocalfs) File /home/zope/Zope-2.1.6-src/lib/python/DocumentTemplate/DT_Util.py, line 335, in eval (Object: manage_addLocalFS('localfsfolder', 'title', '/home/zope')) (Info: manage_addLocalFS) File, line 0, in ?NameError: (see above) Thanks Jens
[Zope] LocalFS manage_addFolder solution?
Hi all, I want to create an LocalFS object. I use but that doesn´t work. Simular to that works Error Type: NameError Error Value: manage_addLocalFS Traceback (innermost last): File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 179, in publish File /home/zope/Zope-2.1.6-src/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook (Object: ElementWithAttributes) File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 165, in publish File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: addlocalfs) File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: addlocalfs) File /home/zope/Zope-2.1.6-src/lib/python/OFS/DTMLMethod.py, line 150, in __call__ (Object: addlocalfs) File /home/zope/Zope-2.1.6-src/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: addlocalfs) File /home/zope/Zope-2.1.6-src/lib/python/DocumentTemplate/DT_Util.py, line 335, in eval (Object: manage_addLocalFS('localfsfolder', 'title', '/home/zope')) (Info: manage_addLocalFS) File, line 0, in ?NameError: (see above) Thanks Jens
[Zope] LocalFS manage_addFolder solution?
Hi all, while searching for a solution to add a folder to LocalFS, I found this message: __ > Folder creation isn't really supported in LocalFS at the moment. Very > low level support is there (module function _save_Folder) but it's not > intended to be called externally and there doesn't seem to be any path > to call it. There is certainly not a local definition of> manage_addFolder in LocalDirectory. This is on my list of stuff to do > for our site, but I don't know if it's on Jonothan's list for the real> product.It is. It's hard. I'm going to need some help with this one, I'm afraid.--jfarr__ My question: Is there now a solution to perfom manage_addFolder to LocalFS? Thank You Jens
[Zope] How to change Unauthorized error message?
Hi all, I want to give out another error message (not the standard error message) when logging was without success. Zope Error Zope has encountered an error while publishing this resource. UnauthorizedYou are not authorized to access this resource. No Authorization header found. Traceback (innermost last): File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 179, in publish File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 151, in publish File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/BaseRequest.py, line 446, in traverse File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/HTTPResponse.py, line 551, in unauthorized Unauthorized: (see above) Troubleshooting Suggestions The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. how can I mange this. I tryed it with the standard_error_message: but that doesen´t work. Any ideas? Jens
[Zope] How to change Unauthorized error message?
Hi all, I want to give out another error message (not the standard error message) when logging was without success. Zope Error Zope has encountered an error while publishing this resource. UnauthorizedYou are not authorized to access this resource. No Authorization header found. Traceback (innermost last): File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 179, in publish File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 151, in publish File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/BaseRequest.py, line 446, in traverse File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/HTTPResponse.py, line 551, in unauthorized Unauthorized: (see above) Troubleshooting Suggestions The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. how can I mange this. I tryed it with the standard_error_message: but that doesen´t work. Any ideas? Jens
[Zope] How to change Unauthorized error message?
Hi all, I want to give out another error message (not the standard error message) when logging was without success. Zope Error Zope has encountered an error while publishing this resource. UnauthorizedYou are not authorized to access this resource. No Authorization header found. Traceback (innermost last): File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 179, in publish File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 151, in publish File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/BaseRequest.py, line 446, in traverse File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/HTTPResponse.py, line 551, in unauthorized Unauthorized: (see above) Troubleshooting Suggestions The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. how can I mange this. I tryed it with the standard_error_message: but that doesen´t work. Any ideas? Jens
[Zope] String manipulation
Hi all, how can I manage it to cut a string. for example: a string property (testtext) with 500 words. but only want to give out 20 characters of tis text. Thank you Jens
[Zope] Re: Upload on a local File System
Hi Francois, try this: upload_image_form - File upload_image - - Jens - Original Message - From: Spicklemire, Jerry <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, August 08, 2000 5:08 PM Subject: [Zope] Upload on a local File System > Francois wrote: > > >Hi, I d like to upload on a Local File System. I would like to use a > >form, choose a file and i d like that Zope upload the file on the > >LocalFS. I ve met some troubles, could you help me? > > See Jonathan Farr's LocalFS product, which now (since v.0.8.1) allows > file uploads to the local file system. > > http://www.zope.org/Members/jfarr/Products/LocalFS > > Later, > Jerry S. > > > ___ > 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] Still Problem with LocalFS
- Original Message - From: jensebaer <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, June 24, 2000 6:52 PM Subject: Re: [Zope] Re: Problem with LocalFS Ok now I placed the dtml files (savefile.dtml upload.dtml) in the LocalFS Folder but the problem is still the same: When I use manage_addImage (now from inside LocalFS) the new image is created in the folder above. I don´t no how but there must be a way to add an Image to LocalFS by using another addimage form then the given. My I have to use another manage function? Or is there a special sytax to do this? You wrote that it works from inside LocalFS so may you can give me an example. Thank you Jens - Original Message - From: Jonothan Farr <[EMAIL PROTECTED]> To: jensebaer <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, June 23, 2000 2:35 AM Subject: [Zope] Re: Problem with LocalFS This is a known problem with LocalFS. The only workaround I know of is to put your dtml code into a file, give it a .dtml extension, and place it in the directory you want to upload to. This problem will be addressed in the next version of LocalFS. --jfarr "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998 - Original Message - From: jensebaer <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 22, 2000 5:23 PM Subject: [Zope] Problem with LocalFS Hello, I want to upload files to LocalFS. I created a LocalFS with the id: images I don´t want to use the existing addImageForm to create a new Image in the LocalFS. I want to use two DTML Methods uploadform File but this do not create a new image in the LocalFS. It creates an image in the Folder in which the the LocalFS exists. I do not understand why Jens ___ 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] Re: Problem with LocalFS
Ok now I placed the dtml files (savefile.dtml upload.dtml) in the LocalFS Folder but the problem is still the same: When I use manage_addImage (now from inside LocalFS) the new image is created in the folder above. I don´t no how but there must be a way to add an Image to LocalFS by using another addimage form then the given. My I have to use another manage function? Or is there a special sytax to do this? You wrote that it works from inside LocalFS so may you can give me an example. Thank you Jens - Original Message - From: Jonothan Farr <[EMAIL PROTECTED]> To: jensebaer <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, June 23, 2000 2:35 AM Subject: [Zope] Re: Problem with LocalFS This is a known problem with LocalFS. The only workaround I know of is to put your dtml code into a file, give it a .dtml extension, and place it in the directory you want to upload to. This problem will be addressed in the next version of LocalFS. --jfarr "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998 - Original Message - From: jensebaer <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 22, 2000 5:23 PM Subject: [Zope] Problem with LocalFS Hello, I want to upload files to LocalFS. I created a LocalFS with the id: images I don´t want to use the existing addImageForm to create a new Image in the LocalFS. I want to use two DTML Methods uploadform File but this do not create a new image in the LocalFS. It creates an image in the Folder in which the the LocalFS exists. I do not understand why Jens ___ 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] Problem with LocalFS
Hello, I want to upload files to LocalFS. I created a LocalFS with the id: images I don´t want to use the existing addImageForm to create a new Image in the LocalFS. I want to use two DTML Methods uploadform File and send the data to: savefile but this do not create a new image in the LocalFS. It creates an image in the Folder in which the the LocalFS exists. I do not understand why Jens
[Zope] How can I upload files to mySQL
Hello, I am using Zope and mySQL and want to load up text and Images to text or blob fields. How can I upload file content to TEXT (plain text) and BLOB (images: jpg, gif) using DTML? Thanks Jens