Re: [Zope] DTML in Zope 2 vs Zope 3

2005-05-26 Thread Tino Wildenhain
Am Freitag, den 27.05.2005, 00:20 +0200 schrieb Jaroslav Lukesh: ... > I absolutelly agree with you, it is like my words. > > But separation of logic and presentation could be done successfully in DTML > too. ZPT, which have "separation argument" is not as easy to make totally This is even somewh

[Zope] Re: LDAPUserFolder at Zope root

2005-05-26 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 J Cameron Cooper wrote: > Oscar Figueiredo wrote: > >> this might be trivial but I just can't find a way to do it. How does one >> replace the initial UserFolder at Zope root with a LDAPUSerFolder ? >> I tried the dummy way : delete the acl_users wi

Re: [Zope] Finding an object in a folder

2005-05-26 Thread Paul Winkler
On Thu, May 26, 2005 at 11:52:36PM +0200, Dieter Maurer wrote: > Chris Withers wrote at 2005-5-25 21:03 +0100: > > ... > >> I strongly argue against it. Fix "hasattr" in the Zope context, > >> instead! > > > >Make it so! :-) > > _marker = [] > def hasattr(obj, attr, marker): >

Re: [Zope] DTML in Zope 2 vs Zope 3

2005-05-26 Thread Remy Pinsonnault
I agree, I find DTML great and s simple and clear. I wonder why Zopeheads hate this so much! Remy On 5/26/05, Jonathan Cyr <[EMAIL PROTECTED]> wrote: > I use DTML alot, I also code all my HTML/CSS by hand for control sake. If > you use a Dreamweaver, et al, DTML requires tool tweaking, if i

Re: [Zope] Finding an object in a folder

2005-05-26 Thread Alec Mitchell
On Thursday 26 May 2005 02:52 pm, Dieter Maurer wrote: > Chris Withers wrote at 2005-5-25 21:03 +0100: > > ... > > > >> I strongly argue against it. Fix "hasattr" in the Zope context, > >> instead! > > > >Make it so! :-) I'd add the ability to turn on/off acquisition (off by default, import aq_bas

Re: [Zope] DTML in Zope 2 vs Zope 3

2005-05-26 Thread Jonathan Cyr
I use DTML alot, I also code all my HTML/CSS by hand for control sake.  If you use a Dreamweaver, et al, DTML requires tool tweaking, if it works at all.  If you read HTML, and are aware of all of the browser quirks, DTML is quick and easy...   New tags are easy, they stand out and quite common

Re: [Zope] Finding an object in a folder

2005-05-26 Thread Dieter Maurer
Chris Withers wrote at 2005-5-25 21:03 +0100: > ... >> I strongly argue against it. Fix "hasattr" in the Zope context, >> instead! > >Make it so! :-) _marker = [] def hasattr(obj, attr, marker): a = getattr(obj, attr, _marker) return a is not _marker import _

Re: [Zope] Accessing file object to upload in an external method

