Re: [Zope] convert DTML Document to a folder.

2005-11-21 Thread Dario Lopez-Kästen

Martin Koekenberg wrote:

yes,
 
That was my idea. Is there a solution for that convert.
 
Martin Koekenberg




well, sort of, but there is no converting. Here's a suggestion, that may 
work for you assuming that I understand the problem properly:


The DTML-document contains some sort of information that you need to 
keep, but you also need to store stuff inside of it.


The most obvious solution is to create a folder with the same name as 
the DTML-document, put the DTML-document inside the folder and rename 
the doc to Index_html. moving all properties from the doc to the folder 
and presto, there you have it. renaming the doc index_html gives you 
url-compliance with previous urls, ie if you had /some/url/the_doc, you 
can still keep /some/url/the_doc, because it will automagically render 
/some/url/the_doc/index_html for you.


The API for creating and getting properties is availabel in the Zope 
Help from the ZMI.


HTH and Good luck!

/dario


-Original Message-
From: Jonathan Cyr <[EMAIL PROTECTED]>



So, you'd like to turn an independent entry into a container to hold
more info?

-Jon

Martin Koekenberg wrote:


The DTML Documents are userinfo documents.

I want to create a photoorder form and generate a dtml document with that 
users orders. I want to place that in his user folder.


Martin Koekenberg
-Original Message-
From: Andreas Jung 

--On 16. November 2005 15:35:14 +0100 
Martin Koekenberg 


<[EMAIL PROTECTED]> wrote:

   


Hello,

Is it possible to convert a DTML Document to a folder, Both with
properties  ?
I use Zope 2.8.4.

 


Converting a piece of textual content 
to a folder makes no sense. WHat
are 
you trying to do???


-aj



--
Jonathan Cyr

http://www.cyr.info
http://www.weddingweblog.com

[EMAIL PROTECTED]





--
-- ---
Dario Lopez-Kästen, IT Systems & Services Chalmers University of Tech.
Lyrics applied to programming & application design:
"emancipate yourself from mental slavery" - redemption song, b. marley

___
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-sqlvar problem with large strings?

2005-11-21 Thread Andreas Jung



--On 22. November 2005 08:42:32 +1100 Joshua Burvill <[EMAIL PROTECTED]> 
wrote:

statement. So I will

"Consider using parameters..." as it says.

Otherwise I can look at switching to mxODBC. I wonder if that would
disallow such long statements as well?


You could try it and report back :-)

-aj




pgpUd3NMRyRK0.pgp
Description: 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-sqlvar problem with large strings?

2005-11-21 Thread Joshua Burvill

Hello All,

I tried using zope 2.7.6 with kinterbasdbda 2.0 and I got the same error I
think, but more informative :)  

ProgrammingError: (0, 'SQL statement of 2270651 bytes is too long (max 65535
allowed). Consider using parameters to shorten the SQL code, rather than
passing large values as part of the SQL string.')

So I guess it is the DA that disallows the long statement. So I will
"Consider using parameters..." as it says.

Otherwise I can look at switching to mxODBC. I wonder if that would disallow
such long statements as well?

Thanks for the help. 

Josh



Traceback (innermost last): 

Module ZPublisher.Publish, line 101, in publish 
Module ZPublisher.mapply, line 88, in mapply 
Module ZPublisher.Publish, line 39, in call_object 
Module Shared.DC.Scripts.Bindings, line 306, in __call__ 
Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec 
Module Products.PythonScripts.PythonScript, line 323, in _exec 
Module None, line 16, in upload_process

Line 16 
Module Shared.DC.ZRDB.DA, line 454, in __call__
 
Module Products.kInterbaseDA.db, line 226, in query 
Module Products.kInterbaseDA.db, line 255, in _executeSQLAndReturnResultRows

Module kinterbasdb, line 1592, in execute 
ProgrammingError: (0, 'SQL statement of 2270651 bytes is too long (max 65535
allowed). Consider using parameters to shorten the SQL code, rather than
passing large values as part of the SQL string.')






