Re: [Zope] Mental disconnect help: Zope objects vs. Python objects in ZODB

2001-01-19 Thread andres

On Thu, Jan 18, 2001 at 11:36:59PM +0100, Max M wrote:
 
 I have written a How-To that'll get you at least some of the way in
 understanding it.
 

I second Chris on the request for a URL pointing to your HOW-TO. I'd
appreciate any help that gets me out of this disconnect rut.

--
Andres Corrada-Emmanuel   Email: [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] Mental disconnect help: Zope objects vs. Python objects in ZODB

2001-01-19 Thread andres

Thank you so much for this. I have taken a quick look at it and it
looks like exactly what I needed.

On Fri, Jan 19, 2001 at 11:04:38PM +0100, Max M wrote:
 I posted it later to the list, but here you go.
 
 http://www.zope.org/Members/maxm/HowTo/minimal_01
 
 regards Max M
 

--
Andres Corrada-Emmanuel   Email: [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] Mental disconnect help: Zope objects vs. Python objects in ZODB

2001-01-18 Thread andres

Hello,

I'm designing a large e-commerce site with Zope. In the process I have also
designed an object API for the site. My problem is that I can't bridge my
conception of ZODB as a database for Zope objects and my conception of ZODB
as a container for Python objects. For the latter case I'm thinking of AMK's
ZODB/ZEO repackaging.

For example, I want to create a Python class for a Product object and store
the instances in the ZODB. I have looked at ZClasses and they don't seem to
support data structures that I'm comfortable with in Python like dictionaries.

Am I being dense in this mental disconnect and is it just trivial to write
Python scripts that create objects in the ZODB and have Zope dtml calls that
access the attributes in these objects?

--
Andres Corrada-Emmanuel   Email: [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] PHP/Zope Guru

2000-11-09 Thread andres

Another alternative is to create an unholy marriage of the two! See my HOWTO
on Serving PHP from Zope at:

http://www.zope.org/Members/Mamey/PHP

On Wed, Nov 08, 2000 at 09:25:22PM +0100, Vincent - D. Ertner wrote:

 
 Any detailed information on how and *why* one or the other solution
 rulez would be highly appreciated and helpful, as I have to argue the
 decision for one or the other system with the initiators of the
 project.
 

--
Andres Corrada-Emmanuel   Email: [EMAIL PROTECTED]
Mamey - Internet Programming  www.mamey.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] 404 Error on /p_/ Zope management images

2000-11-05 Thread Andres Corrada-Emmanuel

Hi,

I moved a "legacy" Zope-2.1.6 installation, and I'm finding that the management 
interface cannot find the usual Zope icons for "Folder", "DTML Document", etc.

In addition, Zope no longer has the standard objects like DTML Document, Image, etc. 
in the Add Object list. All the installed products show up and existing folders and 
documents also appear. I'm completely baffled. Anyone seen this type of behaviour? 

--
------
Andres Corrada-Emmanuel   Email: [EMAIL PROTECTED]
Director of Technologyhttp://www.mamey.com
Mamey Phone: (413) 529-9993
--
--

___
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] PHP and Zope

2000-11-04 Thread andres

Take a look at the PHP/Zope integration HOWTO:

http://www.zope.org/Members/Mamey/PHP

On Fri, Nov 03, 2000 at 02:43:41AM +0100, Vincent - D. Ertner wrote:
 Hi Zopers,
 
 I learned PHP and now discovered Zope. So I'd like to put a
 simple question:
 
 What's the best way to incorporate the advantages of PHP and
 Zope? Should I focus on one and forget the other?
 
 Okay, these are two questions and I honestly doubt that anyone
 would suggest to drop Zope ;-)))
 
 Anyway: Please gimme some starting hints on my way to the perfect
 content managed web site!
 
 Thanx in advance!
 
 Cheers,
 
 Vince
 

--
Andres Corrada-Emmanuel   Email: [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] ANN: HOWTO Use mod_gzip to accelerate Zope