2005-05-26 Thread Dieter Maurer
Simon ALEXANDRE wrote at 2005-5-26 10:37 +0200: > ... >Here is the line added in the external method: > >self.dir_filesystem.manage_upload(file=self.zipfile) > >zipfile is the name of the file in the html form (File NAME="zipfile" SIZE="25" VALUE="">) As all request parameters (such as form contr

Re: [Zope] UnicodeDecodeError

2005-05-26 Thread Dieter Maurer
Chris Withers wrote at 2005-5-25 20:54 +0100: >Joern Wallstabe wrote: >> Seem Zopes ZPT system is trying to do the encoding, depending on on >> setHeader() method. >> So if this header is set you can simply return unicode strings. > >It's actually lower down in the stack... ZPublisher encodes the

Re: [Zope] DTML in Zope 2 vs Zope 3

2005-05-26 Thread Jaroslav Lukesh
Dne čtvrtek, 26. května 2005 22:03 Greg Fischer <[EMAIL PROTECTED]> napsal(a): > I am just curious, why is DTML not good? It does 9 out of 10 things I > want quite easily. From my perspective, I really dont want to learn > new ways of doing things if this works. I also have no desire to do > tem

Re: [Zope] Accessing file object to upload in an external method

2005-05-26 Thread J Cameron Cooper
Simon ALEXANDRE wrote: I'm new in zope and I'm trying to upload a file on zope using localfs. I already done it through a little basic html page + python script. I would like now use it in an external method. Here is the line added in the external method: self.dir_filesystem.manage_upload(

Re: [Zope] DTML in Zope 2 vs Zope 3

2005-05-26 Thread David H
Greg Fischer wrote: I am just curious, why is DTML not good? It does 9 out of 10 things I want quite easily. From my perspective, I really dont want to learn new ways of doing things if this works. I also have no desire to do templating. I can see the need for it in a large development shop,

Re: [Zope] Finding an object in a folder

2005-05-26 Thread Phillip Hutchings
On 27/05/05, Paul Winkler <[EMAIL PROTECTED]> wrote: > On Fri, May 27, 2005 at 09:20:52AM +1200, Phillip Hutchings wrote: > > > Well, it doesn't distinguish between an attribute which doesn't exist > > > and an attribute which has any false value. This makes it unsuitable as > > > a hasattr() repl

Re: [Zope] LDAPUserFolder at Zope root

2005-05-26 Thread J Cameron Cooper
Oscar Figueiredo wrote: this might be trivial but I just can't find a way to do it. How does one replace the initial UserFolder at Zope root with a LDAPUSerFolder ? I tried the dummy way : delete the acl_users with an intent to instanciate a LDAPUSerFolder afterwards but that locked me out

Re: [Zope] Namespace for PythonScript

2005-05-26 Thread J Cameron Cooper
Hong Yuan wrote: If a PythonScript is called from a Page Template, how can it access the variables defined using: in the calling script? Of course, one can pass the variables to the PythonScript explicitly as parameters, but is there any other way to let the PythonScript to easily access

Re: [Zope] Finding an object in a folder

2005-05-26 Thread Paul Winkler
On Fri, May 27, 2005 at 09:20:52AM +1200, Phillip Hutchings wrote: > > Well, it doesn't distinguish between an attribute which doesn't exist > > and an attribute which has any false value. This makes it unsuitable as > > a hasattr() replacement IMHO. > > But you're asking if the object posesses a

Re: [Zope] Finding an object in a folder

2005-05-26 Thread Phillip Hutchings
> Well, it doesn't distinguish between an attribute which doesn't exist > and an attribute which has any false value. This makes it unsuitable as > a hasattr() replacement IMHO. But you're asking if the object posesses an attribute, not any question about the value of the object. I think returnin

[Zope] Re: HTML post processing in Zope

2005-05-26 Thread Cyrille Bonnet
Chris Withers wrote: Cyrille Bonnet wrote: It works for me so far. But if you have specific examples that I can use to improve the filter, they would be very welcome. I think a filter is a totally abhorent way of attempting to tackle this... OK, but again, if you have a better idea, it is

Re: [Zope] DTML in Zope 2 vs Zope 3

2005-05-26 Thread Greg Fischer
I am just curious, why is DTML not good? It does 9 out of 10 things I want quite easily. From my perspective, I really dont want to learn new ways of doing things if this works. I also have no desire to do templating. I can see the need for it in a large development shop,but for me, a 1 guy ope

Re: [Zope] Zope 2.7.2 with Ape 1.0 installed in root, fails to restart, without any usefull logging, after adding a local role

2005-05-26 Thread Tim Connor
Cool. Good luck. Let me know if you need a tester. ;) Tim Shane Hathaway wrote: Tim Connor wrote: Thanks, Shane. That fixes the problem of Zope not starting, and better than the other syntax I tried, but it still doesn't fix the core problem. My root Ape installs have issues with addin

[Zope] Re: Where can I found "hot_plug" function of zpi.zope ?

2005-05-26 Thread Josef Meile
Sadly, as of Windows XP, this is broken beyond use: it simply doesn't find some stuff in certain files, like .py files, for example :-( Install cygwin and use grep there, if you really have to stay on windows There is no need of installing that big monster :-). You can also install grep for wi

[Zope] Uploading rst docs & Put_factory

2005-05-26 Thread Andrew Malcolmson
I want to upload a restructured text (rst) document to my Zope server via FTP and have its content type recognized. I understand that I need to make an entry in PUT_factory.py but I need some guidance here. The following attempt didn't have any effect (that is, the type of the uploaded file i

[Zope] Namespace for PythonScript

2005-05-26 Thread Hong Yuan
Hello, If a PythonScript is called from a Page Template, how can it access the variables defined using: in the calling script? Of course, one can pass the variables to the PythonScript explicitly as parameters, but is there any other way to let the PythonScript to easily access the name s

Re: [Zope] Finding an object in a folder

2005-05-26 Thread Paul Winkler
On Wed, May 25, 2005 at 09:03:13PM +0100, Chris Withers wrote: > >>if getattr(thefolder.aq_inner.aq_explicit,the_id,None): > > > >You are aware that this is in general *NOT* an emulation > >of "hasattr". > > I didn't say it was ;-) > > >It may fail e.g. for properties. > > How would it fail for

Re: [Zope] Re: Where can I found "hot_plug" function of zpi.zope ?

2005-05-26 Thread bobb
There is also a wingrep freeware utility. But it def. IS broken in native windows. bobb - Original Message - From: "Chris Withers" <[EMAIL PROTECTED]> To: "Josef Meile" <[EMAIL PROTECTED]> Cc: "KLEIN Stéphane" <[EMAIL PROTECTED]>; Sent: Wednesday, May 25, 2005 4:15 PM Subject: Re: [Zope]

Re: [Zope] LDAPUserFolder at Zope root

2005-05-26 Thread John Ziniti
Oscar Figueiredo wrote: I tried the dummy way : delete the acl_users with an intent to instanciate a LDAPUSerFolder afterwards but that locked me out in a way I could do nothing You need to log in as the emergency user, delete the old acl-users, instantiate the new LDAPUserFolder, and then logo

[Zope] LDAPUserFolder at Zope root

2005-05-26 Thread Oscar Figueiredo
Hello, this might be trivial but I just can't find a way to do it. How does one replace the initial UserFolder at Zope root with a LDAPUSerFolder ? I tried the dummy way : delete the acl_users with an intent to instanciate a LDAPUSerFolder afterwards but that locked me out in a way I could do

Re: [Zope] DTML in Zope 2 vs Zope 3

2005-05-26 Thread Hugo Ramos
Yellow, I have the same feeling... Python should be the primary language used in Zope but let's not just cut the support on DTML leaving thousands out there spinning around and having to go into Python as fast as they can because DTML is not supported anymore. Changes take time... Getting used to

Re: [Zope] DTML in Zope 2 vs Zope 3

2005-05-26 Thread David H
Hugo Ramos wrote: Yellow, I think because of lazy people like me that prefer to use DTML in a fast way than go into a deep Python level to get the job done... I know that, eventually, one of these days I'll have to move on to Python only but until that day comes... DTML and a little bit of Pyth

[Zope] Accessing file object to upload in an external method

2005-05-26 Thread Simon ALEXANDRE
Hi, I'm new in zope and I'm trying to upload a file on zope using localfs. I already done it through a little basic html page + python script. I would like now use it in an external method. Here is the line added in the external method: self.dir_filesystem.manage_upload(file=self.zipfile) zi

Re: [Zope] DTML in Zope 2 vs Zope 3

2005-05-26 Thread Hugo Ramos
Yellow, I think because of lazy people like me that prefer to use DTML in a fast way than go into a deep Python level to get the job done... I know that, eventually, one of these days I'll have to move on to Python only but until that day comes... DTML and a little bit of Python where needed suits

Re: [Zope] Underscoring Inaugural Address

2005-05-26 Thread Chris Withers
Dan Pozmanter wrote: Hey, I am working on a subversion interface for zope, and our repositories are rife with files like "__init__.py". For something like that, I'd head for Zope 3... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.

Re: [Zope] How to use ParsedXML

2005-05-26 Thread Chris Withers
Jason Leach wrote: hi, If I have a ParsedXML document with the following: To be or not to be? That is the question. The question of life the universe and everything? 42 Try: tal:content="here/myxmldoc/faq/0/entry/0/question/nodeValue/question"> Or so

Re: [Zope] Re: Where can I found "hot_plug" function of zpi.zope ?

2005-05-26 Thread Chris Withers
Josef Meile wrote: and in windows, just use the Built-in search feature and introduce as filename "*.py" and in the text field insert "def hot_plug" Sadly, as of Windows XP, this is broken beyond use: it simply doesn't find some stuff in certain files, like .py files, for example :-( Install

Re: [Zope] Hiding HTML URL

2005-05-26 Thread Chris Withers
David H wrote: a) "It's grim to debug" Chris, do you really depend on their users to report URLS to support when things go wrong? I use exceptions, logs and auto-emailing of exceptions "as a work around" - what was I thinking! :-) Yes, well, I wrote MailingLogger 5 years ago, so I think I h