-Original Message-
From: Andreas Jung [mailto:[EMAIL PROTECTED] 
Sent: Monday, 21 November 2005 4:36 PM
To: Joshua Burvill; zope@zope.org
Subject: Re: [Zope] dtml-sqlvar problem with large strings?



--On 21. November 2005 16:30:10 +1100 Joshua Burvill <[EMAIL PROTECTED]> 
wrote:
>
> Using zope 2.6.4 on win32 with kinterbasdbda (not sure what version),
> firebird 1.0
>
>
This sounds like a bug in the kinterbasedbda. Since this is DA is not used 
widely I would recommend to buzz the author of the DA directly. When you 
are on Windows you could consider switching to mxODBC in case your database 
supports ODBC.

-aj



___
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] Check Interval

2005-11-21 Thread Bakhtiar A Hamid
On 11/19/05, Kozloski, Matthew E <[EMAIL PROTECTED]> wrote:
I have a fairly large zope installation (thousands of users, ~130Gcombined zeo storages) and have been playing with the check interval.  Ihave a single Xeon 3.2 that runs the show (both ZEO and Zope).  I notice
that when I set the check-interval at 826 (pystone / 50) the performanceis horrible.  In my case the lower I set the check interval, the fasterthe site is (quite significantly).Its not a problem - I'm just curious as to why this is/may be.  From
reading docs/postings online, it seems to me that the higher the checkinterval is, the faster the site should be (up to a point -- law ofdiminishing returns sort of thing).  It is completely opposite for me
and inquiring minds want to know...

iirc, from shane's post some time ago

do a pystone and divide by 50

that's your check interval value

hth 
Thanks - MattMatthew E. Kozloski
Systems AdministratorSpecialized Technology Resources, Inc.10 Water STEnfield, CT  06082 USAt:   860-749-8371f:   860-749-8234e:  matthew.kozloski -at- strus.com
___Zope maillist  -  Zope@zope.orghttp://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 )-- http://myzope.kedai.com.my - my-zope org
___
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: DateTime mess

2005-11-21 Thread Florent Guillaume

Jürgen Herrmann wrote:

recently i came up here with the intention to fix DateTime#strftime().
while trying this, i had to dig deeper and deeper into the implementation
of DateTime and especially the timezone and daylight saving stuff.
to be honest, it's completely hacked together :(
DateTimeZone.py has one BIG dictionary in it, not a single line of
comments. values of this dict are nested lists, among other hackish
things (list like usage of a string, with \000 as separator).
the methods that use this dict also have no comments/docstrings at all.
obviously the guy(s) that originally wrote this, is/are hiding (i know
why :) so, there's nobody to ask either...

sorry guys, i won't be able to completely fix this for now. i found
a way to monkey patch zope to make it work for my case (2 timezones
only). my plan is to completely reimplement DateTime, based on
python's datetime in my own freetime (maybe around xmas this year)
and give it back to the community.

once again sry, if i raised expectations on the fix of strftime.


Yes replacing DateTime is a laudable but difficult goal.

One thing that could be done meanwhile is just refactor the unit test to 
be a base class that could then be used to test DateTime or to test 
another potential implementation. That would go a long way to help 
actually write a new implementation.


Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
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] problem

2005-11-21 Thread José Henrique
Are you using CMF?  If so, CMFDefault.utils has a function
(isHTMLSafe) that strips tags like embed.

José Henrique.

2005/11/21, David De Maeyer <[EMAIL PROTECTED]>:
> Hi all,
>
> Got a weird problem with Zope... One of our user
> reported the following issue (under Zope 2.6.0):
>
> One html page makes use of the  tag to show and
> play a MPEG video using the Windows Media Player. When
> we tried to edit that page for a minor text revision
> and saved that page, Zope did throw a 'Dynamic tag
> "embed" not allowed.'... and the change made to the
> page was lost.
>
> We then decided to remove the  tag, just did a
> cut, and proceeded with the text revision. It worked
> but as one could expect we couldn't get the 
> tag pasted into the document without having Zope
> complaining about that tag.
>
> Therefore a simple question: how do we get Zope to
> properly deal with this  tag again? Is it is a
> configuration problem?
>
> Any idea?
>
> Regards
>
> David De Maeyer
>
>
>
>
>
>
>
>
>
>
> ___
> Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
> Téléchargez cette version sur http://fr.messenger.yahoo.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 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] problem