2000-11-01 Thread Andres Corrada-Emmanuel

We are pleased to announce a new Zope HOWTO for the community: "Use mod_gzip to 
accelerate Zope." (http://www.zope.org/Members/Mamey/mod_gzip).

Mamey has been following the release of the mod_gzip module by Remote Communications 
(http://www.remotecommunications.com) since last week.
Working with the budding mod_gzip user base, we have been able to get a patched 
version to work on a RH 6.1 test server.

We invite everyone to take a look at this exciting technology that will benefit anyone 
that serves Zope via the Apache server.

--
------
Andres Corrada-Emmanuel   Email: [EMAIL PROTECTED]
Director of Technologyhttp://www.mamey.com
Mamey Phone: (413) 529-9993
--
--

___
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.org down?

2000-11-01 Thread andres

mindlace,

Check out my company's new HOWTO on an additional way to improve performance:

http://www.zope.org/Members/Mamey/mod_gzip

On Wed, Nov 01, 2000 at 11:38:42AM -0500, ethan mindlace fremen wrote:
 
 Zope.org will be on hardware that stretches the notion of "commodity"
 soon, but it will be sufficient such that all 500mb of our objects can
 be floating about in ram if need be.  This should improve our
 performance drastically.
 
 Hope that helps,
 
 -- 
 -mindlace-
 Zopatista Community Liason

------
Andres Corrada-Emmanuel   Email: [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] PHP-Pages

2000-10-30 Thread andres

Check out my HOWTO: http://www.zope.org/Members/Mamey/PHP

On Mon, Oct 30, 2000 at 02:19:49AM +0100, Vincent - D. Ertner wrote:
 Hi Zope,
 
 I wondered, whether it's possible and sensible to have php-Pages
 in Zope sites ... any thoughts and comments on this matter?
 
 Cheers,
 
 Vince
 
  '''
  ô¿ô
   -

--
Andres Corrada-Emmanuel   Email: [EMAIL PROTECTED]
Internet Programming  .mamemy.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-dev] I don't find the way to number the pages in a batch process.

2000-10-28 Thread Andres Sanchez Gomez

I have the data divide in pages with ten results each.
I'd like to now if i can do it adn, if possible, the to do it.


Andrés Sánchez Gómez


___
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] I'm having troubles with MySQL MONTHNAME() function

2000-10-27 Thread Andres Sanchez Gomez

Hello:

I'm from Argentina, as you shoud now, I speak spanish. I'm usig MySQL,
as you sould also now, it's in English.
I have to give de time informatio in letters. Like 'Febrero' (02,
February).
I found two ways, but non of them gives me good results.
The first way is to ask to the database a select statemment with it's
own MONTHNAME() functio. But I couldn't translate to Spanish that is
what I need.
The other way is to make a little function that compares the month
number (selected with te MONTH() function). In this case I had the same
trouble:
I can't compare a DateTime MySQL function var with an other var.
I can't do this:
dtml-if " Month(DATE)==' 1' Diciembre
dtml-elif " Month(DATE)==' 2' Febrero
etc

Thanks to anyone who can help me, or read me.
And please, forget my english.

Andres Sanchez Gomez




___
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] php and zope

2000-10-27 Thread andres

Take a look at my HOWTO:

http://www.zope.org/Members/Mamey/PHP

I'll be updating it soon with improvements that allow authorization and
cookies.

On Fri, Oct 27, 2000 at 11:21:56AM +0200, Laurent Tranchant wrote:
 hello everybody,
 I am new on this list, and I on zope.
 I have installed zope with apache on linux Suze 6.4, and I want to use
 it with PostGreSQL. My first question is very simple : can I use php
 code in DTML documents ??? I don't think so, but if someone can help
 me...
 
 
 ___
 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 )
 
 

-- 
--
Andres Corrada-Emmanuel   Email: [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] TinyTablePlus: Problems with quotation marks

2000-10-25 Thread andres

You have to identify the column as a "key" column for the setRow method to
recognize an already existing one and modify it in place. You do this by
adding a "*" at the end of the column name. In your case,

Position*

On Wed, Oct 25, 2000 at 05:33:23PM +0200, Danny William Adair wrote:
 I have problems using Shane Hathaway's TinyTablePlus product. Maybe you can
 help me.
 
 **
 My TinyTablePlus instance:
 **
 ID:
 Items
 
 Title:
 Items on Navigation Bar
 
 Columns:
 Position ShowItem Caption UseImage Image Service URL
 
 Data:
 "1", "yes", "HOME", "yes", "Home", "Home", "/Main"
 "2", "yes", "News", "yes", "News", "News", "/News"
 "3", "yes", "Discussion", "no", "", "Discussion", "/Discussion"
 --
 
 **
 My code: (I want to create a configuration page for a navigation bar, which
 will have to change a table's rows depending on the contents of some form
 elements)
 **
 dtml-let Position='1'
   Caption='test'
 dtml-in Items sort=Position
 dtml-call "Items.setRow(Position=Position,Caption=newCaption)"
 /dtml-in
 --
 
 **
 My problem:
 **
 Data afterwards:
 
 "1", NULL, "test", NULL, NULL, NULL, NULL
 "1", "yes", "HOME", "yes", "Home", "Home", "/Main"
 "2", "yes", "News", "yes", "News", "News", "/News"
 "3", "yes", "Discussion", "no", "", "Discussion", "/Discussion"
 --
 
 Shouldn't setRow recognize the existing row and change that one?
 I can't see what I am doing wrong here.
 Does it have anything to do with the double quotation marks in the data?
 
 tia, Danny
 
 
 ___
 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 )
 
 

-- 
--
Andres Corrada-Emmanuel   Email: [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] Tiny tables

2000-10-13 Thread andres

The problem with the TinyTable and TinyTablePlus products is that they use
the tokenize.py module which treats any field value as a possible Python expression.
Since ":" is a special token in Python, it gets interpreted as such. One
quick way to get around this is to quote your field value -

"criteria:tokens"

You may have to deal with the quotes later on, although I think they get
stripped after the value survives the tokenize.py module.

On Fri, Oct 13, 2000 at 08:08:34AM +1300, Graham Chiu wrote:
 
 I would like to run some regular reports based upon
 sqlmethods.  The input to these are a mixture of normal
 values, and some tokenised values.
 
 I tried storing these in tiny tables, but it doesn't seem
 that tiny tables allow one to store tokens.  If I specify
 the value as say, criteria:tokens, it gets changed to just
 criteria.
 
 Any suggestions as to how to store the input as tokens for
 my reports?
 
 --
 Graham Chiu
 
 ___
 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 )
 
 

-- 
------
Andres Corrada-Emmanuel   Email: [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] Converting PHP3 - Zope

2000-10-13 Thread andres

Take a look at my HOWTO:

www.zope.org/Members/Mamey/PHP

On Fri, Oct 13, 2000 at 09:47:17AM -0200, Mario Olimpio de Menezes wrote:
 
 Hi,
 
   I'm planning to convert (migrate) a entire site from php3 to
 zope and i'm looking for suggestions, hints, etc on this.
   It's a GPL management school system done in php3+postgresql, and
 any user must be authenticated against a database and his privileges
 are those from the postgresql. The system is in portuguese
 (www.univates.br/sagu) if someone is interested.
   Does somebody have experience in such kind of migration
 (conversion) and can give me some "in advance" advice to avoid this or
 that or don't do this, etc, etc?
   Any comments?
 
 []s,
 Mario O.de Menezes"Many are the plans in a man's heart, but
 IPEN-CNEN/SP is the Lord's purpose that prevails"
 http://curiango.ipen.br/~mario Prov. 19.21
http://www.revistalinux.com.br
 
 
 ___
 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 )
 
 

-- 
------
Andres Corrada-Emmanuel   Email: [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] ANN: Serving PHP/Perl from Zope update

2000-09-05 Thread andres

Hello Zopistas,

I have updated the HOW-TO: Serve PHP/Perl within Zope with a nifty
alternative by Joseph Wayne Norton. His suggestion allows PHP to call Zope
methods. Check it out at www.zope.org/Members/Mamey/PHP. 

The methods presented in the HOW-TO still have some deficiencies with
regards to Authorization and Cookies so suggestions and improvements are
very much welcome.

--
Andres Corrada-Emmanuel   Email: [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] Ad banners in Zope anyone ?

2000-09-05 Thread andres

Of the two methods currently described on the How-To for PHP from within
Zope, one of them does handle authorization. Neither handles cookies at the
present time. Advise on how to fix these limitations would be much
appreciated.

On Tue, Sep 05, 2000 at 02:23:19PM +, Bill Welch wrote:
 Check out the How-To athttp://www.zope.org/Members/Mamey/PHP. Doesn't
 handle redirection, authorization, or cookie passing, but it's a
 start. If you need the above mentioned features, I'll be posting my update
 by the end of the week.
 
 Bill.
 
 On Sat, 2 Sep 2000, Jason Cunliffe wrote:
 
  - Can one run PHP from inside of Zserver/ZODB easily?
  - How would to do that?
  - Is anyone using Zope for Ad Banner services??
  - What would would make it a good or bad choice?
 
 
 ___
 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 )
 
 

-- 
--
Andres Corrada-Emmanuel   Email: [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] Images slow rendering problem

2000-09-04 Thread andres

What IE browser are you using? What version of Zope? A similar sort of problem
was once traced to a Y2K problem with IE but the new versions of Zope
(2.1.6) should be able to handle the problem gracefully now.

On Mon, Sep 04, 2000 at 10:13:33AM +0200, Pierre-Julien Grizel wrote:
 Hi,
 
 I already posted this message several monthes ago, expecting a new Zope
 version would fix the problem, but...
 
 
 I have some images on my pages (let's say 10 - not a lot), rendered
 either by dtml-var or a manual IMG tag.
 When I render the page on some of my LAN boxes (especially with IE),
 some images doesn't load at the first time. I need to reload the page to
 make them appear. When I monkeyly hit the 'F5' key, some images do not
 show again. Argl. Anoying
 
 The problem is worst ever through Internet.
 
 
 
 
 Any clues ? Is it a Zope images rendering problem ?
 

--
Andres Corrada-Emmanuel   Email: [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] Probable Bug in OFS.Image.index_html

2000-08-20 Thread andres

I can't be sure because your line number does not seem to correspond with
your text explanation, but when I do a search on "return RESPONSE", I get
the same section that was not gracefully dealing with non Y2K compliant
Explorer browsers in an earlier "bug". This was present in 2.1.6 but has
been fixed for 2.2.x.

On Sat, Aug 19, 2000 at 07:56:33PM +0200, Dieter Maurer wrote:
 [EMAIL PROTECTED] writes:
   What version of Zope are you using?
 It is definitely in Zope 2.1.6 and Zope 2.2.1b1.
 
 I expect it is in every Zope release.
   
   On Fri, Aug 18, 2000 at 08:21:36PM +0200, Dieter Maurer wrote:
Today, I met again a strange problem:
  I tracked this down to line 219 of "OFS/Image.py":
Zope arrives their, when it receives an
"IF-MODIFIED-SINCE" header and determines that
the browser has an up to date image in its cache.
Zope correctly set status 304 and then
returns "RESPONSE".
 
 
 Dieter
 

-- 
------
Andres Corrada-Emmanuel   Email: [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] Probable Bug in OFS.Image.index_html

2000-08-18 Thread andres

What version of Zope are you using?

On Fri, Aug 18, 2000 at 08:21:36PM +0200, Dieter Maurer wrote:
 Today, I met again a strange problem:
 
.
.
.

   I tracked this down to line 219 of "OFS/Image.py":
 Zope arrives their, when it receives an
 "IF-MODIFIED-SINCE" header and determines that
 the browser has an up to date image in its cache.
 Zope correctly set status 304 and then
 returns "RESPONSE".
 


------
Andres Corrada-Emmanuel   Email: [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] Zope performance ratios

2000-07-24 Thread andres

I'm interested in getting performance statistics for Zope. I'm scouring the
mailing lists for previous messages but I would also be interested in
anything else people may want to say about it. For example, what is the
record for average web hits from a Zope site? Does someone have a feel for
useful ratios like: "a Zope page takes, on average, twice as a static page
to serve"? I'm not interested in being anal about the numbers, seat of
the pants estimates are what I'm looking for.

------
Andres Corrada-Emmanuel   Email: [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] Entity syntax and 2.2

2000-07-21 Thread andres

On Fri, Jul 21, 2000 at 10:05:08AM +0100, Chris Withers wrote:
 [EMAIL PROTECTED] wrote:
  
  And how about:
  
  dtml.missing-REQUEST.form['foo'];
 
 over my dead body! ;-)
 
 I thought the point of the entity syntax was to keep it simple... which
 including python expressions does not...
 

Okay, let me see how I can roll over you! ;-)

Perhaps you can suggest a simple way to do something like the following:

dtml-if "REQUEST.form.has_key('foo')"
  dtml-let previouslyEnteredValue="REQUEST.form['foo']
 input type=text ... value="dtml-previouslyEnteredValue;"
  /dtml-let
dtml-else
 input type=text ... value=""
/dtml-if

--
Andres Corrada-Emmanuel   Email: [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] Entity syntax and 2.2

2000-07-21 Thread andres

Thanks guys,

 
 Replace the whole mess with:-
 
 input type="TEXT" value="dtml.missing-foo;"
 

 input type=text ... value="dtml-var "REQUEST.for['foo']" html_quote
 missing
 
--
Andres Corrada-Emmanuel   Email: [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] Enitity syntax and 2.2

2000-07-20 Thread andres

And how about:

dtml.missing-REQUEST.form['foo'];

That is, allow expressions to be used. I guess this makes the entity syntax
act more like dtml-var.

This would allow a really clear syntax for refilling input type=text tags
with previously entered values in a form.

--
Andres Corrada-Emmanuel   Email: [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] Newbie: Zope a webserver? Serving PHP and Perl

2000-07-14 Thread andres

   - Original Message - 
   From: Lucas Young (c) 
 
   Also, How do I set Zope up so it handles PHP tags? 
 

Take a look at a HOW-TO I wrote for one way to serve PHP from within Zope:

www.zope.org/Members/Mamey/PHP

--
Andres Corrada-Emmanuel   Email: [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] namespace??

2000-07-14 Thread andres

On Fri, Jul 14, 2000 at 11:31:34AM +0100, Marcus Mendes wrote:
 How can I get  the content of   TITULO_CIDADE  out of my tags dtml-in
 /dtml-in ??
 
 My code is :
 
  dtml-in "_['sequence-item'].objectValues(['TSimpleItem'])" sort=title
 
  dtml-if "_['sequence-item'].id == CIDADE"
  dtml-call
 "REQUEST.set('TITULO_CIDADE',_['sequence-item'].title)"
   /dtml-if
  /dtml-in
 

I, for one, don't quite understand your question Marcus. Could you be more
specific?

------
Andres Corrada-Emmanuel   Email: [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] Workaround for objectValues security problem?

2000-07-13 Thread Andres Corrada-Emmanuel

Hi,

I'm trying to create a navigation bar DTML Method that goes something like this:

dtml-let root="PARENTS[-1]"
dtml-in "root.objectValues('Folder')"
 .
.
 .

The problem, as reported in a posting from Jerome Alet last week, is that the 
Anonymous user does not have permission to access the objectValues method. Giving the 
navigation bar DTML Method the proxy role of manager does not work correctly: the 
method can be called directly but not within other documents or methods.

Does someone have a workaround for this problem? Thank you.

___
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] Workaround for objectValues security problem?

2000-07-13 Thread andres

On Thu, Jul 13, 2000 at 12:47:56PM -0400, Andres Corrada-Emmanuel wrote:
 
 The problem, as reported in a posting from Jerome Alet last week, is that the 
Anonymous 
user does not have permission to access the objectValues method. Giving the 
navigation 

I should correct myself by saying that the objectValues method is not the
real problem here but the way the dtml-in tag is processed since I can
reproduce the problem with the following variant:

dtml-let rootFolders="PARENTS[-1].objectValues('Folder')"
dtml-in rootFolders
 .
.
 .

and the DTML Method that includes this code works fine called directly. But
fails when called within another Document or Method by saying  that
Anonymous is not authorized to look at "rootFolders". The failure occurs in
lib/python/DocumentTemplate/DT_In.py in the function "renderwob".

I've looked at the code but it isn't easy to figure out what is going on.

------
Andres Corrada-Emmanuel   Email: [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] Problem to init a DTML Document by uploading a file

2000-06-23 Thread andres

On Thu, Jun 22, 2000 at 02:18:35PM +0200, Frédéric Quin wrote:
 Hi all,
 
 
 I did'nt manage to init a DTML Document by uploading a file.
 I wrote :
 dtml-call "manage_addDTMLDocument('my_id_html','','/home/index.html')
 I tried too :
 dtml-call "manage_addDTMLDocument('my_id_html','',file='/home/index.html')
 And also :
 dtml-call "manage_addDTMLDocument('my_id_html','',file_path)
 
 
 Zope always creates a DTML Document and init his body with the path of the file
 : it never uploads the file...
 I encounter the same problem with manage_addImage which is a bigest problem...
 

Frederic,

The keyword argument "file" is somewhat misnamed. It should really be called
"fileContents".

I don't know in what context you are using this code but this may clear up
your problem:

Part of the magic that sucks the file out of your computer whenever you use
the browse button to upload the file is provided by the FORM tag. Make
sure your tag has the following syntax:

FORM ... enctype="multipart/form-data"...

if you do not include this on the tag, the browser will send only the name
of the file to Zope when you use an input type="file" tag. If enctype is
specified as shown above, then you will get the contents of the file in
whatever cgi variable you named in your input tag.

If you explain why you are calling manage_addDTMLDocument I could be more
helpful.

--
Andres Corrada-Emmanuel   Email: [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] Problem to init a DTML Document by uploading a file

2000-06-23 Thread andres

Sorry,

Forgot to add that method="post" is also required in the FORM tag before a
file contents is sent along in a posted form. So the required syntax is:

FORM ... enctype="mulipart/form-data" ... method="post"...

Otherwise, the file-selection field in the form acts like a regular text
field.

------
Andres Corrada-Emmanuel   Email: [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] A problem with image caching affecting certain versions of Netscape browsers browsers

2000-06-06 Thread andres

On Tue, Jun 06, 2000 at 10:25:48PM +0100, Paul Browning wrote:
 ZWN-2000-06-01 says:
 
 "Itamar Shtull-Trauring and Chris Withers tracked down a problem with
 image caching that affected certain versions of Netscape browsers."
 
 Can anyone give me more info on this? I missed any reference to
 it on the list and have been unable to locate anything in
 various archives. I have just such a problem and I hope
 this is a fix.
 

The problem was related to Netscape browsers on Win32 sending
If-Modified-Since headers with dates like "15-Mar-00" when they meant
"15-Mar-2000". This caused two problems in Zope.

The DateTime module reinterpreted the date as "15-Mar-1900". This has been
fixed in the CVS version of the module where years of the form 00-69 are now
interpreted as 2000 + 00-69.

The second problem ocurred in OFS/Image.py where the date was turned into
whole seconds with Python's int() function. Dates so early lead to float
numbers that exceed the range of numbers int() can deal with. This is also
fixed in the current CVS version.

------
Andres Corrada-Emmanuel   Email: [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] newbie Q. DTML syntax

2000-05-31 Thread andres

On Wed, May 31, 2000 at 09:35:58PM +1000, Brad Moulton wrote:
 As a newbie i have tried a few variations on the following
 but the dtml-if never returns true
 
  dtml-in "PARENTS[0].objectValues(['customer'])" sort=lname
 dtml-if "(_['sequence-item'].title == AUTHENTICATED_USER)"
   trtdcustomer /tdtddtml-var accno/td
 ...and other values from "customers" folder with meta type customer
 /dtml-if
 /dtml-in

This gets many, many people (including myself). Zope-defined Web request
variables are usually objects. You are using AUTHENTICATED_USER as if it was
a string, which it is not, thus your dtml-if always fails.

To get what you want, use (Zope Quick Reference v. 0.9):

 AUTHENTICATED_USER.getUserName()

Something that adds to newbies' confusion on this is that if one writes,

dtml-var AUTHENTICATED_USER

one gets the very username that one expects but yet the dtml-if still fails.
"I can see the freaking name is right Why are you failing!!???" is the
expurgated version of what I said when I got bit by this one.

The reason that dtml-var AUTHENTICATED_USER renders nicely to the same
string that AUTHENTICATED_USER.getUserName() does is that AUTHENTICATED_USER
is an object of type lib/python/AccesControl/User. This object has the
getUserName() method but it also has a "__str__" method that Python allows
to be defined for any class. This "__str__" method is the way that an object
should be represented whenever it is printed. In the case of the User class,
lib/python/AccessControl/User.py defines the method __str__ as:

def __str__(self): return self.getUserName()

--
Andres Corrada-Emmanuel   Email: [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] Weird interaction between int() and DateTime.timeTime

2000-05-25 Thread andres

On Thu, May 25, 2000 at 06:48:51PM +0100, Chris Withers wrote:
 "Jeff K. Hoffman" wrote:
Python 1.5.2 (#3, Mar  8 2000, 16:34:52) [C] on sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam

 f = 1.
 f
2.0
 int(f)
1

 
  the int() function takes a different code path and returns 1, correctly.
 
 Forgive my ignorance, but in what way is 1 correct here? Surely 2 is the
 what should be returned?!
 

From the python int doc string:

 print int.__doc__
int(x) - integer
 
Convert a string or number to an integer, if possible.
A floating point argument will be truncated towards zero.   

------
Andres Corrada-Emmanuel   Email: [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] Netscape Image Problems (LoginManager?)

2000-05-23 Thread andres

On Mon, May 22, 2000 at 03:10:59PM -0500, Jon Delheimer wrote:
 
 Shane,
 
 I made the changes you suggested to Image.py.
 
 Here are the results:
 
 Thursday, 11-May-00 16:21:32 GMT
 1900/05/11 16:21:31 GMT
 -2197697908.0

I have stepped through the debugger with the call of
ZPublisher.Zope('/path/to/image', d=1). Upon immediate entry into the
ZPublisher/Test.py module I can set environ['IF_MODIFIED_SINCE'] to
something reasonable such as 'Wednesday, March 15, 2000 19:02:17 GMT' and I
get no error as I step through the code. This exonerates the Zope python code.

The question then remains who is producing the buggy If-Modified-Since that
puts the date back to 1900. Does someone know how to trap the headers that
are sent to Zope so they can be inspected?

--
Andres Corrada-Emmanuel   Email: [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] Zope and PHP

2000-05-18 Thread andres

On Thu, May 18, 2000 at 12:13:51PM -0400, Chris Herrnberger wrote:
 Greetings,
 
 In discussions with friends the question came up is zope compatible with php,
 specifically if zope is run through apache. 
 

Check out one way to integrate PHP output within Zope at:

www.zope.org/Members/Mamey/PHP

written by yours truly. The example needs some work to support the POST
method and cookies.

--
Andres Corrada-Emmanuel   Email: [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 )