Re: [Zope] Re: HTML post processing in Zope

2005-05-26 Thread Chris Withers
Cyrille Bonnet wrote: It works for me so far. But if you have specific examples that I can use to improve the filter, they would be very welcome. I think a filter is a totally abhorent way of attempting to tackle this... * replace with (remove the namespace information) * remove the login p

Re: [Zope] UnicodeDecodeError

2005-05-26 Thread Chris Withers
Joern Wallstabe wrote: Seem Zopes ZPT system is trying to do the encoding, depending on on setHeader() method. So if this header is set you can simply return unicode strings. It's actually lower down in the stack... ZPublisher encodes the response, and has a stoopid hard coded default of 'lat

Re: [Zope] Finding an object in a folder

2005-05-26 Thread Chris Withers
Dieter Maurer wrote: By the way, it is as nasty in Python as it is in DTML. I agree with we disagree, I hopethat doesn't cause offence ;-) Worse still, you use hasattr with ZODB... hastattr swallows all exceptions, including ConflictErrors, and especially in this example that would be a bad

Re: [Zope] DTML in Zope 2 vs Zope 3

2005-05-26 Thread Chris Withers
David H wrote: I understand that DTML will be in Zope 3. My question is, do "namespaces" and "context" also migrate to Zope 3? If not, could break existing code? I would suggest that the chances of any DTML from Zope 2 working in Zope 3 are slim, at best ;-) Why DTML is IN Zope 3 in the

[Zope] Re: [ANN] Epoz 2.0.0 released

2005-05-26 Thread Yannick Biet
Great job Maik, Hope to see now the same images/docuent upload feature provided by Kupu! It is one of the most missing feature with the image/document library to insert easily some images/documents links ! Congrats for this wonderful version ___ Zop