2005-11-21 Thread Tino Wildenhain
Am Montag, den 21.11.2005, 21:59 +0100 schrieb David De Maeyer:
> Hi Jonathan,
> 
> Just gave a tried, actually I had tried the same as
> you suggested but it doesn't work.
> 
> We have a site, say www.mysite.com, and we access the
> CMS system via admin.mysite.com. One of the page
> displays a rather simple text and displays a video
> using the Windows Media Player plugin.
> 
> We wanted to edit the text on that page, using the
> Edit form, we did the modification and then tried to
> save via Change and View. The system returned a
> 'Dynamic tag "embed" not allowed.'; as a matter of
> fact, switching between Visual Mode and HTML Mode
> revealed the  tag.
> 
> Removing the tag allowed us to modify the page. But
> once we placed the tag in the page again, we got the
> same error message.

Looks like you have some CMS based on Zope. So w/o 
knowledge of the nature of that system, nobody
here can help you. Try to contact the admin
or whoever installed it or the author.

With basic Zope objects you would not have such
messages so there must be any custom workflow
which parses your text and strips/forbids tags.

___
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] problem

2005-11-21 Thread David De Maeyer
Hi Jonathan,

Just gave a tried, actually I had tried the same as
you suggested but it doesn't work.

We have a site, say www.mysite.com, and we access the
CMS system via admin.mysite.com. One of the page
displays a rather simple text and displays a video
using the Windows Media Player plugin.

We wanted to edit the text on that page, using the
Edit form, we did the modification and then tried to
save via Change and View. The system returned a
'Dynamic tag "embed" not allowed.'; as a matter of
fact, switching between Visual Mode and HTML Mode
revealed the  tag.

Removing the tag allowed us to modify the page. But
once we placed the tag in the page again, we got the
same error message.

Say we had a page test.html; seen from the Edit form
(HTML Mode) one could see:

Paragraph 1 starts here.
 
Download movie here
End

This worked fine but we could not change the text. Say
we would like to have instead of the above text:

Paragraph 1 starts here.
 
Download movie here
Another end

Doing a Change and View will not work and "End" will
not be replaced by "Another end" and will throw a
"Dynamic tag "embed" not allowed".

Removing the  tag from the page, doing the text
replacement followed by Change and View will however
work:

Paragraph 1 starts here.
Download movie here
Another end

>From that point, it is impossible to put the 
tag into the page again, at least from the Edit form
of admin.mysite.com.

I must have missed something here...

Two things: somebody succeeded in placing a dynamic
tag  a page but the Edit form won't allow us to
modify that page because such a dynamic tag seems not
to be allowed...

Weird...

Regards
David








___

Appel audio GRATUIT partout dans le monde avec le
nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com






___ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.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] Hard-coded "Content-type:text/xml" as xmlrpc in Zope (2.8.1)

2005-11-21 Thread John Ziniti
Back in June 2004, I had the following problem:

http://mail.zope.org/pipermail/zope/2004-June/151436.html
http://mail.zope.org/pipermail/zope/2004-June/151492.html
http://mail.zope.org/pipermail/zope/2004-June/151497.html
http://mail.zope.org/pipermail/zope/2004-June/151498.html

which came about because HTTPRequest.py was hard-coded
to assume that any request with a Content-type of "text/xml"
is an xmplrpc call and handles the request as such.

I resolved this issue with the help of [EMAIL PROTECTED], who
gave me the XmlFix product, which monkey-patches the
HTTPRequest.processInputs method to respond a bit more
appropriately.  We noted in the thread that although Zope's
behavior is broken, it is unlikely to change for
historical reasons.  I am fine with this and felt comfortable
with the simplicity and supportability of the monkey-patch.

This monkey-patch was no longer effective recently when I
upgraded our Zope instances to 2.8.1.

Zope-2.8.1 now additionally has the zope.app.publication.
HTTPPublicationRequestFactory class, which also assumes
that "text/xml" means xmlrpc (in fact, it assumes that
anything that startswith('text/xml') is an xmlrpc call).

Not fixing old code which acts in strange hard-coded ways is
something I understand, but adding new code that also
acts that way seems like it is getting further away
from "good" :)

Can anything be done to change the behavior in the
HTTPPublicationRequestFactory so that it is not so
obtuse?  My monkey-patch now has to munge two methods
to make xml uploads work and I am less happy with it
than I was before.

Thanks for your time,
John Ziniti

___
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] probably a simple answer..

2005-11-21 Thread Nikko Wolf

External methods can certainly use the built in Python "open" function.

However, I'd shudder at the thought of creating an "Excel" file rather
than a plain-text CSV (comma separated values) file, since the former is
(I presume) closed-source and binary, whilst the latter is simple text,
human readable and should be easy to make.  However, it sounds like this
part might already be working, so YMMV.

Also, it sounds like you're intending to have Zope/Plone generate the
file, and then placing it on a file system so that users can get at it
"from anywhere".   Keep in mind that if the data in MySQL changes, the
file system version won't (necessarily) have been updated hence
it'll be out of date with no indication to the viewer.

To solve that, presuming you're only providing file system access for
MSWindows clients, you could put a MSW-style-URL-link file on the shared
file system.  Then you would have semi-transparent access to the current
data through a file system "file" (if there is anonymous access or
authentication transparent to the user).

And if you *DO* write the file to the file system, be sure to test for
concurrent read/write conflicts on the file (and it's timing related, so
do lots of read-hits while writing, or use a write-and-rename scheme. (I
could recount a horror story of intermittently lost data at the customer
site that I never did duplicate locally).

Either way, good luck.


Kate Legere wrote:

Well, we're working on porting it over from linux but at the moment that's
my only option... I just had this impression that I'd seen something whereby
I could write to the filesystem using an external method.

Kate

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 17, 2005 1:06 PM

To: Kate Legere; zope@zope.org
Subject: RE: [Zope] probably a simple answer..

Well, I can suggest how I might approach it, which might be different 
than what you intend... but for what it is worth...


First, run Zope on a Windows server so you can interact with an Excel 
file as an ODBC Data Source (DSN).  You could setup a Zope/ODBC 
adaptor Product like zodbc or (better) mxODBC in Zope.  Then in 
Windows control panel, setup an ODBC DSN to the Excel file, and 
create a Zope/ODBC connection in the ZMI.  Then you might be able to 
use ZSQL methods, or Python if you perfer, perhaps using SQL or the 
Windows API, to write to the Excel spreadsheet. You might have to use 
some sort of external file storage for the Excel file, i.e. I'm not 
sure how you could store the Excel file in the ZODB and still 
interact with it and expose it through Zope, though that might be 
possible. 

Like Andreas said, you can't write to a users file system directly,  
if that's what you meant.






___
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] problem

2005-11-21 Thread Jonathan


- Original Message - 
From: "David De Maeyer" <[EMAIL PROTECTED]>

To: 
Sent: Monday, November 21, 2005 11:07 AM
Subject: [Zope]  problem



Hi all,

Got a weird problem with Zope... One of our user
reported the following issue (under Zope 2.6.0):

One html page makes use of the  tag to show and
play a MPEG video using the Windows Media Player. When
we tried to edit that page for a minor text revision
and saved that page, Zope did throw a 'Dynamic tag
"embed" not allowed.'... and the change made to the
page was lost.

We then decided to remove the  tag, just did a
cut, and proceeded with the text revision. It worked
but as one could expect we couldn't get the 
tag pasted into the document without having Zope
complaining about that tag.

Therefore a simple question: how do we get Zope to
properly deal with this  tag again? Is it is a
configuration problem?

Any idea?


I tried the following quick dtml method in zope 2.6.4  and it worked ok:


http://www.apple.com/quicktime/download/";>



so I am guessing that your problem is not the  tags


Jonathan






___
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] problem

2005-11-21 Thread Andreas Jung



--On 21. November 2005 17:07:43 +0100 David De Maeyer <[EMAIL PROTECTED]> 
wrote:




Therefore a simple question: how do we get Zope to
properly deal with this  tag again? Is it is a
configuration problem?




I don't know of any code in Zope that deals with the EMBED.
The HTML generated through your programming is "just" send back
to the client. Please provide an example to reproduce your issue.

-aj



pgpmDE7GSYdu2.pgp
Description: 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 )


[Zope] problem

2005-11-21 Thread David De Maeyer
Hi all,

Got a weird problem with Zope... One of our user
reported the following issue (under Zope 2.6.0):

One html page makes use of the  tag to show and
play a MPEG video using the Windows Media Player. When
we tried to edit that page for a minor text revision
and saved that page, Zope did throw a 'Dynamic tag
"embed" not allowed.'... and the change made to the
page was lost.

We then decided to remove the  tag, just did a
cut, and proceeded with the text revision. It worked
but as one could expect we couldn't get the 
tag pasted into the document without having Zope
complaining about that tag.

Therefore a simple question: how do we get Zope to
properly deal with this  tag again? Is it is a
configuration problem?

Any idea?

Regards

David De Maeyer










___ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.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 )


Re: [Zope] DateTime mess

2005-11-21 Thread Andreas Jung



--On 21. November 2005 15:37:42 +0100 Jürgen Herrmann 
<[EMAIL PROTECTED]> wrote:


btw. you mentioned mxDateTime - is it recommendable to make it a
requirement for zope or should we better stick to python's datetime?




Python's datetime module would be the way to go. In 2001/2002 mx.DateTime
was the only reasonable alternative.

-aj



pgpMmLEXeCduV.pgp
Description: 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] cookie crumbler and error messages

2005-11-21 Thread paul hendrick
Hi, thanks for the reply.
I did what you asked and the error log produced these messages:

Unauthorized: You are not authorized to access this resource.
Username and password are not correct.
Unauthorized: You are not allowed to access 'sql_select' in this context
the sql_select error is because my .metadata file is denying requests to it for users with a certain role. 
no idea where to go from here i'm afraid

cheers,
Paul
On 11/18/05, Dieter Maurer <[EMAIL PROTECTED]> wrote:
Paul Hendrick wrote at 2005-11-16 17:28 +:>I'm using CookieCrumbler on a project which sits in / on one server,>and /project in another.>I'd like to secure a part of the site through *.metadata files so that
>users of a certain role can't access it. this is done and works well.>however, when they try to access a part of the site which is secured,>they're:>a- given a log in popup prompt which they don't have the details for.
What is "a log in popup prompt"?Do you mean the browser login dialog?Usually, you should get the cookie crumblers login form.If you get instead a browser login dialog, this means that
something went wrong. Often, it means that the URL locatedobject itself was not protected but it accesses a protected object.Reconfigure your "error_log" object (ZMI, "Root Folder")
to not ignore "Unauthorized" exceptions.Reproduce the error and look what the "error_log" might tellyou about it.--Dieter-- cheers,
paul web : http://www.currentlyfabulous.com/blog
___
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] DateTime mess

2005-11-21 Thread Lennart Regebro
On 11/21/05, Andreas Jung <[EMAIL PROTECTED]> wrote:
>
> --On 21. November 2005 15:14:50 +0100 Lennart Regebro <[EMAIL PROTECTED]>
> wrote:
> > Well, that would be cool. Just a question: How do you plan to keep and
> > verify backwards compatibility? Any database, with any type of
> > DateTime object, must work transparently.
>
> Perfect question. When we considered rewriting DateTime using mx.DateTime
> in 2001 we could answer this question :-) That's why the rewrite never
> happened.
>
Yes, it's probably easier to move the applictaion over to using
datetime instead.

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
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] DateTime mess

2005-11-21 Thread Jürgen Herrmann

[ Lennart Regebro wrote:]
> On 11/21/05, Jürgen Herrmann <[EMAIL PROTECTED]> wrote:
>> recently i came up here with the intention to fix DateTime#strftime().
>> while trying this, i had to dig deeper and deeper into the
>> implementation
>> of DateTime and especially the timezone and daylight saving stuff.
>> to be honest, it's completely hacked together :(
>
> Yup.
>
>> sorry guys, i won't be able to completely fix this for now. i found
>> a way to monkey patch zope to make it work for my case (2 timezones
>> only). my plan is to completely reimplement DateTime, based on
>> python's datetime in my own freetime (maybe around xmas this year)
>> and give it back to the community.
>
> Well, that would be cool. Just a question: How do you plan to keep and
> verify backwards compatibility? Any database, with any type of
> DateTime object, must work transparently.

100% compatibility isn't desireable, because its broken atm ;P
___

>> XLhost.de - eXperts in Linux hosting <<

Jürgen Herrmann
Bruderwöhrdstraße 15b, DE-93051 Regensburg

Fon:  +49 (0)700 XLHOSTDE [0700 95467833]
Fax:  +49 (0)721 151 463027
WEB:  http://www.XLhost.de
___
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] DateTime mess

2005-11-21 Thread Jürgen Herrmann

[ Andreas Jung wrote:]
>
>
> --On 21. November 2005 15:14:50 +0100 Lennart Regebro <[EMAIL PROTECTED]>
> wrote:
>> Well, that would be cool. Just a question: How do you plan to keep and
>> verify backwards compatibility? Any database, with any type of
>> DateTime object, must work transparently.
>
> Perfect question. When we considered rewriting DateTime using mx.DateTime
> in 2001 we could answer this question :-) That's why the rewrite never
> happened.
>
> -aj

well, i'm aware of that issue. because DateTimes are probably used
very heavily i personally would prefer an offline update strategy, though
that could be quite tough, requiring to operate at zodb level and
inspecting every pickle. i'd prefer it for speed reasons, lazy update
always has to check the "format" of the instance and do the conversion
if necessary.
probably the offline strategy is not convenient enough for john q. public,
though...

is there a way to hook into the unpickling process of DateTime if we
choose the lazy update method?

btw. you mentioned mxDateTime - is it recommendable to make it a
requirement for zope or should we better stick to python's datetime?

regards, juergen herrmann
___

>> XLhost.de - eXperts in Linux hosting <<

Jürgen Herrmann
Bruderwöhrdstraße 15b, DE-93051 Regensburg

Fon:  +49 (0)700 XLHOSTDE [0700 95467833]
Fax:  +49 (0)721 151 463027
WEB:  http://www.XLhost.de
___
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] convert DTML Document to a folder.

2005-11-21 Thread Martin Koekenberg

yes,
 
That was my idea. Is there a solution for that convert.
 
Martin Koekenberg
-Original 
Message-From: Jonathan Cyr <[EMAIL PROTECTED]>To: Martin 
Koekenberg <[EMAIL PROTECTED]>Cc: zope@zope.org
Date: Fri, 18 Nov 2005 17:21:00 -0500Subject: Re: [Zope] convert DTML 
Document to a folder.So, you'd like 
to turn an independent entry into a container to hold more info?
-JonMartin Koekenberg wrote: 
The DTML Documents are userinfo documents.

I want to create a photoorder form and generate a dtml document with that 
users orders. I want to place that in his user folder.

Martin Koekenberg
-Original Message-
From: Andreas Jung 
<[EMAIL PROTECTED]>
To: Martin Koekenberg 
<[EMAIL PROTECTED]>, 
zope@zope.org
Date: Wed, 16 Nov 2005 15:42:35 +0100
Subject: Re: [Zope] convert DTML Document to a folder.

  
--On 16. November 2005 15:35:14 +0100 
Martin Koekenberg 

<[EMAIL PROTECTED]> wrote:


Hello,

Is it possible to convert a DTML Document to a folder, Both with
properties  ?
I use Zope 2.8.4.

  Converting a piece of textual content 
to a folder makes no sense. WHat
are 
you trying to do???

-aj




___
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 )

  -- 
Jonathan Cyr

http://www.cyr.info
http://www.weddingweblog.com

[EMAIL PROTECTED]

___
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] DateTime mess

2005-11-21 Thread Andreas Jung



--On 21. November 2005 15:14:50 +0100 Lennart Regebro <[EMAIL PROTECTED]> 
wrote:

Well, that would be cool. Just a question: How do you plan to keep and
verify backwards compatibility? Any database, with any type of
DateTime object, must work transparently.


Perfect question. When we considered rewriting DateTime using mx.DateTime
in 2001 we could answer this question :-) That's why the rewrite never
happened.

-aj

pgpymYbADwBY2.pgp
Description: 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] DateTime mess

2005-11-21 Thread Lennart Regebro
On 11/21/05, Jürgen Herrmann <[EMAIL PROTECTED]> wrote:
> recently i came up here with the intention to fix DateTime#strftime().
> while trying this, i had to dig deeper and deeper into the implementation
> of DateTime and especially the timezone and daylight saving stuff.
> to be honest, it's completely hacked together :(

Yup.

> sorry guys, i won't be able to completely fix this for now. i found
> a way to monkey patch zope to make it work for my case (2 timezones
> only). my plan is to completely reimplement DateTime, based on
> python's datetime in my own freetime (maybe around xmas this year)
> and give it back to the community.

Well, that would be cool. Just a question: How do you plan to keep and
verify backwards compatibility? Any database, with any type of
DateTime object, must work transparently.

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
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] HTML to PDF.

2005-11-21 Thread Chris Withers

A tool to do what, specifically?

Chris

Fernando Lujan wrote:

Chris Withers wrote:


Fernando Lujan wrote:

It's easy to configure and stuff? We currently are working with the 
reportlab, but it's painful to change the document... :(  I need a 
product which generates a PDF file on the fly. 




I'm guessing you're using the open source reportlan library?
Maybe you should think about going up to the RML processor they do, 
which costs money but is pretty amazing.


What sort of budget do you have for this?

A small budget. But my company is really interested in such 
processor/tool/product. Long ago, I sent a e-mail


to the reportlab team. I wanted to know if they provide a tool similar 
to iReport. But I received no answer.


Now, I ask again... is there such tool?

Thanks in advance,
Fernando Lujan


___
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 )



--
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] Check Interval

2005-11-21 Thread Chris Withers

Its not a problem - I'm just curious as to why this is/may be.  From
reading docs/postings online, it seems to me that the higher the check
interval is, the faster the site should be (up to a point -- law of
diminishing returns sort of thing).  It is completely opposite for me
and inquiring minds want to know...


Matt, your box is only single processor right? I wonder if that and/or 
the fact that you have the zeo client and server on the same box has 
anything to do with it...


From my experience there is usually no need to change the interval...even 

not for large sites..


Well, necessary, no, your site will still function ;-) But, if Matt's 
found ways to speed up his servers by tweaking the check interval, I'm 
certainly interested, even if no-one else is!


Matt, what kind of speed increase did you see? How did you measure 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] does anyone know of something like this

2005-11-21 Thread Chris Withers

Kate Legere wrote:

I develop for a library and wanted to know if there was a zope product that
might accomplish what we're looking for before we build it ourselves.

We have a number of book club sets that are loaned out to patrons for a 6
week period. The way in which this differs from our regular collection is
that patrons can reserve a set by date rather than just joining a waiting
list.  Right now the way it works is almost beyond belief in it's complexity
and archaic-ness. 


