Re: [Zope] XUF and Postgres
For what it's worth, I recently used the SimpleUserFolder for an application that uses Postgres as the backend. It was terrifically easy to implement authentication through Postgres via the SimpleUserFolder. It does exactly what I want without unnecessary frill or complications. Garth On 7/15/05, Dieter Maurer <[EMAIL PROTECTED]> wrote: > David Pratt wrote at 2005-7-14 20:30 -0300: > >Thanks Dieter. I was really hoping it is a good solution since it is > >the only User Folder product for Postgres that I have seen thus far. > > Chris Withers would tell you, that "Simple User Folder" can do this > as well :-) > > -- > Dieter > ___ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) > ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: How to upload a file and save it in a physical path
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Remy Pinsonnault wrote: > Maybe it is a basic question but how can I upload a file and save it > anywhere on the server's hard drive? I know how to upload a file to > zope's database but not how to save it locally... > > Anyone can help please? You might check out Chris McDonough's "Blob" product: http://plope.com/software/blob/ Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFC2Efy+gerLs4ltQ4RApRLAJ0QLSrEoBJ9t5R27T33WU4nJpNJlwCgn7SO Xt2ypnl1QmcR/O+7wDet3hU= =Uh5l -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to upload a file and save it in a physical path
Remy Pinsonnault wrote: Maybe it is a basic question but how can I upload a file and save it anywhere on the server's hard drive? I know how to upload a file to zope's database but not how to save it locally... Anyone can help please? There are several products to do this: LocalFS, ExtFile/ExtImage, ExternalFile, and more. There are other methods (like writing an External Method and using Python's file methods) as well. All of this has been discussed on this list and elsewhere, and are otherwise described on the web. --jcc -- "Building Websites with Plone" http://plonebook.packtpub.com/ Enfold Systems, LLC http://www.enfoldsystems.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] How to upload a file and save it in a physical path
Maybe it is a basic question but how can I upload a file and save it anywhere on the server's hard drive? I know how to upload a file to zope's database but not how to save it locally... Anyone can help please? Thanks in advance Remy ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] emergency user account does not work
After logging out of the ZMI, I have tried to log in as the emergency user by filling in the proper credentials. The page never loads. Could there be a tick I am missing in the security settings for the root folder/ZMI? OR is this something that has to be run via localhost from the server on which Zope is installed? Thanks, Tim Suter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XUF and Postgres
David Pratt wrote at 2005-7-14 20:30 -0300: >Thanks Dieter. I was really hoping it is a good solution since it is >the only User Folder product for Postgres that I have seen thus far. Chris Withers would tell you, that "Simple User Folder" can do this as well :-) -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: XUF and Postgres
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tino Wildenhain wrote: > Am Freitag, den 15.07.2005, 16:25 +1000 schrieb Andrew Milton: > >>+---[ Tino Wildenhain ]-- >>| Am Donnerstag, den 14.07.2005, 12:46 -0300 schrieb David Pratt: >>| > I am looking at using the ExUserFolder with Postgres. Any users of >>| > this combination that could share feedback (positive or negative) on >>| > how this solution is working for them. Many thanks. >>| >>| I use it but in a very hacked up form because I need inline auth >>| and I wanted sha1 hash instead of the default crypt. >> >>BTW, the 0.50.x branch has pluggable crypt types.. >> >>crypt, md5, sha are part of the crypts you can pick.. or you can write your >>own in about 30 seconds if you need something else. >> > > Well this sha1 patch wasnt the real hard work ;-) > > Inline auth was the real nut to crack. And the fact XUF returns HTML > instead of using appropriate exceptions add to the complexity :-) > > I hope PAS will fill the gap although it isnt yet ready for prime time. I'm interested to know what you find its shortcomings to be. I know it is in use in production on some fairly large sites (dozens of content managers, hundreds of thousands of content objects, etc.). Tres, - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFC1/30+gerLs4ltQ4RAjAyAKCdb+wAFkqDZ6TP3MfuHIih5ecXkQCg0nV3 SEuQNSdYcaL9TxbhMN9Vl8o= =pLki -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml to pdf
For simple conversion, you may find htmldoc to be a good choice. Reportlab is a great tool but takes considerable effort; htmldoc gives a "good enough" solution in many cases. On Fri, 15 Jul 2005, Chris Withers wrote: > Allen Huang wrote: > > How do I change my webpage into pdf using dtml or python script? > > Reportlab is your friend. Google might help you find it ;-) > > Chris > > -- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml to pdf
Allen Huang wrote: How do I change my webpage into pdf using dtml or python script? Reportlab is your friend. Google might help you find it ;-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Product logging to Postgres
David Pratt wrote: I am wanting to log a product to postgres database. I want to write to the log from my Script Python methods (in skins) when certain actions occur. The product itself uses a number of zsql methods. Can I import existing zope logging classes in my Script Python to to this or will I need to rely on external methods. Any recommendations or pointers to anything similar would be appreciated. For something as specialised as this, I'd just insert appropriate calls to appropriate ZSQL methods where you need them. The logging framework is great when you want to be able to switch where log entries are written in a more dynamic fashion, or enable other users of your code to decide to log to a different place. You, however, want to log into postgres only, as best I can see, so there's no point in fighting the security restrictions in your particular case ;-) That said, it'd be great if you could at least do: from logging import getLogger logger = getLogger('event.something') logger.log('something') ...without loads of unauthorized errors popping up :-S cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] userFolder that holds user's email
Peter Bengtsson wrote: Just one python question Chris, why do you do this:: class User(BasicUser): def __init__(self,dict): d['__'] = dict['password'] What's wrong just doing self.__ = dict['password'] I'm not looking at the code as I write this, so I may be wrong, but I do that because, if you look further down, you'll see I define a __setattr__ hook that raises an exception, since seeing attributes on object of this type is a really bad thing to do, so you have to go through lots of hoops if you really want to do it ;-) cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XUF and Postgres
David Pratt wrote: I am looking at using the ExUserFolder with Postgres. Any users of this combination that could share feedback (positive or negative) on how this solution is working for them. Many thanks. You might want to take a look at SimpleUserFolder. It's a lot more light weight that XUF and handles RDB-based auth of any variety really well... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XUF and Postgres
Thanks Tino and Andrew. This is all useful feedback. Regards, David On Friday, July 15, 2005, at 05:11 AM, Tino Wildenhain wrote: Am Freitag, den 15.07.2005, 16:25 +1000 schrieb Andrew Milton: +---[ Tino Wildenhain ]-- | Am Donnerstag, den 14.07.2005, 12:46 -0300 schrieb David Pratt: | > I am looking at using the ExUserFolder with Postgres. Any users of | > this combination that could share feedback (positive or negative) on | > how this solution is working for them. Many thanks. | | I use it but in a very hacked up form because I need inline auth | and I wanted sha1 hash instead of the default crypt. BTW, the 0.50.x branch has pluggable crypt types.. crypt, md5, sha are part of the crypts you can pick.. or you can write your own in about 30 seconds if you need something else. Well this sha1 patch wasnt the real hard work ;-) Inline auth was the real nut to crack. And the fact XUF returns HTML instead of using appropriate exceptions add to the complexity :-) I hope PAS will fill the gap although it isnt yet ready for prime time. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Passing a variable to RESPONSE.redirect
Asad Habib wrote: Is it possible to pass a variable to RESPONSE.redirect or does the page name have to be a literal string? I was unable to pass in a variable via the REQUEST object (i.e. REQUEST.get('pageName')) or the SESSION attribute of the REQUEST object (i.e. REQUEST.SESSION.get('pageName')). Any help would be appreciated. Thanks. How do you mean "unable"? That's not a very good problem description. RESPONSE.redirect is simply a Python method, and it will take any string you can manage, no matter where it comes from. In fact, I think it would be very difficult to do otherwise. You must, of course, pass the value of a variable, and not the variable itself. None of the following pose any problem:: REQUEST.RESPONSE.redirect("http://plone.org";) url = "http://plone.org"; REQUEST.RESPONSE.redirect(url) def redir(): return "http://plone.org"; REQUEST.RESPONSE.redirect(redir()) urls = {} urls['plone'] = "http://plone.org"; REQUEST.RESPONSE.redirect(urls['plone']) REQUEST.RESPONSE.redirect(urls.get('plone', "/")) In fact, they should all work identically. --jcc -- "Building Websites with Plone" http://plonebook.packtpub.com/ Enfold Systems, LLC http://www.enfoldsystems.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Passing a variable to RESPONSE.redirect
Is it possible to pass a variable to RESPONSE.redirect or does the page name have to be a literal string? I was unable to pass in a variable via the REQUEST object (i.e. REQUEST.get('pageName')) or the SESSION attribute of the REQUEST object (i.e. REQUEST.SESSION.get('pageName')). Any help would be appreciated. Thanks. - Asad ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XUF and Postgres
Am Freitag, den 15.07.2005, 16:25 +1000 schrieb Andrew Milton: > +---[ Tino Wildenhain ]-- > | Am Donnerstag, den 14.07.2005, 12:46 -0300 schrieb David Pratt: > | > I am looking at using the ExUserFolder with Postgres. Any users of > | > this combination that could share feedback (positive or negative) on > | > how this solution is working for them. Many thanks. > | > | I use it but in a very hacked up form because I need inline auth > | and I wanted sha1 hash instead of the default crypt. > > BTW, the 0.50.x branch has pluggable crypt types.. > > crypt, md5, sha are part of the crypts you can pick.. or you can write your > own in about 30 seconds if you need something else. > Well this sha1 patch wasnt the real hard work ;-) Inline auth was the real nut to crack. And the fact XUF returns HTML instead of using appropriate exceptions add to the complexity :-) I hope PAS will fill the gap although it isnt yet ready for prime time. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] LDAPUSerFolder permission problem
On 14 Jul 2005, at 02:53, Nicholas Watmough wrote: I'm not sure what you mean by a 'wrapped' user. What causes a user to have a wrapper in Zope? I am getting the 'other' user via the following code: user = context.acl_users.getUserById(username) Will this cause the user to be returned with a wrapper, and if so, how would I remove the wrapper? No, it's the other way around. You want the wrapper. getUserbyId returns unwrapped users. If you use CMF or something based on CMF you could use the membership tool's getMemberById to return something more useful, otherwwise you'll have to do the wrapping yourself: user = acl_users.getUserById(user_id).__of__(acl_users) jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )