[Zope] What's up with MySQL and Zope?
What's up with MySQL and Zope? Now there are four different products that are related to MySQL and Zope. Which one should I use? Some don't even look like DA's for zope. Why are these listed in Zope's product page anyway? Why can't they all get coordinated? Jason __ Do You Yahoo!? Yahoo! Photos - Share your holiday photos online! http://photos.yahoo.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] Building from Source
--- Ben Ocean [EMAIL PROTECTED] wrote: Hi; One of the add-on programs I want to include (ZMySQLdb) requires I rebuild Zope from the src-tgz distro. I've tried to do this but get this error: gzip: stdin: invalid compressed data--crc error tar: Child returned status 1 tar: Error exit delayed from previous errors Now, I *was* supposed to upload it as an ASCII file, right? If that's so, can someone please explain to me what I'm doing wrong? TIA, BenO oops, don't download as ascii if its a tar.gz file try binary mode instead could also be a corrupted download, try it again jason ___ 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 ) __ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.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] PIL problem
--- Luc Tonin [EMAIL PROTECTED] wrote: thx for your help but i don t find the font files ( courR14.pil and courR14.bpm) !!! Sorry for the late reply, I don't check this list until after work. If you have X windows and you have fonts in the bdf or pcf format you can use the script that comes with PIL called pilfont.py to create fonts. Also, I took a few of my fonts, formatted them, zipped em up, and put them in my zope.org member folder. a href="http://www.zope.org/Members/byron/fonts.tar.gz"http://www.zope.org/Members/byron/fonts.tar.gz/a hope this helps. Jason - Message d'origine ----- De : Jason Byron [EMAIL PROTECTED] À : Luc Tonin [EMAIL PROTECTED] Cc : [EMAIL PROTECTED] Envoyé : mercredi 13 décembre 2000 07:10 Objet : Re: [Zope] PIL problem --- Luc Tonin [EMAIL PROTECTED] wrote: well i m still trying to insert some text in a gif image using PIL but what should i do??? using da PSDraw class?? does anybody have an id ?? thx by advance I recently got that working for me by doing a few tricky things: created a directory in Extensions called "BDF" and put the font files (courR14.pil an courR14.pbm) in there. (make sure that dir is zope readable) then add ImageFont to your PIL init script. (kind of like the file replacement in ZPhoto does) then in your external method and the import statement for the fonts. (in mine I did "import PIL.ImageFont") and then I experimented around and got the following code to setup the font stuff: wd = os.environ['PYTHONHOME'] wd_ext = wd + '/Extensions' wd_ext_bdf = wd_ext + '/BDF' sys.path[:0] = [wd_ext] # prepend the font path sys.path[:0] = [wd_ext_bdf] font = PIL.ImageFont.load_path("courR14.pil") I put this in the global part of the external method and the rest of the methods could use fonts. (for some reason I couldn't get any other font to work. courR14 is the default in the PIL library. to change fonts you can simply save another font as the courR14 name) After that you can use fonts in your methods with: draw = PIL.ImageDraw.Draw(image) draw.text((x,y),"text to print") Hope this helps. I will *hopefully* be releasing a zope product in the near future that uses PIL fonts so you can use it as an example. Right now I'm ironing it out a little, but keep an eye out for it. I think I'm going to call it "NetMap" Jason __ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/ __ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.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] PIL problem
--- Luc Tonin [EMAIL PROTECTED] wrote: well i m still trying to insert some text in a gif image using PIL but what should i do??? using da PSDraw class?? does anybody have an id ?? thx by advance I recently got that working for me by doing a few tricky things: created a directory in Extensions called "BDF" and put the font files (courR14.pil an courR14.pbm) in there. (make sure that dir is zope readable) then add ImageFont to your PIL init script. (kind of like the file replacement in ZPhoto does) then in your external method and the import statement for the fonts. (in mine I did "import PIL.ImageFont") and then I experimented around and got the following code to setup the font stuff: wd = os.environ['PYTHONHOME'] wd_ext = wd + '/Extensions' wd_ext_bdf = wd_ext + '/BDF' sys.path[:0] = [wd_ext] # prepend the font path sys.path[:0] = [wd_ext_bdf] font = PIL.ImageFont.load_path("courR14.pil") I put this in the global part of the external method and the rest of the methods could use fonts. (for some reason I couldn't get any other font to work. courR14 is the default in the PIL library. to change fonts you can simply save another font as the courR14 name) After that you can use fonts in your methods with: draw = PIL.ImageDraw.Draw(image) draw.text((x,y),"text to print") Hope this helps. I will *hopefully* be releasing a zope product in the near future that uses PIL fonts so you can use it as an example. Right now I'm ironing it out a little, but keep an eye out for it. I think I'm going to call it "NetMap" Jason __ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.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] problem installing login manager
You need to compile the DynPersist.c file for ZPatters to work. put a "Makefile.pre.in" file in the ZPatterns directory. (there is one in the lib/python dir, but any should work) then do a "make -f Makefile.pre.in boot" and then a "make" in the ZPatterns directory. Then it should be OK. - Note: I also had to add an empty "help" directory in the PlugIns directory to keep it from complaining about registering with the help system. hope this helps Jason --- Henny van der Linde [EMAIL PROTECTED] wrote: Hi, I just installed Zope 2.2.2 and tried to install the latest version of Login Manager. It failed: LoginManager Import Traceback Traceback (innermost last): File "C:\Program Files\WebSite22\lib\python\OFS\Application.py", line 397, in import_products product=__import__(pname, global_dict, global_dict, silly) File "C:\Program Files\WebSite22\lib\python\Products\LoginManager\__init__.py", line 1, in ? import LoginManager, LoginMethods, UserSources File "C:\Program Files\WebSite22\lib\python\Products\LoginManager\LoginManager.py", line 8, in ? from Products.ZPatterns.Specialists import Specialist File "C:\Program Files\WebSite22\lib\python\Products\ZPatterns\__init__.py", line 1, in ? import Rack, Specialists, Customizers, AttributeProviders, SheetProviders File "C:\Program Files\WebSite22\lib\python\Products\ZPatterns\Rack.py", line 9, in ? from DataSkins import DataSkin File "C:\Program Files\WebSite22\lib\python\Products\ZPatterns\DataSkins.py", line 1, in ? from DynPersist import DynPersist ImportError: No module named DynPersist What 's happening? Thanks Henny van der Linde ___ 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 ) __ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.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] LoginManager and standard_html_header
LoginManager seems to append the standard_html_header to the logoutForm when authorization fails. This would normally be ok but the problem is that it uses the standard_html_header from the directory where the authorization fails and not from where the logoutForm is. Is there a way to fix this? I'm ending up with either the wrong header or multiple headers. __ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.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] LoginManager 0.8.8b1 examples/suggestions?
--- "Morten W. Petersen" [EMAIL PROTECTED] wrote: [Jason Byron] | Does anyone have any LoginManager 0.8.8b1 example | code? It almost looks like you can extend the system | using plugins, but I don't know how that's done. | Anyone else have luck doing this? If so then do you | have any examples/suggestions? Yes. After adding your LoginManager instance, you should add four methods of some sort within the UserSource object. The four methods are: userAuthenticate userExists userRoles userDomains Here's the External methods I used just to make the logins work; you'll have to implement them to fit your system: def userAuthenticate(self, REQUEST, username, password): if username == 'morten' and password == 'morten': return 1 else: return 0 def userExists(self, REQUEST, username): return 1 def userRoles(self, REQUEST, username): return 'Manager', 'Owner' def userDomains(self, REQUEST, username): return [] Hmmm, I tried implementing these functions before, but only as DTML methods: userAuthenticate dtml-return "_.int('1')" userDomains dtml-return "['']" userExists dtml-return "_.int('1')" userRoles dtml-return "['Manager']" Yet this never seemed to work. Does it not work because they are DTMLMethods and not External Methods, or because I am returning the wrong values, or because of a proxy or security setting? The Methods are in the User Sources 'folder' and I am sure I chose "GUF" authentication from the list when I added the LoginManager. Jason __ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.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] LoginManager 0.8.8b1 examples/suggestions?
Does anyone have any LoginManager 0.8.8b1 example code? It almost looks like you can extend the system using plugins, but I don't know how that's done. Anyone else have luck doing this? If so then do you have any examples/suggestions? All I want is a simple ZODB/cookie based system, but I can't get the Generic User Source to work. Thanks in advance. __ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.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] GUF, ZODB, and 2.2.2
Has anyone had luck getting GUF to work using ZODB to store the user info, and Zope version 2.2.2 (no hot fixes)? I had some code working fine in 2.2.1, but in 2.2.2 I am having lots of trouble getting GUF to work. The current implementation I have places a folder in the acl_users (GUF) folder and that is where I've put my own ZClass (representing each user) inside that folder. In a vain attempt to get it working I have made sure that there are no aquired rights in acl_users, and that anonymous has the Can Login, and Access contents rights. I've also changed all of the hooks I have and made them proxy as root. I've had trouble in the past with GUF but I've always gotten it working. Not so here. Has anyone tried this type of setup and gotten it working? __ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.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] illegal id chars?
Why is it that objects can't be created because the id chosen contains characters that aren't proper in urls? Spaces are allowed and converted to their hex values when you create an object. Why not do this with every illegal url character? I must me missing something here because this seems like this should have been one of the first things designed into Zope. Right? __ Do You Yahoo!? Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.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] GUF and manage_addGenericUserFolder not working
I try to call the function manage_addGenericUserFolder in a DTML Method but I keep getting a NameError for it. It's as if Zope can't find the definition. I'm stumped as to why it won't work in DTML. - The product is installed and not broken. - I can add GUF's under the management screen with 'Add' and everything works fine. - I've tried to make the call with all of the possible parameters but nothing helps. - manage_addUserFolder works fine. Has anyone else had this problem? I just upgraded to Zope 2.2.1 and I haven't tried an older release. Do you think this might have to do with the changes to the security model in 2.2.1? Should I use manage_clone instead? Thanks for any help, Jason __ Do You Yahoo!? Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.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] GUF and manage_addGenericUserFolder not working
--- Chris Withers [EMAIL PROTECTED] wrote: Jason Byron wrote: I try to call the function manage_addGenericUserFolder in a DTML Method but I keep getting a NameError for it. It's as if Zope can't find the definition. Try somethign like the following: dtml-with "manage_addProduct['GenericUserFolder']" dtml-call "manage_addGenericUserFolder(your, params, here)" /dtml-with cheers, Chris Hey, that worked! Thanks Chris Now, *why* does that work? The function manage_addProduct looks like its for adding new products under the Control_Panel. That isn't what it's for? I don't have to do dtml-with "manage_addProduct['OFSP']" to use manage_addUserFolder ? I noticed this in the OFSP stuff. from :lib/python/Products/OFSP/__init__.py line :153 context.registerClass( AccessControl.User.UserFolder, constructors=(AccessControl.User.manage_addUserFolder,), icon='images/UserFolder_icon.gif', legacy=(AccessControl.User.manage_addUserFolder,), ) context.registerBaseClass(AccessControl.User.UserFolder, 'User Folder') context.registerBaseClass(AccessControl.User.User) Could adding something like this to the GUF fix the problem I had and let manage_addGenericUserFolder work by itself? Jason __ Do You Yahoo!? Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.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] manage_pasteObjects() permissions?
I figured out what was wrong. I wasn't giving all of the required parameters to manage_copyObjects() and manage_pasteObjects(). Evidently for both to work they need the REQUEST parameters set. Here's the calls I got to work: COPY: dtml-call "manage_copyObjects(REQUEST['ids'],REQUEST)" -- ids are a checkbox selection from the form (ie: input type="checkbox" name="ids:list" value="dtml-id;" ) PASTE: dtml-call "manage_pasteObjects(_.None, REQUEST)" __ Do You Yahoo!? Get Yahoo! Mail Free email you can access from anywhere! http://mail.yahoo.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] manage_pasteObjects() permissions?
Can anyone tell me what permissions are required to get these copy and paste functions to work? manage_copyObjects() manage_pasteObjects() Everytime I use them I get a Copy Error with the manage_pasteObjects() function. And I am not sure the copy function is working at all. thanks, Jason __ Do You Yahoo!? Get Yahoo! Mail Free email you can access from anywhere! http://mail.yahoo.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] what permissions are required for [un]restrictedTraverse?
what permissions are required for [un]restrictedTraverse? I recently added the call to 'restrictedTraverse()' in a method and I can't get permission to use it except when I'm logged in as superuser. I need to be able to let other users use this method. How do I do that? Thanks, Jason __ Do You Yahoo!? Get Yahoo! Mail Free email you can access from anywhere! http://mail.yahoo.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] How do I detect in DTML when I'm in the management interface?
I have a ZClass that I would like to be able to create using the management interface and in DTML from the users end with the same DTML script. I believe I need something like this to get it to work: (if in management interface) dtml-call "create_my_zclass(_.None, _)" (else) dtml-with "manage_addProduct['my_zclass']" dtml-call "create_my_zclass(_.None, _, NoRedir=1)" /dtml-with and create_my_zclass has this code in it: dtml-with "my_zclass.createInObjectManager(REQUEST['id'], REQUEST)" dtml-call "propertysheets.my_zclass_info.manage_editProperties(REQUEST)" /dtml-with ... How do I create the first if else? Is there a better/easier way of doing this? __ Do You Yahoo!? Send instant messages get email alerts with Yahoo! Messenger. http://im.yahoo.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 )