As I say, we can build an application that will handle this but it seems
like it might be a common enough situation that if there was already
something out there that we could just modify we might be better off doing
that. 


I've certainly never heard of anything like this, so you may want to 
start implementing yourself...


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] Render a string as tal

2005-11-21 Thread Chris Withers

Alan Warren wrote:

On 11/18/05, Chris Withers <[EMAIL PROTECTED]> wrote:


Alan Warren wrote:


single image into a folder.  So, I have a folder called view.  When an
image is viewed the URL looks like
/some_album/some_pic.jpg/view/?display=large

The code looks like this:

   



ouch.



Thanks.


This is really contorted. Why do you use URL2 and URL3?


To extract just the id of the image being viewed.  The relative path
from the template that presents the image to the image being presented
will always match that pattern.


*cries*


Is imgObj not just 'here' anyway?


Not in a manner I could easily work with, view is a folder containing
index_html (the page template in question), and a handful of other
page templates and scripts -- all of which are specific actions a user
may wish to perform on a single image -- rather than on a whole album.


*sigh* I can see why you want this, but I'd loose the 'view' folder and 
just have the methods somewhere acquirable...


in fact, I'd just rename your index_html to 'view'.

Then you can just replace all instances of imgObj with 'context'


Why do you do a global define?


Because I'm godless.


huh?


The question I was trying to answer wasn't about some coding style
issue, but rather about how to convert a string path to an object at
run-time.  


You should very rarely have to do this. If you end up doing this, big 
alarm belsl should start ringing ;-)


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 )


[Zope] DateTime mess

2005-11-21 Thread Jürgen Herrmann
hi all!

recently i came up here with the intention to fix DateTime#strftime().
while trying this, i had to dig deeper and deeper into the implementation
of DateTime and especially the timezone and daylight saving stuff.
to be honest, it's completely hacked together :(
DateTimeZone.py has one BIG dictionary in it, not a single line of
comments. values of this dict are nested lists, among other hackish
things (list like usage of a string, with \000 as separator).
the methods that use this dict also have no comments/docstrings at all.
obviously the guy(s) that originally wrote this, is/are hiding (i know
why :) so, there's nobody to ask either...

sorry guys, i won't be able to completely fix this for now. i found
a way to monkey patch zope to make it work for my case (2 timezones
only). my plan is to completely reimplement DateTime, based on
python's datetime in my own freetime (maybe around xmas this year)
and give it back to the community.

once again sry, if i raised expectations on the fix of strftime.

regards, juergen herrmann
___

>> XLhost.de - eXperts in Linux hosting <<

Jürgen Herrmann
Bruderwöhrdstraße 15b, DE-93051 Regensburg

Fon:  +49 (0)700 XLHOSTDE [0700 95467833]
Fax:  +49 (0)721 151 463027
WEB:  http://www.XLhost.de
___
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: ZopeTestCase.Functional and sessions?

2005-11-21 Thread Stefan H. Holek
Well, yes. As you have already discovered, publish() creates it's own  
REQUEST (also see ZPublisher.Test). All you have after a call to  
publish() is the response object. Note that you *can* check ZODB- 
based variables after publish(). However the REQUEST is not stored in  
the ZODB...


Which begs the question why you need publish() in the first place. It  
is only useful if you want to test the Publisher, i.e. the status  
code, or some returned headers and cookies. Everything else can be  
tested directly. How to put a session object into self.app.REQUEST is  
demonstrated in the testShoppingCart.py example test.


Stefan


On 21. Nov 2005, at 03:46, Paul Winkler wrote:


Yes, everything is fine unless you attempt to access the session
from the test code. So I can't see any way to e.g. assert that after
publishing a page, a certain variable is set in the session.
For example, I wish I could rewrite your test like so:

def testUseSessions(self):
response = self.publish(self.folder_path+'/use_session')
self.assertEqual(response.getStatus(), 200)
self.assertEqual(self.app.REQUEST.SESSION.get('foo', 'xxx'),
 'bar')



--
Anything that happens, happens.  --Douglas Adams


___
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 )