[Zope] PyWinTypes15.dll

2000-11-22 Thread Mechtild Hofmann

Hello,

I am looking for "PyWinTypes15.dll", but can't find it, Can someone send me
the .dll for Win NT ? When I want to start LocalFS zope send an error, that
the PyWinTypes15.dll is not in the right folder.

Thank you very much

Mechtild--

in der Heimat tut sich was: http://www.wolterdingen.de
konteXXt - Web-Konzept-Text-Design
07705 / 919391


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

2000-11-22 Thread Kaeidinejad, Shahram

Hi,
who can help me about "vCalendar". I need some example of vCalendar. So can
I understand it better.

bye

Shahram

___
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] Having troubles starting Zope.

2000-11-22 Thread Dany Rioux

Hi Chris,

I should have stated that I didn't upgrade Zope. I mean: it's the same
installation I had before except for the Hotfix which I got from zope.org I
checked this file, though I don't know anything about python, and it doesn't
seem to touch the core of zope's files.

About installing from source. I don't really have anything against that but
the linux box running zope is a P133 w/ 64 MB RAM... It's not a power
compiler if I may add :) so compiling the kind of app zope is makes me think
of compiling X. About an hour or so. I don't really want to get a too tight
grip on the machine's load.

What should gives the environment vars it asks in the error message? Maybe
we could find where it comes from.

In case I really have to. What are the files that should be copied so I keep
my database intact and my configuration too like users and such.

Last, I upgraded the kernel with support for reiserfs. Think that might do
bad things? It's a thought but zope refused to start before the upgrade was
completed, meaning before rebooting the box after the kernel compilation.

What should be the ownership of the /var/lib/zope* and /usr/lib/zope/* ? Is
there a zope user?

Well, that's about all I can think of.

Thanks for the help.

Dany

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Chris McDonough
Sent: Tuesday, November 21, 2000 9:44 PM
To: Dany Rioux
Cc: Zope Mailing List
Subject: Re: [Zope] Having troubles starting Zope.


It sounds like the .deb of Zope (or the hotfix) you have is
misconfigured in some way... I think the Debian Zope maintainer is
Gregor Hoffleit... I'd imagine he'd be interested in a bug report.

But in the meantime, I'd suggest using the Zope source distribution to
install... it's actually not too hard.

1. make sure you have Python installed as well as the Python
"development libraries" (might be easiest to install Python from source
too here, but probably not required)
2. download the latest Zope source tgz
3. ungzip and untar it as a regular user in a directory somewhere you
like
4. run "python w_pcgi.py" in the directory (pay attention to the
password it gives you for the superuser)
5. wait for it to compile (report any errors you come up with in this
step to the list)
6. type "./start"
7. fire up a browser and point it at port 8080
8. log in as superuser and create a management account
9. close the browser
10. open the browser again and log in as the management user.
11. have fun.


Dany Rioux wrote:

 Hi listers,

 Until this afternoon, I was using zope (more like trying to use it) and
 everything was ok. I had some problems with the .deb SiteAccess but I
 fixed it by getting the real thing from zope.org and it worked. I added
 the latest Hotfix because it's a good thing to have. Then I restarted Zope
 but it never went back up again.

 The box is Linux debian woody with Zope 2.2.2

 When I try to start it up, that's the message I get:

 -PASTE---
 drioux:/etc/init.d# ./zope start
 Starting Zope...Traceback (innermost last):
   File "/usr/sbin/zope-z2", line 535, in ?
 except: CLIENT_HOME = os.path.join(INSTANCE_HOME, 'var')
 NameError: INSTANCE_HOME
  failed.
 -/PASTE--

 I went to check the line seeming to cause this and there's a comment about
 ZEO:

 -PASTE---
 # CLIENT_HOME allows ZEO clients to easily keep distinct pid and
 # log files. This is currently an *experimental* feature, as I expect
 # that increasing ZEO deployment will cause bigger changes to the
 # way that z2.py works fairly soon.
 try:CLIENT_HOME = os.environ['CLIENT_HOME']
 except: CLIENT_HOME = os.path.join(INSTANCE_HOME, 'var')
 -/PASTE--

 I remember seeing something about ZEO on zope.org but I don't remember if
 it was an update or whatelse but AFAIK I didn't installed and/or I don't
 use a ZEO client.

 Now, I'm a total Zope newbie. Ok maybe not total but I'm a basic newbie
 and I wonder if the Hotfix fixed too much... I tried to move the Hotfix
 directory elsewhere but that didn't change a thing.

 Anyone can offer help or maybe it's already been discussed. I looked at
 the list's past 2 months but came up empty.

 TIA

 Dany

 ---.oo0O--O0oo.

 Dany Rioux  UnderSoft
 Business:
 www.dating-reviews.com
 [EMAIL PROTECTED]

 Pers:
 www.drioux.com
 [EMAIL PROTECTED]

 ---.o00O---O00o.---

--
Chris McDonough
Digital Creations, Publishers of Zope
http://www.zope.org

___
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 maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 

Re: [Zope] vCalendar

2000-11-22 Thread Morten W. Petersen

[Shahram Kaeidinejad]

| Hi,

Hi,

| who can help me about "vCalendar". I need some example of vCalendar. So can
| I understand it better.

Have a look at these RFCs:

http://www.imc.org/2445
http://www.imc.org/2446
http://www.imc.org/2447

HTH.

-Morten

___
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] is it possible to see whether any user is using a perticular zope object

2000-11-22 Thread subrahmanyan kalathur

hi,
  I got your reply. thanks.

Actually my problem is not that.
I am doing some web based stuff.
So it is natural that more than one users can access the same page at the
same time. So in my project, if such a situation comes then at least one
user will get the error message. To avoid that I am planning to block one
user until the other gets the complete page downloaded. So if it is possible
to see whether the method is used by another user, then I can block that new
user until the first user completes his task.
How can I use dtml-var REQUEST tag for that.
OR do u have any other alternative solution.

I will be grateful to u.
thanks
bye

yours,

K.H.Subrahmanyan

( [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] vCalendar

2000-11-22 Thread Olivier Deckmyn

I think you mean :

http://www.imc.org/rfc2445
http://www.imc.org/rfc2446
http://www.imc.org/rfc2447

Regards

- Original Message -
From: "Morten W. Petersen" [EMAIL PROTECTED]
To: "Kaeidinejad, Shahram" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, November 22, 2000 10:12 AM
Subject: Re: [Zope] vCalendar


 [Shahram Kaeidinejad]

 | Hi,

 Hi,

 | who can help me about "vCalendar". I need some example of vCalendar. So
can
 | I understand it better.

 Have a look at these RFCs:

 http://www.imc.org/2445
 http://www.imc.org/2446
 http://www.imc.org/2447

 HTH.

 -Morten

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

2000-11-22 Thread Thomas Ackermann

On Wed, Nov 22, 2000 at 10:12:15AM +0100, Morten W. Petersen wrote:
 Have a look at these RFCs:
 
   http://www.imc.org/2445
   http://www.imc.org/2446
   http://www.imc.org/2447

As usually:

***
Error code 404

Access denied, or file does not exist 

WN/2.2.5
***

Byebye,
-- 
Thomas Ackermann | Tel. +49-(0)228/631369 | Mobil: 0178-2016033
finger [EMAIL PROTECTED] for public key
 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] sort

2000-11-22 Thread Mechtild Hofmann

Hello again,

I want to sort catalog results e.g. by title alphabetical. But when I type
sort_on='title' I see the titles in order by bobobase-modification-time.
What I am doing wrong ?

Thanks for help

Mechtild--

in der Heimat tut sich was: http://www.wolterdingen.de
konteXXt - Web-Konzept-Text-Design
07705 / 919391


___
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] Search and replace

2000-11-22 Thread tom smith

on 21/11/00 3:05 am, Ender at [EMAIL PROTECTED] wrote:

 Sadly this is a constraint of zope ide's being browser based (or based
 on current browsers). I would eagerly like to help out with a project
 that would like to see this changed.  Building such an interface with
 gnome or kde would be possible, indeed there are already efforts
 underway to do both

Surely something written in python and Tk would be better, so that the
editor could also be run on macs, PCs as well as Linux.

tom


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

2000-11-22 Thread Tom Deprez

Hum, but then you also have to take into account the possible year change.
But a nice idea.

Tom.

At 23:17 21/11/2000 +0100, Dieter Maurer wrote:
Tom Deprez writes:
  Does someone knows how to calculate the date after 6 months of a
certain date?
  
  eg ZopeTime() + 6 months?
  
  Is there an easy formula for this? Or do I've to check myself for a new
  year, leap year
When I would need it (and did not find a better method),
I would use (in an external method):

  1. convert to a Python time tuple
  2. add 6 to the month component (creating a new tuple)
  3. convert back to a DateTime object.

It might be necessary to normalize the time tuple
before 3. with an "time.localtime(time.mktime(tup))".


Dieter



___
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] Pseudo E-Mail Address validation

2000-11-22 Thread Frank Tegtmeyer


 e-mail address exists or not, when you actually send a mail to the user, 
 but a quick-n-dirty check would be nice. Maybe even complete RFC-compliancy 
 as implemented in some Perl-Modules? (spaces, "@" sign, dot-notation etc.)

There is a "monster" regular expression made by Tom Christiansen I think.
A link is on
http://www.perl.com/pub/doc/manual/html/pod/perlfaq9.html#How_do_I_check_a_valid_mail_addr
 

The regular expression may be used in Python too I think.

Regards, Frank

___
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] Question about security

2000-11-22 Thread Phil Harris

You need to use the same method as you would to create a user, manage_users.

If you look at the Zope Quick Reference you will see that it can take  a
parameter called submit which can be 'Add...','Add', 'Edit' or 'Change'.

If you use the 'Change' variant you can change the password as you require.

Take a look in zopedir/lib/python/AccessControl/User.py and then take a
look at the manage_users method in the BasicUserFolder class.

hth

Phil
[EMAIL PROTECTED]

- Original Message -
From: "Harris Peter" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 22, 2000 9:25 AM
Subject: Re: [Zope] Question about security


 Dieter wrote:

 Joaldo Junior writes:
   Does anyone can inform if is there any kind of function,
   which a common user can change your password by the same way a
superuser
 can
   do in ACL_User?
 Look at the built-in Zope API reference: User object.
 The User object has methods to read and change the information
 associated with a user.

 These methods are (of cause) protected such that only
 users with high priviledges can execute them.
 You will need to set a proxy role for the DTML object
 that calls them, in order to allow less priviledged users
 to call them.

 Dieter

 I'm sorry, I must be missing something.

 The API reference I have doesn't contain any such thing. Neither does the
 Zope book, before anyone else suggests that. The DTML on zope.org uses
 a method that isn't recognised by the standard User Folder, so no help
 there.

 If ANYONE has EVER successfully implemented a way for users to
 change their own passwords using standard 2.2 Zope then *please* -
 post your source code here or put a HOWTO on zope.org!

 It's a basic requirement of any system that uses passwords, but if it
can't
 be
 done just admit it. After all, zope is still *quite* good without it. ;-)

 Peter Harris ()





 This message and any files transmitted with it are confidential.
 The contents may not be disclosed or used by anyone other
 than the addressee.
 If you have received this communication in error, please delete
 the message and notify JBB (Greater Europe) Plc immediately
 on 0141-249-6285.

 The views expressed in this email are not necessarily the views
 of JBB (Greater Europe) PLC.
  As it has been transmitted over a public network,
 JBB (Greater Europe) PLC makes no representation nor accepts
 any liability for the email's accuracy or completeness unless
 expressly stated to the contrary.

 Should you, as the intended recipient, suspect that the message
 has been intercepted or amended, please notify
 JBB (Greater Europe) Plc immediately on 0141-249-6285.




 ___
 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 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] Having troubles starting Zope. Now: compiling Zope

2000-11-22 Thread Dany Rioux

Ok, so running dns/imap/mail/apache/zope/samba/nfs/mysql/snmb/sshd and all
the rest of the normal services running (not forgetting the php/cgi/etc
modules of apache) and compiling shouldn't be a problem? :)

I have to admit the box is not receiving that much traffic but I wouldn't
want to slow things more than I have to.

Dany

-Original Message-
From: ucntcme [mailto:ucntcme]On Behalf Of Bill Anderson
Sent: Wednesday, November 22, 2000 5:54 AM
To: Dany Rioux
Subject: Re: [Zope] Having troubles starting Zope.


Dany Rioux wrote:
...
 About installing from source. I don't really have anything against that
but
 the linux box running zope is a P133 w/ 64 MB RAM... It's not a power
 compiler if I may add :) so compiling the kind of app zope is makes me
think
 of compiling X. About an hour or so. I don't really want to get a too
tight
 grip on the machine's load.


I've compiled several Zopes on my p133, sometimes more than one at a
time, no problems. :) Of course, it depend son what _else_ the machine
may be doing. Mine was running mail/dns sevrer at the time, not much
else really.

--
E PLURIBUS LINUX




___
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] Having troubles starting Zope. Now: compiling Zope

2000-11-22 Thread Dany Rioux

I don't really care about my end :) Only the user's :)

But I think it would be a nice idea to implement. I'll give it some
thoughts.

Dany

-Original Message-
From: ucntcme [mailto:ucntcme]On Behalf Of Bill Anderson
Sent: Wednesday, November 22, 2000 6:14 AM
To: Dany Rioux
Subject: Re: [Zope] Having troubles starting Zope. Now: compiling Zope


Dany Rioux wrote:

 Ok, so running dns/imap/mail/apache/zope/samba/nfs/mysql/snmb/sshd and all
 the rest of the normal services running (not forgetting the php/cgi/etc
 modules of apache) and compiling shouldn't be a problem? :)

 I have to admit the box is not receiving that much traffic but I wouldn't
 want to slow things more than I have to.


In my case, I picked a time when I knew traffic would be lower, and
there were no issues. YMMV.

If your browsers are not on the local LAN, but through modem, they
probably wouldn't notice much, if any change, all things being equal. :)

Bill

--
E PLURIBUS LINUX




___
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] ZClass/DTML Document transparency

2000-11-22 Thread Stefan H. Holek

On Tue, 21 Nov 2000, Dieter Maurer wrote:

 Randall Kern writes:
   
   In the case of DTML Documents, the following works fine:
   
   dtml-var sequence-item
   
   In the case of ZClasses, I have to use something like this:
   
   dtml-with sequence-item
 dtml-var index_html
   /dtml-with
   
   But this is rather ugly, and it's the sort of thing one shouldn't have =
   to do in an oo system.

 You may look at the mixin "ZCallable".
 I do not know what it does but the name suggests, it might
 perhaps help you.

I could not make ZCallable work ("too many datafull baseclasses" even if
it is the *only* baseclass). 

Maybe you could use the Renderable product, which lets you override the
__str__ method. 

Stefan


___
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] Having troubles starting Zope. Now FIXED!

2000-11-22 Thread Dany Rioux

I fixed it.

All I had to do was reinstall the zope .deb and it started alright. The
content is still there (though I was almost scared to death having thought
of doing backups AFTER the reinstallation) and all is good.

Well, almost. Now that it's fixed and all is back to normal, I will try to
find what caused this. *crossing fingers*

I'll let you know if I find something.

Dany

---.oo0O--O0oo.

Dany Rioux  UnderSoft
Business
www.dating-reviews.com
[EMAIL PROTECTED]

Personal
www.drioux.com
[EMAIL PROTECTED]

---.o00O---O00o.---


___
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] is it possible to see whether any user is using a perticular zope object

2000-11-22 Thread Chris Withers

subrahmanyan kalathur wrote:
 
 So it is natural that more than one users can access the same page at the
 same time. So in my project, if such a situation comes then at least one
 user will get the error message. 

Why? Zope is a multi-threaded we bserver capable of handling several
simultaneous requests. Many more if you use ZEO, but I would go there
just yet...

cheers,

Chris

PS: Thanks for not using HTML mail anymore ;-)

___
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] is it possible to see whether any user is using a perticular zope object

2000-11-22 Thread Chris Withers

Okay, firstup, keep CC:'ing [EMAIL PROTECTED] so other people can help, and
so other people can _get_ help from any answers you find...

subrahmanyan kalathur wrote:

so now I am getting the error.

What is this error? (the lines starting with 'traceback:' are really
useful...)

 what is that ZEO and all.

It's probably best you don't go there for a while ;-)

cheers,

Chris

___
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] is it possible to see whether any user is using a perticular zope object

2000-11-22 Thread subrahmanyan kalathur

hi,
   when I use the DTML method which include call to SQL methods,
  if someone is also using that DTML Method then either of us get the error
message. And the error message is as follows.


Error Type: SyntaxError
Error Value: unexpected token sequence.near :: "\012Q_name = 'q24'"*''
*** current state = 231 expects: 'EXCEPT', '+',
')', 'HAVING', '-', 'UNION', 'AND', 'GROUP', '*', ';', 'OR', 'ORDER',
'INTERSECT', ('nomatch1',) current token = ((-6, 'WHERE'), 'WHERE')



I would like to avoid that error, instead of  that I would like say 'wait '
or something like that. and after the first one gets the complete page the
other's page should come.

Can u give any suggestions.
thanks
bye

yours,

K.H.Subrahmanyan

( [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] is it possible to see whether any user is using a perticular zope object

2000-11-22 Thread Chris Withers

subrahmanyan kalathur wrote:
 
 Error Type: SyntaxError
 Error Value: unexpected token sequence.near :: "\012Q_name = 'q24'"*''
 *** current state = 231 expects: 'EXCEPT', '+',
 ')', 'HAVING', '-', 'UNION', 'AND', 'GROUP', '*', ';', 'OR', 'ORDER',
 'INTERSECT', ('nomatch1',) current token = ((-6, 'WHERE'), 'WHERE')

It sounds more likely that your SQL has problems. Perhaps you could post
your ZSQL method to the list? (but only if it's shorter than 20 lines
long! ;-)

What dabatase are you using? What database adapter? What versions?

cheers,

Chris

___
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] is it possible to see whether any user is using a perticular zope object

2000-11-22 Thread subrahmanyan kalathur

hi
  I am n using gadfly database.
This is not the problem of ZSQL method.(I think)
Because when only one user is working there won't be any problem.
 It seems like when more than one users access the same table it gives the
error message.
That is why when more than one users try to access the same DTML method
only one will be able to continue , others will get the error message.

thanks

yours,

K.H.Subrahmanyan

( [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] Gadfly

2000-11-22 Thread Chris Withers

subrahmanyan kalathur wrote:
 
   I am n using gadfly database.

That'll be your problem. It's not exactly the most robust database in
the world...

You problems will go away if you move to MySQL, PostGres, Oracle, etc...
or stop using RDBMS'es altogether...

cheers,

Chris

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

2000-11-22 Thread Mario Olimpio de Menezes

On Wed, 22 Nov 2000, Tom Deprez wrote:

 Hum, but then you also have to take into account the possible year change.
 But a nice idea.
 
 Tom.
 
 At 23:17 21/11/2000 +0100, Dieter Maurer wrote:
 Tom Deprez writes:
   Does someone knows how to calculate the date after 6 months of a
 certain date?
   
   eg ZopeTime() + 6 months?
   
   Is there an easy formula for this? Or do I've to check myself for a new
   year, leap year
 When I would need it (and did not find a better method),
 I would use (in an external method):
 
   1. convert to a Python time tuple
   2. add 6 to the month component (creating a new tuple)
   3. convert back to a DateTime object.
 
 It might be necessary to normalize the time tuple
 before 3. with an "time.localtime(time.mktime(tup))".


it seems that DateTime has some functions to do addition and
subtraction; i'm not sure about the behaviour, but it can do:

aDateTime + other
  A DateTime may be added to a number and a number may be added to a
  DateTime; two DateTimes cannot be added

maybe you could do some tests to see the results with this
functions. see DateTime.html in /path/to/zope/lib/python/DateTime

as a guess: aDateTime + 6 x 30

[]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


___
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] is it possible to see whether any user is using a perticular zope object

2000-11-22 Thread Phil Harris

Have you tried using any other dbms to alleviate the problem.

- Original Message -
From: "subrahmanyan kalathur" [EMAIL PROTECTED]
To: "Chris Withers" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, November 22, 2000 11:03 AM
Subject: Re: [Zope] is it possible to see whether any user is using a
perticular zope object


 hi
   I am n using gadfly database.
 This is not the problem of ZSQL method.(I think)
 Because when only one user is working there won't be any problem.
  It seems like when more than one users access the same table it gives the
 error message.
 That is why when more than one users try to access the same DTML method
 only one will be able to continue , others will get the error message.

 thanks

 yours,

 K.H.Subrahmanyan

 ( [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 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] is it possible to see whether any user is using a perticular zope object

2000-11-22 Thread subrahmanyan kalathur

No, 
I haven't used any other DBMS.
I have almost finished working in this gadfly.
So I can't change now.
Because there is no time to change it now.
So please give me the solution.
thanks

yours,

K.H.Subrahmanyan

( [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] is it possible to see whether any user is using a perticular zope object

2000-11-22 Thread Phil Harris

In reality changing the dbms shouldn't cause too many problems (I'd give it
a day to get the conversion done myself).

Try MySQL or Interbase as they work fine on Win32 (which if I remember
correctly is what you use?)

Phil
- Original Message -
From: "subrahmanyan kalathur" [EMAIL PROTECTED]
To: "Phil Harris" [EMAIL PROTECTED]; "Chris Withers"
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, November 22, 2000 11:36 AM
Subject: Re: [Zope] is it possible to see whether any user is using a
perticular zope object


 No,
 I haven't used any other DBMS.
 I have almost finished working in this gadfly.
 So I can't change now.
 Because there is no time to change it now.
 So please give me the solution.
 thanks

 yours,

 K.H.Subrahmanyan

 ( [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] Support for PHP?

2000-11-22 Thread seb bacon

* [EMAIL PROTECTED] [EMAIL PROTECTED] [001121 21:02]:
 
   This was discussed about a month ago.  check the archive.
 
   conclusion was that you can do anything with dtml that php does,
 though with perhaps a little bit more indirection.

and you can do _more_ in python than in php.  python's a 'proper'
language suitable for writing whole apps (e.g. Zope, Medusa) - PHP's
going that way with Zend but it's not there yet.

seb

___
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] is it possible to see whether any user is using a perticular zope object

2000-11-22 Thread Dany Rioux

Hi,

Same as you, i tried to use this gadfly thing when I started and even when
choosing it I received a message from zope telling me that it wasn't the
real thing/unreliable/etc. I *think* there is a more stable GadFly
somewhere but I would advise you to go with mySQL which I use and never had
any problems with.

Unless I'm wrong, it wouldn't be such a pain to change to mySQL or other
DBMS... You would only have to dump the content of the current DB and create
the tables, if necessary. mySQL's learning curve is not that big and is
faily easy to understand/use/get used to.

HTH

Dany

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
subrahmanyan kalathur
Sent: Wednesday, November 22, 2000 7:36 AM
To: Phil Harris; Chris Withers
Cc: [EMAIL PROTECTED]
Subject: Re: [Zope] is it possible to see whether any user is using a
perticular zope object


No,
I haven't used any other DBMS.
I have almost finished working in this gadfly.
So I can't change now.
Because there is no time to change it now.
So please give me the solution.
thanks

yours,

K.H.Subrahmanyan

( [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 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] Exception msg rendering

2000-11-22 Thread seb bacon

LoginManager displays a login form by calling a page something like
this:

dtml-raise "'LoginRequired'"
  html
form action="foo"
  !-- some form doohickeys --
/form
  /html
/dtml-raise

this works fine on one of my boxen but not the other.  The bust one
raises the exception but doesn't print the message.  Instead it
renders my standard_html_header and standard_html_footer, with the
stack trace in comments at the bottom of the page.

Please! Can anyone point me a what might be causing this to happen?

cheers

seb

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

2000-11-22 Thread Tim Cook

Chris Withers wrote:
 
 subrahmanyan kalathur wrote:
 
I am n using gadfly database.
 
 That'll be your problem. It's not exactly the most robust database in
 the world...
 
 You problems will go away if you move to MySQL, PostGres, Oracle, etc...
 or stop using RDBMS'es altogether...
 

I agree. Unless there is a compelling reason, such as sharing
tables with another application. Why not just use ZODB. Life
can't be simplier! g

-- Tim Cook, President --
Free Practice Management,Inc. | http://FreePM.com
Office: (901) 884-4126
Censorship: The reaction of the ignorant to freedom.

___
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] random object with properties

2000-11-22 Thread Kevin Worth

At 11:21 PM +0100 11/21/00, Dieter Maurer wrote:
Kevin Worth writes:
   I'm trying to find/write a method that will choose a random image
   from a folder (easy, using the random how-to)  But I also want to
   display the caption for the image, which is a property of that image.
  
   This method:
  
   dtml-var expr="_.whrandom.choice(objectValues('Photo'))"
   dtml-if captiondtml-var caption/dtml-if
  
   presents me with a random photo, but no caption.
dtml-let photo="_.whrandom.choice(objectValues('Photo'))"
dtml-var photo
dtml-with photo
   dtml-if caption/dtml-if
/dtml-with


This does not work with a "Photo" from the ZPhoto product.  Anyone 
know why?  It grabs the caption from the folder containing the Photo 
(which I created for testing this)  If I use the standard "Image" it 
works beautifully, and should work for my purposes.
-- 
---
Kevin Worth [EMAIL PROTECTED]
Computer Systems Specialist II and Adjunct Lecturer
Department of Materials Science and Engineering
University of Michigan 

___
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] Error Installing PKT

2000-11-22 Thread Dany Rioux

I just installed PKT and I can't import DemoPortal.zexp.

I get this error

--PASTE
Zope Error
Zope has encountered an error while publishing this resource. 

Error Type: ImportError
Error Value: No module named PythonMethod.PythonMethod

-/PASTE

I would guess I'm missing some module. Anyone can tell me which one it is?

TIA.

Dany

---.oo0O--O0oo.

Dany Rioux  UnderSoft Inc.
Business
www.dating-reviews.com
[EMAIL PROTECTED]

Personal
www.drioux.com
[EMAIL PROTECTED]

---.o00O---O00o.---

BEGIN:VCARD
VERSION:2.1
N:Rioux;Dany;;M
FN:Dany Rioux
ORG:UnderSoft Inc.
TITLE:President
TEL;WORK;VOICE:(506) 753-7515
ADR;WORK:;;78B Roseberry St;Campbellton;NB;E3N 2G7;Canada
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:78B Roseberry St=0D=0ACampbellton, NB E3N 2G7=0D=0ACanada
X-WAB-GENDER:2
BDAY:20010710
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
EMAIL;INTERNET:[EMAIL PROTECTED]
EMAIL;INTERNET:[EMAIL PROTECTED]
EMAIL;INTERNET:[EMAIL PROTECTED]
EMAIL;INTERNET:[EMAIL PROTECTED]
REV:20001122T152751Z
END:VCARD



[Zope] Multiple ZODBC sources

2000-11-22 Thread Capesius, Alan

I need to join tables from two ODBC sources, one MS Access one SQL. 

ZODBC DA seems to be limited to one data source at a time. Is there any way
to join tables from two different sources?


Alan Capesius, MCSE+20
Technical Support Engineer
Sysmex Corporation of America
[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] Multiple ZODBC sources

2000-11-22 Thread Andrew Kenneth Milton

+---[ Capesius, Alan ]--
| I need to join tables from two ODBC sources, one MS Access one SQL. 
| 
| ZODBC DA seems to be limited to one data source at a time. Is there any way
| to join tables from two different sources?

Write a method to copy the results from Access into a temporary table of the 
other.

Then do your query and clean up.

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[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] Multiple ZODBC sources

2000-11-22 Thread Phil Harris

Link the SQL table into Access and then use both from Zodbcda connected to
Access.

hth

Phil
- Original Message -
From: "Capesius, Alan" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 22, 2000 3:56 PM
Subject: [Zope] Multiple ZODBC sources


 I need to join tables from two ODBC sources, one MS Access one SQL.

 ZODBC DA seems to be limited to one data source at a time. Is there any
way
 to join tables from two different sources?


 Alan Capesius, MCSE+20
 Technical Support Engineer
 Sysmex Corporation of America
 [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 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] Multiple ZODBC sources

2000-11-22 Thread Chris Gray

I wonder if something like this would work:

dtml-in selectFromTable1
  dtml-in selectFromTable2
 dtml-if idFromTable1 = idFromTable2
display parts of the two records
 /dtml-if
  /dtml-in
/dtml-in

Might be more efficient to make one of the dtml-ins a dtml-with and find
the item with the matching id.

Interesting problem, I wish I had some time to play around with it.

Chris


On Thu, 23 Nov 2000, Andrew Kenneth Milton wrote:

 +---[ Capesius, Alan ]--
 | I need to join tables from two ODBC sources, one MS Access one SQL. 
 | 
 | ZODBC DA seems to be limited to one data source at a time. Is there any way
 | to join tables from two different sources?
 
 Write a method to copy the results from Access into a temporary table of the 
 other.
 
 Then do your query and clean up.
 
 -- 
 Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
 The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
 ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
 PO Box 837 Indooroopilly QLD 4068|[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 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] Error Installing PKT

2000-11-22 Thread Steve Drees

 Zope Error
 Zope has encountered an error while publishing this resource. 
 
 Error Type: ImportError
 Error Value: No module named PythonMethod.PythonMethod

You are missing PythonMethod.

___
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] Multiple ZODBC sources

2000-11-22 Thread Chris Gray

Another thing that would work:

dtml-in selectFromTable1
   dtml-in expr="selectFromTable2(id=_['id'])"
  display record
   /dtml-in
/dtml-in

Chris


On Wed, 22 Nov 2000, Phil Harris wrote:

 Link the SQL table into Access and then use both from Zodbcda connected to
 Access.
 
 hth
 
 Phil
 - Original Message -
 From: "Capesius, Alan" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, November 22, 2000 3:56 PM
 Subject: [Zope] Multiple ZODBC sources
 
 
  I need to join tables from two ODBC sources, one MS Access one SQL.
 
  ZODBC DA seems to be limited to one data source at a time. Is there any
 way
  to join tables from two different sources?
 
 
  Alan Capesius, MCSE+20
  Technical Support Engineer
  Sysmex Corporation of America
  [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 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 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] Error Installing PKT

2000-11-22 Thread Stefan H. Holek

On Wed, 22 Nov 2000, Dany Rioux wrote:

 Error Value: No module named PythonMethod.PythonMethod
 
 I would guess I'm missing some module. Anyone can tell me which one it is?

Well, you seem to be missing PythonMethods ;)

You must get them from the CVS. See http://www.zope.org/Resources/CVS_info

Stefan


___
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] New releases of Zwiff and ZCVSMixin...

2000-11-22 Thread Steve Spicklemire


For those who are paying attention ;-)   there are new releases of
Zwiff and ZCVSMixin at zope.org. There will be a new DumbZPatternsExample
later today or tomorrow...

The Zwiff release has been updated with the latest patches of ming and
now has lots of working examples. You download the examples, and the source
files (fonts, sounds, pics etc... ) for the examples separately.

ZCVSMixin just has a minor bug fix about comments in CVS log files.

DumbZPatternsExample now has three interacting Specialists and better
separation of UI, Domain and Implementation stuff 

cheers,
-steve


___
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] Error Installing PKT. FIXED

2000-11-22 Thread Dany Rioux

I should have guessed :)

Either I misread the install docs or it wasn't mentioned...

Thanks to Stefan and Steve. It's installed and working.

Dany :)

-Original Message-
From: Stefan H. Holek [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 22, 2000 12:54 PM
To: Dany Rioux
Cc: Zope Mailing List
Subject: Re: [Zope] Error Installing PKT


On Wed, 22 Nov 2000, Dany Rioux wrote:

 Error Value: No module named PythonMethod.PythonMethod

 I would guess I'm missing some module. Anyone can tell me which one it
is?

Well, you seem to be missing PythonMethods ;)

You must get them from the CVS. See http://www.zope.org/Resources/CVS_info

Stefan



 smime.p7s


Re: [Zope] Pseudo E-Mail Address validation

2000-11-22 Thread Martin Winkler

At 10:58 22.11.2000, Frank Tegtmeyer wrote:
There is a "monster" regular expression made by Tom Christiansen I think.
A link is on
http://www.perl.com/pub/doc/manual/html/pod/perlfaq9.html#How_do_I_check_a_valid_mail_addr
 


Yes, I know this link - especially the absolutely voodoo-style regex by J. 
Friedl ("Mastering Regular Expressions", O'Reilly). I tried to "pythonify" 
the regex, but I failed. Python exits with some strange errors. Maybe 
Python is not that exceptionally good in regex as Perl? *duck*

So I'm using the simpler method proposed by Dennis Nichols in this thread. 
Thanks Dennis!

Martin


___
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] Speaking of Python Methods....

2000-11-22 Thread Steve Drees

What's the PythonMethod equivalent of:
dtml-with callTypes
dtml-var "_.getitem(_.str(2)).Name"
/dtml-with

--
Steve Drees 
SysAdmin/Software Developer/Web Geek/Chief Bottle Washer
"A problem well-stated is a problem half-solved."
http://www.christianmp3zone.com/savanna


___
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] Speaking of Python Methods....

2000-11-22 Thread Brian Lloyd

 What's the PythonMethod equivalent of:
 dtml-with callTypes
 dtml-var "_.getitem(_.str(2)).Name"
 /dtml-with

I should guess:

callTypes['2'].Name


Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.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] Where does ZClassID come from?

2000-11-22 Thread Stefan H. Holek

How is the class id of a ZClass computed? From the filename?
Does this mean I cannot have MyZClass-0-0-1.zexp because the name must not
change?

TIA
Stefan

--
Things work better when plugged in 


___
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] Executing Z SQL Methods via a URL request

2000-11-22 Thread Nick McDowell








Hi,



I have a Z SQL method that requires an id value which it users to perform
a select statement. I am trying to
pass this id value via a URL, which calls a DTML method who in turn calls the
Z SQL Method. I have been using
URL which looks like: http://localhost/getarticle.html?id=23. Getarticle.html contains only one line
- dtml-call testselect and testselect is the Z SQL method performing
the db select.



I have tried several different combinations but nothing seems to work. Does anybody know if this is possible
and if so what am I doing wrong?



Cheers

Nick








[Zope] Free Zope Web space?

2000-11-22 Thread Diarmaid Lynch

Hi,

I'm creating an online newspaper for my school but
unfortunately don't have  Zope / Web server. 

Is there anywhere on the web that would serve this for free.
Has "Zope-Geocities" been created yet??

Your help would be greatly appreciated.


___
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] Search and replace

2000-11-22 Thread Ender

Mario Olimpio de Menezes wrote:
 
 On Tue, 21 Nov 2000, Lee Hunter wrote:
 
  On the other hand I actually *like* the Zope management interface - in fact,
  so far I've found it to be very easy to understand and a total pleasure to
  use. It just doesn't offer some things that I must have - features that
  would probably be hard to incorporate into a browser interface.
 
 
 what about a plug-in, written in {Java | TclTk | whatever_language}?
 I don't have skills to do this but I think this could be done.

 just an idea!

sadly...

cross-browser compatibility would be a pain, and performance would bite.

kapil

___
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] Search and replace

2000-11-22 Thread Ender

tom smith wrote:
 
 on 21/11/00 3:05 am, Ender at [EMAIL PROTECTED] wrote:
 
  Sadly this is a constraint of zope ide's being browser based (or based
  on current browsers). I would eagerly like to help out with a project
  that would like to see this changed.  Building such an interface with
  gnome or kde would be possible, indeed there are already efforts
  underway to do both
 
 Surely something written in python and Tk would be better, so that the
 editor could also be run on macs, PCs as well as Linux.

tk on the macs is flaky, i'm not to sure of Tk's widget potential to do
the needed html rendering quickly ( i haven't looked at grail in a while
though). 

mozilla really seems like the only strong option for cross-platform dev
of a zope ide.

good news though,  from 

http://www.python9.org/p9-applications.html

At a minimum, these sessions will cover the following: The Komodo
Integrated Development Environment, a Mozilla-based, cross platform IDE
which is both extensible and network-oriented; The Python-XPCOM
bindings, which allow the Python programmer to build Mozilla-based
applications and script them; Python for .NET, a new port of Python to
Microsoft's .NET platform; and Visual Python, a plugin for Visual Studio
.NET, which allows the Visual Studio programmer to integrate Python into
her  development environment.


kapil

___
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] Pseudo E-Mail Address validation

2000-11-22 Thread Ender

Martin Winkler wrote:
 
 Hi all,
 
 For a subscription tool of a mailing list I'd like to quick-check the
 e-mail address our users type. Is there a little product/method etc.
 available that does this? I know that you can only be sure whether an
 e-mail address exists or not, when you actually send a mail to the user,
 but a quick-n-dirty check would be nice. Maybe even complete RFC-compliancy
 as implemented in some Perl-Modules? (spaces, "@" sign, dot-notation etc.)
 
 Hoping for an answer,
 
 Martin
 

not feature complete but def. qualifying as a quick-n-dirty-check

dtml-if "'@' in email_addr and '.' in email_addr and not ' ' in
email_addr"
valid dtml-var email_addr
/dtml-if

solves most of my concerns with valid email addrs


kapil

___
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] sending thousands of emails in the background (returning thewebpage immediately) ? webpage immediately) ?

2000-11-22 Thread chas

Going back about 10 months to a problem I had before.

Goal: an end-user fills in a form on a webpage and clicks
  the 'submit' button.  As a result, thousands of 
  customized e-mail messages are sent.

Problems: 
(i)   The msgs are customized so Mailman is not appropriate.
  also, there is substantial workflow so Zope is preferred.
(ii)  The end user only uses a web browser - s/he will not be
  expected to log in and use ZClient, so the previous solution
  suggested below is not viable.
(iii) The confirmation webpage must return immediately... 
  ie. we do not want to wait for all the emails to be 
  sent before the page is returned to the user.
  This has to be processed in the background (perhaps
  for the next hour or so, even if the user logs off).

  Possible scenario : user logs on, fills in form, hits 'submit', 
  confirmation webpage is returned to the user saying it's ok,
  emails start to get sent out, user logs off, emails
  continue to get sent out, user logs back on 2 hrs later
  and its still processing.


Anyone any ideas on this one ? Thanks a lot,

cheers,

chas


 chas wrote
 Zope's dtml-sendmail tag is excellent - it makes sending
 e-mail a breeze. It reminds me of a similar tag that
 Cold Fusion added and which I've noticed many sites use
 for sending out customized newsletters (the "Allaire 
 ColdFusion Application Server" header being the giveaway).
 
 Now, doing the same in Zope, I can loop over the user 
 profiles in our database to extract name, e-mail, and
 even customize the content of the newsletter as follows :
 
 
 dtml-in ZSQL_Select_User_Profiles
 
 !--#sendmail mailhost="ZMailHost"-- 
 To: dtml-var firstname dtml-var email 
 From: robot [EMAIL PROTECTED] 
 Subject: dtml-var random_inanity
 
 Dear dtml-var firstname,
 
 blah blah content (also dependent on his/her likes/preferences)
 
 !--#/sendmail-- 
 
 /dtml-in
 
 
 Nothing groundbreaking so far. But the question then is : how
 is this going to work if the user database numbers 200,000+ ?
 It will take almost half a day to complete and this can't be
 done in one form-submission or page load !


Why not use ZClient to make the request to do the mailout?
It can just happily sit there for half a day (or whatever) chugging
along, without screwing up if your browser goes away.

Anthony


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

2000-11-22 Thread Cees de Groot

Tim Cook [EMAIL PROTECTED] said:
 You problems will go away if you move to MySQL, PostGres, Oracle, etc...
 or stop using RDBMS'es altogether...

I agree. Unless there is a compelling reason, such as sharing
tables with another application. Why not just use ZODB. Life
can't be simplier! g

Will life stay simple (robust, performant) after you've dumped a couple
of hundredthousand records into ZODB? I find using mySQL a PITA compared
to ZODB, but I'm not sure how well it keeps with lots of data...

-- 
Cees de Groot   http://www.cdegroot.com [EMAIL PROTECTED]
GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD  1986 F303 937F E098 9E8B

___
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] External Methods

2000-11-22 Thread Edward Muller

I'm a little new to the python sde of zope and haven't done much with the other
side (dtml,etc), but am getting back into it...So here is how I think you can do
it (note: I've done this myself recently...I'm writing a product, that started
off as a collection of external methods)...

So you have a html form with a submit button. that calls a url
(http://yoursite/folder/externalmethodname)

lets say your form has two valiables it wants to pass to the method. Let's say
the variables are 'foo' and 'foo2'. 

now define you external method in a file in the zope path/Extension
directory..

lets call the file bar.py

okay define your method in the file

def imamethod(self,REQUEST=non):
dosomethingwith(REQUEST['foo'])  #variable foo from the form
dosomethingwith(REQUEST['foo2']) #other variable from the form
REQUEST.RESPONSE.setHeader('content-type','text/html')
REQUEST.RESPONSE.body('HTMLBODYDone!/BODY/HTML')

That's it I think..

This is from memory so I am sure there are some things wrong with it. If anyone
cares to comment (i.e. the zope community) please let me know

On Tue, 21 Nov 2000, Kini Natekar wrote:

 
 Hi,
 
I have got a html form which accepts an input from
 the user. This input has to be passed to a Python
 script, as a parameter, which is added as an external
 method in zope. 
Is there any way to do this ?
 
 
 Regards,
 Kini.
 
 __
 Do You Yahoo!?
 Yahoo! Shopping - Thousands of Stores. Millions of Products.
 http://shopping.yahoo.com/
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 

-- 
...EAM...
[EMAIL PROTECTED]
[EMAIL PROTECTED]
---
'It's because crappy programs offend me.' --Eric Raymond
Grow a ponytail -- view it as your telepathic antenna to other Linux Kernel 
Developers. -- Jeff V. Merkey



___
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] Re: Zope and Websphere

2000-11-22 Thread rob . sheppard

There's a round-up of "the Best Web Application 
Servers" in this month's Linux Magazine (Nov - 8 ball on 
cover). It includes Zope and WebSphere. Its not really a 
comparison though, but it might give you some ideas. 

You could also get some ideas from Kemalus' "Guide 
for Corporate Decision Makers" 
(http://www.zope.org/Members/Kemalus/make_zope_dec
ision). 

I'm no marketer, but if you could find a similar 
document on WebSphere you might be able to do 
a 'real' comparison.

HTH,
Rob


___
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] Re: Zope and Websphere

2000-11-22 Thread rob . sheppard

There's a round-up of "the Best Web Application 
Servers" in this month's Linux Magazine (Nov - 8 ball on 
cover). It includes Zope and WebSphere. Its not really a 
comparison though, but it might give you some ideas. 

You could also get some ideas from Kemalus' "Guide 
for Corporate Decision Makers" 
(http://www.zope.org/Members/Kemalus/make_zope_dec
ision). 

I'm no marketer, but if you could find a similar 
document on WebSphere you might be able to do 
a 'real' comparison.

HTH,
Rob


___
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] Free Zope Web space?

2000-11-22 Thread Chris Withers

Diarmaid Lynch wrote:
 
 I'm creating an online newspaper for my school but
 unfortunately don't have  Zope / Web server.
 
 Is there anywhere on the web that would serve this for free.
 Has "Zope-Geocities" been created yet??

http://www.nipltd.net/free.html

Hope this helps,

Chris

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

2000-11-22 Thread Chris Withers

Cees de Groot wrote:
 
 Tim Cook [EMAIL PROTECTED] said:
  You problems will go away if you move to MySQL, PostGres, Oracle, etc...
  or stop using RDBMS'es altogether...
 
 I agree. Unless there is a compelling reason, such as sharing
 tables with another application. Why not just use ZODB. Life
 can't be simplier! g
 
 Will life stay simple (robust, performant) after you've dumped a couple
 of hundredthousand records into ZODB? I find using mySQL a PITA compared
 to ZODB, but I'm not sure how well it keeps with lots of data...

Shane Hathaway mentioned having a ZODB that was happily running at 11GB,
that's a lot of data in my books ;-)

cheers,

Chris

___
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] Still have error importing DemoPortal.zexp with PTK 0.9.2

2000-11-22 Thread Andrews, Martin

I am trying to install PPT 0.9.2. After installing PythonMethod from CVS I
am still getting an error when trying to import DemoPortal.zexp. Any clues?


  Zope Error

  Zope has encountered an error while publishing this resource. 

  Error Type: SystemError
  Error Value: Failed to import class AnObject from module
  Products.PythonMethod.PythonMethod



  Troubleshooting Suggestions

  The URL may be incorrect. 
  The parameters passed to this resource may be incorrect. 
  A resource that this resource relies on may be encountering an
error. 

  For more detailed information about the error, please refer to the
HTML source for
  this page. 

  If the error persists please contact the site maintainer. Thank
you for your patience. 


Traceback (innermost last):
  File /tmp/makeme23613/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py,
line 222, in publish_module
  File /tmp/makeme23613/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py,
line 187, in publish
  File /tmp/makeme23613/Zope-2.2.2-src/lib/python/Zope/__init__.py, line
221, in zpublisher_exception_hook
(Object: Traversable)
  File /tmp/makeme23613/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py,
line 171, in publish
  File /tmp/makeme23613/Zope-2.2.2-src/lib/python/ZPublisher/mapply.py, line
160, in mapply
(Object: manage_importObject)
  File /tmp/makeme23613/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py,
line 112, in call_object
(Object: manage_importObject)
  File /tmp/makeme23613/Zope-2.2.2-src/lib/python/OFS/ObjectManager.py, line
519, in manage_importObject
(Object: Traversable)
  File /tmp/makeme23613/Zope-2.2.2-src/lib/python/ZODB/ExportImport.py, line
208, in importFile
SystemError: (see above)


---
Martin Andrews
[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] Gadfly

2000-11-22 Thread Edward Muller

On Wed, 22 Nov 2000, Chris Withers wrote:

 Cees de Groot wrote:
  
  Tim Cook [EMAIL PROTECTED] said:
   You problems will go away if you move to MySQL, PostGres, Oracle, etc...
   or stop using RDBMS'es altogether...
  
  I agree. Unless there is a compelling reason, such as sharing
  tables with another application. Why not just use ZODB. Life
  can't be simplier! g
  
  Will life stay simple (robust, performant) after you've dumped a couple
  of hundredthousand records into ZODB? I find using mySQL a PITA compared
  to ZODB, but I'm not sure how well it keeps with lots of data...
 
 Shane Hathaway mentioned having a ZODB that was happily running at 11GB,
 that's a lot of data in my books ;-)
 

Quickly question then...

How would you record data in the ZODB? Would you have to write a Product for
each thing you want to store? If you can provide some links it would be great!

Thanks,

-- 
...EAM...
[EMAIL PROTECTED]
[EMAIL PROTECTED]
---
'It's because crappy programs offend me.' --Eric Raymond
Grow a ponytail -- view it as your telepathic antenna to other Linux Kernel 
Developers. -- Jeff V. Merkey



___
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] Re: is it possible to see whether any user is using a perticular zope object

2000-11-22 Thread Dieter Maurer

subrahmanyan kalathur writes:
  Now I would like to know is it possible to know if any body is using the zope object.
  
  I mean , if one user is running one DTML method ,  I want to know that one user
  is using that object.
  
  Is there any DTML tag for that.
No.
The standard Zope objects do not support something like that.

You may implement that for your own objects.
But it is quite difficult. You would need something like
my "SharedResource" product
(URL:http://www.dieter.handshake.de/pyprojects/zope/SharedResource.html).

As you want to serialize access to your database, you might
be interested in locking. Search the (searchable) list archive
for "lock" and "locking" to find more information about it.
For locking, too, my "SharedResource" can help you.

*HOWEVER*, I follow other posters: it is probably much easier
to switch to a different RDBMS.



Dieter

___
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] random object with properties

2000-11-22 Thread Dieter Maurer

Kevin Worth writes:
  dtml-let photo="_.whrandom.choice(objectValues('Photo'))"
  dtml-var photo
  dtml-with photo
 dtml-if caption/dtml-if
  /dtml-with
  
  
  This does not work with a "Photo" from the ZPhoto product.  Anyone 
  know why?  It grabs the caption from the folder containing the Photo 
  (which I created for testing this)  If I use the standard "Image" it 
  works beautifully, and should work for my purposes.
Are you sure "ZPhoto" photos have a caption attribute/method?
And you are allowed to access them?

If so, they would behave really strange.
The "dtml-with" wraps the photo into an "InstanceDict" and
pushes it onto the namespace stack.
This means, that it is first asked for the "caption" object.
Only if it says "Sorry" the next object on the namespace stack
is asked. This is your folder.


Dieter

___
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 / DCOracle / ZOracleDA / Oracle 7.3.3 crash/respawn problem

2000-11-22 Thread Dieter Maurer

Chris Beaumont writes:
  Unfortunately, if what you meant was to remove the -DDCOracle8 flag from
  the end of my Setup file and recompile, that didn't do it. 
  Zope is still crashing and restarting on perhaps one out of every 100
  requests.
  It seems to be more common when it hasn't been accessed in awhile, do
  you think it could be some kind of cache issue?
I did mean -DDCOracle8 indeed.

Are you sure, that your "_oci.c" has indeed been recompiled
after your change?.
Usually changes in "setup" or "Makefile" do not lead
automatically to a recompilation.

Our problem was a memory corruption in the Oracle "logoff"
function (it has a different name, but is called during
connection close).
During each "close connection", this function released
a block of memory that was still being used.
After several such actions the system became very
unstable: most of the time SIGSEGV (at different places,
however, with peeks in the memory managegment functions)
but sometimes infinite loops, too.

Zope closes the connection, when the DA is evicted from
the cache. Therefore, the problem might well be correlated
with the DA objects not been used for a while.



Dieter

___
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] Analysing Zope startup problems (was: [Zope] zope 2.24b1upgrade on win98 crashing. errno 9?) upgrade on win98 crashing. errno 9?)

2000-11-22 Thread Dieter Maurer

jimbo writes:
  IOError: [Errno 9] Bad file descriptor
Whenever there is a Zope startup problem, you
should edit the command line starting Zope (in "start.bat").
Add "STUPID_LOG_FILE=zope.log".

Start Zope. Of cause, it will crash again.
Look into "zope.log". Maybe you have a change to see
what went wrong.

By the way, I saw a similar problem report in the list.
I cannot remember the details. Search the searchable
list archive for "Bad file descriptor".


Dieter

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

2000-11-22 Thread Dieter Maurer

Tom Deprez writes:
  Hum, but then you also have to take into account the possible year change.
  But a nice idea.
This is handled by the Python "mktime" and "localtime/gmtime".
You need not to worry about.



Dieter

___
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] External Methods

2000-11-22 Thread Dieter Maurer

Kini Natekar writes:
 I have got a html form which accepts an input from
  the user. This input has to be passed to a Python
  script, as a parameter, which is added as an external
  method in zope. 
 Is there any way to do this ?
Your method:

def my_method(REQUEST):
  '''my_method interpreting *REQUEST*.form.'''
  form= REQUEST.form # this is a dictionary containing form
 # variables and associated values
  .


If you like, you can directly use it as form action.
But probably, you will wrap it into a DTML method:

DTML wrapper:

  .
  dtml-call "my_method(REQUEST)"
  .


Dieter


___
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] Multiple ZODBC sources

2000-11-22 Thread Capesius, Alan

Thanks All,

I was hoping I had missed a clean way to do this.  :) 

Access provides link tables, but what if I had two SQL servers? I thought
(still thinking) about the Access link table solution, but I'm not sure I
want the ODBC linking through Access to get to SQL. MS SQL Server also
supports server links via Transact-SQL/XML.

The dtml-in/dtml-with technique suggested by Chris Gray looks the promising.
That will eliminate cross-product problems too. Probably the closest thing
I'll find to a true join. 

So, after some digging and trying I found that you can access multiple
Databases on the same SQL server by setting the ODBC driver up WITHOUT a
default table and qualifying the database as such:

select * from DBNAME..TABLENAME

This method sacrifices the ability to browse for tables through this DSN,
but this can be recovered by creating a secondary table-specific DSN for
browsing purposes. ODBC also supports a configuration that allows
SERVERNAME.DBNAME..TABLENAME configurations but I haven't been able (yet) to
get that working through Zope. This would support direct links to multiple
SQL servers.

Since the ODBC DSN is part of the ZODBC configuration parameters, I expect
that ZODBC cannot provide support for different source types at the ZSQL
Method level.

As far as writing a method to copy from one table to another, this would be
OK in my case because I am using small databases on this app, but not for
larger dbs. That would result in (2 + #_of_records) queries against the SQL
in a realtime database. My app uses a static table (once a day update) for
the Access side, so just moving/migrating this once a day to SQL may be the
best bet. The SQL source is a third party package so I'd rather not put my
table into their database just in case. (Avoid all that finger pointing
later on). The copy table method along with the ZODBC solution above allows
me to add a database to the server outside of the 3rd party's database and
join tables via Zope ZSQL.


-Original Message-
From: Chris Gray [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 22, 2000 10:31 AM 
To: Andrew Kenneth Milton
Cc: Capesius, Alan; [EMAIL PROTECTED]
Subject: Re: [Zope] Multiple ZODBC sources


I wonder if something like this would work:

dtml-in selectFromTable1
  dtml-in selectFromTable2
 dtml-if idFromTable1 = idFromTable2
display parts of the two records
 /dtml-if
  /dtml-in
/dtml-in

Might be more efficient to make one of the dtml-ins a 
dtml-with and find
the item with the matching id.


___
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] External Methods

2000-11-22 Thread Phil Harris

Wouldn't it be better to pass in self?

As in:

def my_method(self,REQUEST=None):
  '''my_method interpreting *REQUEST*.form.'''
  if REQUEST is None:
REQUEST=self.REQUEST # safety_valve in case you forget to pass in
REQUEST
  form= REQUEST.form # this is a dictionary containing form
 # variables and associated values


- Original Message -
From: "Dieter Maurer" [EMAIL PROTECTED]
To: "Kini Natekar" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, November 22, 2000 8:43 PM
Subject: Re: [Zope] External Methods


| Kini Natekar writes:
|  I have got a html form which accepts an input from
|   the user. This input has to be passed to a Python
|   script, as a parameter, which is added as an external
|   method in zope.
|  Is there any way to do this ?
| Your method:
|
| def my_method(REQUEST):
|   '''my_method interpreting *REQUEST*.form.'''
|   form= REQUEST.form # this is a dictionary containing form
|  # variables and associated values
|   .
|
|
| If you like, you can directly use it as form action.
| But probably, you will wrap it into a DTML method:
|
| DTML wrapper:
|
|   .
|   dtml-call "my_method(REQUEST)"
|   .
|
|
| Dieter
|
|
| ___
| 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 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] ZCatalog: setting default to AND (not OR).

2000-11-22 Thread The Doctor What

All good usability books (I'm going to just cite one: "Designing Web
Usability: The Practice of Simplicity" by Jakob Nielsen
http://www.useit.com/jakob/webusability/ ) say searches should be
ANDed by default.

ZCatalog is ORed by default.  How do I change this behavior?

Ciao!

-- 
Room Service? Send up a larger room.
-- Groucho Marx

The Doctor What: Guru to the Godshttp://docwhat.gerf.org/
[EMAIL PROTECTED]   KF6VNC

___
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] BUG: Nasty dtml-sendmail bug - Zope 2.2.4b1, Zope 2.1.6

2000-11-22 Thread Dieter Maurer

Today, I spend 3 hours to analyse a nasty dtml-sendmail bug (Zope 2.1.6):

  Zope reported an SMTP exception: "recipient required"

  It turned out that the "messageText" that arrived in
  "Products.MailHost.MailHost.send" started with an
  empty line. Therefore, "decapitate" could not
  find the "To:", "From:" and "Subject:" headers
  and called "smtplib.send" with an empty "to" list.

  What really confused me: my DTML code did not show
  any sign, where this empty line should come from.
  Moreover, an identically locking DTML object
  worked as expected.


Explanation:
  A collegue had edited the DTML object causing the problems
  with a *WINDOWS* editor and then uploaded the file.
  The Windows editor had added a Control-M after the
  "dtml-sendmail mailhost=...".
  This Control-M caused the spurious empty line.

  In the edit view, the browser did not show the Control-M.
  Therefore, the faulty and the correct DTML objects
  looked completely identical.


I verified that the same bug is in Zope 2.2.4b1, too.
Furthermore, the check for missing "To" and "From" is
ineffective (as "extractHeader" always adds a "To" and "From"
to header, just empty if it can not find the headers).

I will put this into the collector.


Dieter


___
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] Speaking of Python Methods....

2000-11-22 Thread Dieter Maurer

Steve Drees writes:
  What's the PythonMethod equivalent of:
  dtml-with callTypes
  dtml-var "_.getitem(_.str(2)).Name"
  /dtml-with
To get the object:

   getattr(callTypes,'2').Name

then you must do something with it. "dtml-var" would render
it. This means call it, if it is callable and convert to a string.

The "callTypes" above may need to be replaced by
"self.callTypes" or "context.callTypes", if
"callTypes" is not yet in the functions namespace.


Dieter

___
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] Executing Z SQL Methods via a URL request

2000-11-22 Thread Dieter Maurer

Please do *NOT* send HTML mails into this list!

Nick McDowell writes:
  I have a Z SQL method that requires an “id” value which it users to perform
  a select statement.  I am trying to pass this “id” value via a URL, which
  calls a DTML method who in turn calls the Z SQL Method.
When I remember right, someone introduced into Zope 2.1.6's Z SQL
methods that acquisition is stronger than explicitely passed
arguments (and arguments from REQUEST, this is your case).
One says, it was for security reasons.

I think, this is a big bug, and I will change it, whenever
I should see it.

If it is still in Zope 2.2, then you will have only 2 chances:

   1. rename you argument to something that is not
  acquired (as 'id' is).
  In your SQL, you can of cause use the column name
  as it is defined by the table - similar to the
  following:

 where id = dtml-sqlvar renamed_id type=string 


   2. change the code in "Shared.DC.ZRDB.DA.__call__",
  as I would do.

  I did not yet work enough with Zope 2.2 to got
  hit by the bug (if it is still there).
  Therefore, I do not yet have a patch.



Dieter

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

2000-11-22 Thread Katherine Allard



Using Zope, I have managed to put together a nice 
site for friends to create folders, pagesand upload images, etc. But there 
are some fundamentals that are eluding me.

I am able to 'register' a new user through a form 
to create a new acl_user. But I cannot figure out how to let them login again 
using that name/password and be an AUTHENTICATED_USER with that acl_user 
name--other than Anonymous User. I tried to look at AUTHENTICATION_PATH, but my 
browser wants to download it--an empty file.

I can manage objects using dtml pretty well: 
create, delete, edit. If I can figure out how to authenticate a user, I would 
like to be able to add a property tonew objects as they are created: 
(createdby:AUTHENTICATED_USER) so that I can control which objects get a 
checkbox (for delete) and an edit linkfor a particular user. InOtherWords, 
ifa user createsa object, I want that same personto be able to 
go back and delete or edit that object. Anyone else can see it, but they won't 
be able to delete or edit the object.

This confuses me: manage_addProperty takes (id, 
value, type and optionally REQUEST) as args. What is the id? Is it the ID of the 
object that you want to add a property to? Or is it the ID of the new property? 
The Zope Quick Reference doesn't say, but I think it is the property's 
ID.

I am trying to learn from looking at the Zope 
interface work. After submitting the add property form, the page url looks like 
this: appRoot/objectname/manage_addProperty. I see that the objectname is behind 
manage_addProperty, I know the value, id and type are passed in the REQUEST. How 
can I take advantage of this following a line like:

dtml-callexpr="manage_addImage(id=title, 
file=file, title=title)"

...to add a property to that image?

I found some useful tidbits at a howto page on Zope 
site somewhere. But it was pretty sparse and just whetted my appetite. I am 
coming from NT/IIS ASP world. So I am struggling. Can anyone point me to a 
richer source of samples that will help me get up this hill?

Thanks,
Richard


Re: [Zope] Question about security

2000-11-22 Thread Tres Seaver

Harris Peter [EMAIL PROTECTED] wrote:

 
 I'm sorry, I must be missing something.
 
 The API reference I have doesn't contain any such thing. Neither does the
 Zope book, before anyone else suggests that. The DTML on zope.org uses
 a method that isn't recognised by the standard User Folder, so no help
 there.
 
 If ANYONE has EVER successfully implemented a way for users to
 change their own passwords using standard 2.2 Zope then *please* - 
 post your source code here or put a HOWTO on zope.org!
  
 It's a basic requirement of any system that uses passwords, but if it can't
 be done just admit it. After all, zope is still *quite* good without it. ;-)


See http://www.zope.org/Members/tseaver/user_settable_passwords.

Tres.
-- 
===
Tres Seaver[EMAIL PROTECTED]
Digital Creations "Zope Dealers"   http://www.zope.org

___
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] ZCatalog: setting default to AND (not OR).

2000-11-22 Thread Andy McKay

add in an and between terms eg: foo and bar
--
  Andy McKay, Developer.
  ActiveState.
- Original Message - 
From: "The Doctor What" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 22, 2000 2:36 PM
Subject: [Zope] ZCatalog: setting default to AND (not OR).


 All good usability books (I'm going to just cite one: "Designing Web
 Usability: The Practice of Simplicity" by Jakob Nielsen
 http://www.useit.com/jakob/webusability/ ) say searches should be
 ANDed by default.
 
 ZCatalog is ORed by default.  How do I change this behavior?
 
 Ciao!
 
 -- 
 Room Service? Send up a larger room.
 -- Groucho Marx
 
 The Doctor What: Guru to the Godshttp://docwhat.gerf.org/
 [EMAIL PROTECTED]   KF6VNC
 
 ___
 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 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 with Microsoft Access

2000-11-22 Thread Mike Kelland

Hi, this is my first posting to the list, and about my 4th day working with
Zope.  I have a bit of a problem.  All my code so far is working well.  Just
the following section is defying my attempts to make it run.  What it does
is to update a field in the database (to allow employees to quickly update
their hours in the hours tracking thing I'm creating)  it's complex since
all the employees hours will be listed on one page and will be instantly
updatable (with a select box that allows the choice of +/- (name is
modifydtml-var hoursID and value is either + hours already input or -
hours already input) and a text field for entering hours to add or
subtract (name is mod_hoursdtml-var hoursID)).

The code (in the DTML document) is:

dtml-in "REQUEST.form.items()"
dtml-if "_.string.find(_['sequence-key'], 'mod_hours')"
dtml-else
dtml-let mykey=sequence-key myval=sequence-item
dtml-in "REQUEST.form.items()"
dtml-if "_.string.find(_['sequence-key'], 'modify')"
dtml-else
dtml-if "_['sequence-key'][6:9] == mykey[9:12]"
dtml-if myval
dtml-call UpdateHours(REQUEST)
/dtml-if
/dtml-if

/dtml-if
/dtml-in

/dtml-let
/dtml-if
/dtml-in

and the SQL method UpdateHours is:

update emp_hours set hours =
dtml-var expr="_['sequence-item']"
dtml-var expr="_['myval']"
where
hoursID = dtml-var expr="_['mykey'][9:12]";

with arguments: sequence-item, myval, mykey

I've tried everything I can think of but it not only refuses to do anything,
it also refuses to raise an error.

If anyone can help out I'd be very grateful.

Thanks
Mike Kelland
[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] How to get authentiedcated user name in pythong method?

2000-11-22 Thread Dirksen

How can I do that just as dtml-var "AUTHENTICATED_USER.getUserName()" in dtml? I 
don't
want to pass AUTHENTICATED_user as a parameter. A hint please.

cheers
Dirksen

__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Zope with Microsoft Access

2000-11-22 Thread Chris Gray

Isn't the problem your else tags?  Remove them and I think you'll get the
effect you wanted.  As it stands the condition:

dtml-if "_['sequence-key'][6:9] == mykey[9:12]"

is never true.

Chris

On Wed, 22 Nov 2000, Mike Kelland wrote:

 Hi, this is my first posting to the list, and about my 4th day working with
 Zope.  I have a bit of a problem.  All my code so far is working well.  Just
 the following section is defying my attempts to make it run.  What it does
 is to update a field in the database (to allow employees to quickly update
 their hours in the hours tracking thing I'm creating)  it's complex since
 all the employees hours will be listed on one page and will be instantly
 updatable (with a select box that allows the choice of +/- (name is
 modifydtml-var hoursID and value is either + hours already input or -
 hours already input) and a text field for entering hours to add or
 subtract (name is mod_hoursdtml-var hoursID)).
 
 The code (in the DTML document) is:
 
 dtml-in "REQUEST.form.items()"
 dtml-if "_.string.find(_['sequence-key'], 'mod_hours')"
 dtml-else
 dtml-let mykey=sequence-key myval=sequence-item
 dtml-in "REQUEST.form.items()"
 dtml-if "_.string.find(_['sequence-key'], 'modify')"
 dtml-else
 dtml-if "_['sequence-key'][6:9] == mykey[9:12]"
 dtml-if myval
 dtml-call UpdateHours(REQUEST)
 /dtml-if
 /dtml-if
 
 /dtml-if
 /dtml-in
 
 /dtml-let
 /dtml-if
 /dtml-in
 
 and the SQL method UpdateHours is:
 
 update emp_hours set hours =
 dtml-var expr="_['sequence-item']"
 dtml-var expr="_['myval']"
 where
 hoursID = dtml-var expr="_['mykey'][9:12]";
 
 with arguments: sequence-item, myval, mykey
 
 I've tried everything I can think of but it not only refuses to do anything,
 it also refuses to raise an error.
 
 If anyone can help out I'd be very grateful.
 
 Thanks
 Mike Kelland
 [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 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 with Microsoft Access

2000-11-22 Thread [EMAIL PROTECTED]

You may not be entering UpdateHours.

Try dtml-var "0/0" just before the call to UpdateHours.
Or some other obvious way to know if your entering it.

Here's how I coded the same kind of thing.
Although I'm reading the Zope book right now to see how I should have done
it.
The book is good and I might just learn a better solution than 0/0 :)

--- Part of addContact
form action="insertNewContactForm" method="get"
table
trtdName:/tdtdinput type="text" name="name" /td/tr
trtdTitle:/tdtdinput type="text" name="title"/td/tr
trtdPhone:/tdtdinput type="text" name="phone"/td/tr
/table
tabletr
tdinput type="submit" name="cmd" value="Insert"/td
tdinput type="submit" name="cmd" value="Update"/td
tdinput type="submit" name="cmd" value="Delete"/td
tdinput type="submit" name="cmd" value="Clear"/td
/tr/table
/form

---insertNewContactForm
dtml-if expr="_.len(name)  0"
 dtml-if expr="cmd=='Insert'"
   dtml-var insertNewContact
 dtml-elif expr="cmd=='Delete'"
  dtml-call deleteWhere
 dtml-elif expr="cmd=='Update'"
  dtml-call updateWhere
 dtml-elif expr="cmd=='Clear'"
 /dtml-if
/dtml-if
dtml-var "RESPONSE.redirect('addContact')"

--Darrell


___
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] Python Script demo site

2000-11-22 Thread Evan Simpson

A few announcements.  First, in the interests of sanity and
getting things moving, I'm choosing the only name other than
"Python Method" to get a positive score in the naming poll.
I like it, Guido likes it, the community sort of likes it,
so it's official.  Zope 2.3 will introduce "Python Script"
objects.

There will be no "Unrestricted" vs. "Restricted".  If you
want to write unrestricted code, you can use a good old
External Method, or write a small module and import it in a
Script object.

Finally, if you want to give Python Scripts a try, you can
now play with them without any CVS, installation, or Zope
version worries.  Go to http://ps.4-am.com:9000/ , pick a
password, and you'll get your own private area in a trunk
CVS checkout of Zope in which to play.

I plan to add example Scripts, but for now there's just the
raw Zope management interface.  When I add examples, I'll
announce it here on the Zope list.

Cheers,

Evan @ digicool  4-am


___
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] How to get authentiedcated user name in pythong method?

2000-11-22 Thread Phil Harris

self.REQUEST.AUTHENTICATED_USER.getUserName()


- Original Message -
From: "Dirksen" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 23, 2000 1:33 AM
Subject: [Zope] How to get authentiedcated user name in pythong method?


| How can I do that just as dtml-var "AUTHENTICATED_USER.getUserName()" in
dtml? I don't
| want to pass AUTHENTICATED_user as a parameter. A hint please.
|
| cheers
| Dirksen
|
| __
| Do You Yahoo!?
| Yahoo! Shopping - Thousands of Stores. Millions of Products.
| http://shopping.yahoo.com/
|
| ___
| Zope maillist  -  [EMAIL PROTECTED]
| http://lists.zope.org/mailman/listinfo/zope
| **   No cross posts or HTML encoding!  **
| (Related lists -
|  http://lists.zope.org/mailman/listinfo/zope-announce
|  http://lists.zope.org/mailman/listinfo/zope-dev )


___
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 with Microsoft Access

2000-11-22 Thread [EMAIL PROTECTED]

From: "Mike Kelland" [EMAIL PROTECTED]
 What does dtml-var "0/0" actually do?  Looks like all it would do is
 divide by zero which *has* to be some kind of error.  

Yelp, that's exactly what it does.
My goal was to prove one way or another that a bit of code was executed.
Divide by zero is one way to do that.

--Darrell


___
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] ZCatalog: setting default to AND (not OR).

2000-11-22 Thread The Doctor What

I'm sorry.  I seem to have not explained myself very well.

I want ZCatalog to use AND by default.  I think the extended
behaviour, being able to AND and OR keywords together is fine.  I'm
only concerned with the default behaviour (with *no* OR or AND
keywords).

When I first used zope.org's search engine, I couldn't figure out
why if searched for "zcatalog siteaccess" it gave me (seemingly)
every article on the site except the one(s) I wanted.

It's because I expected AND to be the default (the union) of the two
terms, not an OR list.  Frankly, I don't think OR is useful at all
by it self.  It's usually with an AND that it's most useful.

But that's just my humble opinion.  Oh wait, I don't do humbleso
that's just my opinion. ;-)

I wish everyone a happy holiday, whether it's Thanksgiving or
"Laborday/Thanksgiving" (as NPR said Japan was having).

Ciao!

  All good usability books (I'm going to just cite one: "Designing Web
  Usability: The Practice of Simplicity" by Jakob Nielsen
  http://www.useit.com/jakob/webusability/ ) say searches should be
  ANDed by default.
  
  ZCatalog is ORed by default.  How do I change this behavior?
  
  Ciao!
  
  -- 
  Room Service? Send up a larger room.
  -- Groucho Marx
  
  The Doctor What: Guru to the Godshttp://docwhat.gerf.org/
  [EMAIL PROTECTED]   KF6VNC
  

-- 
Now is the time for all good men to come to.
 -- Walt Kelly

The Doctor What: fill in the blank http://docwhat.gerf.org/
[EMAIL PROTECTED]   KF6VNC

___
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] neat trick

2000-11-22 Thread magnus

Just wanted to share something that I thought was kind of neat (if
obvious).  I often present properties from a property sheet, and this
is an easy way to do it:

Assuming there are three fields in the property sheet, called field1, field2
and field3.

table
 trthName/ththValue/th/tr
 dtml-in "('field1', 'field2', 'field3')"
  dtml-if "_[_['sequence-item']]"
   tr
td
 dtml-var "_['sequence-item']" capitalize
/td
td
 dtml-var "_[_['sequence-item']]"
/td
   /tr
  /dtml-if
 /dtml-in
/table

It will give you something like this:

NameValue
--- -
Field1  abc
Field2  def
Field3  ghi

-Magnus

___
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] Re: is it possible to see whether any user is using a perticular zope object

2000-11-22 Thread subrahmanyan kalathur


As you want to serialize access to your database, you might
be interested in locking. Search the (searchable) list archive
for "lock" and "locking" to find more information about it.
For locking, too, my "SharedResource" can help you.

*HOWEVER*, I follow other posters: it is probably much easier
to switch to a different RDBMS.

hi,

   which RDBMS will u suggest.
and for that what are the changes need to be done for my zope.
and where can I get that.
give the links please.

thanks
bye




yours,

K.H.Subrahmanyan

( [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] [Urgent] Zope good for multiprocessor hardware

2000-11-22 Thread Andreas Tille

On Thu, 16 Nov 2000 Andreas Tille wrote:

 we intent to buy new web server hardware.  We want to run Debian GNU/Linux
 on a Sun system.  I wonder if zope could profit from a multi-processor
 architecture on such a system.
 Zope server starts several threads.  So could they be split over the
 different processors automatically, can I enforce it or is it not
 possible.
Sorry for quoting myself but I need this information today because we
have a meeting with some salesman.  If I can not clearly answer this
question it might be bad for implementing zope in our institute because
a wrong designed hardware could lead to another software than zope and
this would be a shame.

Kind regards

 Andreas.


___
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] Microsoft Access database

2000-11-22 Thread Diny van Gool

At 23:07 22-11-00 -0500, John Cappelletti wrote:
[...]
What is the process for connecting to a MS Access database? Can it be
done?

Yes, it can. I'm running Zope 2.2.0 on Windows98 with Access97. You'll have
to use the ZODBCDA product.

In Windows98:

- Use the Control Panel - ODBC connection - Add a system DNS
- Select the MS Access driver
- Fill in an alias name and select the database you want to use

In Zope:

- Add a Z ODBC database connection
- Select the alias you defined above and Add

Diny

DIVA, Faculty of Veterinary Medicine
Utrecht University,  The Netherlands
http://www.vet.uu.nl 

___
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] [Urgent] Zope good for multiprocessor hardware

2000-11-22 Thread Daniel Dittmar


I don't think Python (and therefor Zope) will profit from a
multiprocessor as there is something known as the 'global lock' which
prevents more than one Python thread to run at a time.

Things look different if you're accessing a database (other than ZODB)
because a properly written database module will release the lock while
waiting for a reply. So Zope would use one processor and the database
the other one(s). 

Other possibilities:

- you have lots of static data, then these could be served by Apache
directly (which would benefit from the additional processor)

- you have some very expensive operations (generating GIFs from data
etc.). Then you could implement those in a separate server.


Andreas Tille wrote:
 
 On Thu, 16 Nov 2000 Andreas Tille wrote:
 
  we intent to buy new web server hardware.  We want to run Debian GNU/Linux
  on a Sun system.  I wonder if zope could profit from a multi-processor
  architecture on such a system.
  Zope server starts several threads.  So could they be split over the
  different processors automatically, can I enforce it or is it not
  possible.

___
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] date in Z Gadfly Database

2000-11-22 Thread Angietel



When i create a table, one of the fields is 
consider as date type, but the Z Gadfly Database does not allow me to do that, 
it only accepts INTEGER instead of DATE type.

The following is my SQL for creating a 
table:-

CREATE TABLE customer(custid 
VARCHAR(10),custname VARCHAR(15),custactdate DATE,custadd1 
VARCHAR(30),custadd2 VARCHAR(30))

Please let me know if i got an error.Thank 
You.


Re: [Zope-dev] ZPatterns and ZCLasses

2000-11-22 Thread Joachim Schmitz


On Tue, 21 Nov 2000, Phillip J. Eby wrote:

 At 11:08 AM 11/21/00 +0100, Joachim Schmitz wrote:
 I have an existing ZClass/Data Structure like this
 
 RecruitingPlatform
   Company
 Recruiting
   Candidates 
 
   Student
 Profiles
   Address
   Highschool
   IT
   Jobprefs
   ...
 
 I want to store the data in the ZClass instances, must each ZClass have the
 Base class _ZClass_for_DataSkin and do I need a Rack for each class ?
 
 If you are storing dataskins in a regular folder hierarchy (or other
 persistent hierarchy), you don't need racks.  You just need a Folder
 w/Customization support in the objects' acquisition hierarchy.  Of course,
 if you don't need DataSkin-ish behavior (i.e. triggers and attribute
 providers), you don't need the FwCS either.  DataSkins stored outside of
 Racks will "pretend" to be ordinary persistent Zope objects if they can't
 find an appropriate Customizer.  That is, they act like regular Zope
 objects, only it takes them more work because they're pretending.  :)
 

I created a FwCS and in it a customizer, but in my list of to customize
object types are only meta_types listed, which have the Base class
"_ZClass_for_DataSkin",. Is this a requirement, and if yes, is there a way
to add this to existing ZClasses ?



Mit freundlichen Grüßen

Joachim Schmitz  

  
AixtraWare, Ing. Büro für Internetanwendungen
Hüsgenstr. 33a, D-52457 Aldenhoven  
Telefon: +49-2464-8851, FAX: +49-2464-905163


___
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-dev] Conflict Errors

2000-11-22 Thread Ender

Chris Withers wrote:
 

i'm no expert but deeply nested data structures in a single object are
rife with possibilities for conflict errors. if data might be changing
concurrently in the structures or frequently changing you would be
better off to switch the structure to nested persistent objects.

 No, for once it has nothing to do with the catalog. ;-)
 This is a python product of ours that stores lots of data in somewhat
 nested, persistent dictionaries. How can this be improved so this
 doesn't happen?
 
  I know your next questions are going to be "why?" and "how do I fix it?" and
  "why don't you fix it?".
 
 While I'd love it if you'd fix our code for free, it's probably beyond
 the OSS remit ;-) Any clues about how to make our code 'less bad' would
 be cool...
 
 cheers,
 
 Chris
 
 ___
 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 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] Interface localization: zzLocale 0-0-4a release

2000-11-22 Thread Yves-Eric Martin

Hello,

Since the SkinnableAndLocalizable project is on hold, and since
people here in Japan and other non-english speaking countries have
repeatedly expressed their wish for localized versions of Zope, I
decided to continue zzLocale development and turn it into an actually
usable Product. Here is a big step towards it:


zzLocale release 0-0-4a. zzLocale is a Zope locale support Product
that provides a framework for Zope interface internationalization.


Main new features are:

o New failover code that should break less stuff (previous version broke
various Products, like ZGadflyDA or LoginManager. All reported
broken Products are now working)
o Localization of management tabs
o Localization of buttons (all should work now).
o Fixed hideous bug that prevented uninstall

Altogether, this should hopefully make this version actually usable:
a few things are still not internationalized (like MessageDialogs), but
it should *work*. Please email me if you can still find things that
break when using zzLocale.


Download urls:
  from zope.org:   http://www.zope.org/Members/yemartin/zzLocale
  from zope.ne.jp: http://www.zope.ne.jp/users/yemartin/zzLocale


Note that no actual localization file is provided with this release.
Language packs will be made available as we receive translations. (If
you have a few hours to kill, how about translating Zope into your
mother tongue (if it is not English)? ;) ).


Cheers,

-- 
Yves-Eric Martin
Digital Garage Inc.
[EMAIL PROTECTED]

___
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-dev] ZPatterns: Methods of specialits

2000-11-22 Thread Steve Spicklemire


Hi Roch'e,

   I'm guessing that getAllContactsForCustomer is a "DTML Method".  If
I remember correctly the third argument is a 'mapping object' that can
be used to augment the effective namespace available to the
method. Passing _.None should do nothing (I'm guessing you could just
use "getAllContactsForCustomer( this(), _ )" and it would work just
fine. This issue has been pretty much hashed to death here in the 
past. There is even a fishbowl proposal to 'fix it'. 

http://dev.zope.org/Wikis/DevSite/Proposals/NamespacePassingRevisited

-steve

 "Roch'e" == Roch'e Compaan [EMAIL PROTECTED] writes:

Roch'e I have a specialist Contacts and for Contacts I have a
Roch'e method getAllContactsForCustomer.  Whenever I want to call
Roch'e this method I have to pass on the whole namespace and the
Roch'e object itself to get it to work eg:
Roch'e getAllContactsForCustomer(this(), _, _.None).  Why is this
Roch'e the case?  And what does _.None actually mean?

Roch'e Roché



___
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-dev] ZPatterns Project Help!

2000-11-22 Thread Steve Spicklemire


Hi Ben,

   GAPs are sort of deprecated at this point in favor
of SkinScript. In SkinScript you might do something like this:


WITH accounts.getItem(self.account_id) COMPUTE account_object=RESULT

or more carefully...

WITH accounts.getItem(self.account_id) COMPUTE account_object=(RESULT is _.None) and 
NOT_FOUND or RESULT

-steve

 "bentzion" == bentzion  [EMAIL PROTECTED] writes:

bentzion Another question...

bentzion I want to have a GAP that will add some other Object to
bentzion an attribute of my DataSkin. This is what I have tried
bentzion with no success.

bentzion fromexpr: accounts.getItem(self.account_id) attrsexprs:
bentzion account_object=RESULT

bentzion This way in my UI Methods in my DataSkin I can access
bentzion (and change) the attributes of "account_object".

bentzion Q. How can I do this? Should I be doing this in a
bentzion different/better way?

bentzion Thanks, -Ben


___
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-dev] Conflict Errors

2000-11-22 Thread Toby Dickenson

On Tue, 21 Nov 2000 17:03:17 +, Chris Withers [EMAIL PROTECTED]
wrote:

 It happens when more than one thread tries to modify the same object in
 storage at the same time.  It's Zope's equivalent of record-locking... It's
 normal.  There's no corruption or anything, it's telling you that it avoided
 a write that might have caused problems.  Zope tries three times to retry
 the write.  If the object is still locked by another database connection
 after three writes, it propogates the exception up to the app level.  That's
 the error you see.

Hurm, well, it appears to happen when we're doing a lot of sequential
write to a product (automated bulk data upload), but the thing that
triggers it off is actually trying to read a page from the same area of
the site... confusing. Although that could also be a one-off
coincidence...

ZODB marks each persistent object that is modified during a
transaction. Before committing, it checks whether any of those objects
have been modified-and-commited in another transaction. If it has, it
raises a ConflictError.

If your 'page read' really doesnt modify any objects (check your undo
log, or use tranalyzer) then it cant cause a ConflictError. 

You say no corruption or anything, but if a submit results in that
error, does the submitted form data get processed or not?

As Chris explianed, the publisher will retry up to three
ConflictErrors. If you see this message only in a log then it probably
suceeded on one of those retries.

If you see it in a traceback returned over http then the transaction
has been aborted. No corruption, however your request has not been
processed.

 Careful application coding can reduce the chance of conflict errors.  

Can you describe what you mean by careful application coding?

"Minimise the chance of a single persistent object being modified by
two concurrent transactions."

Some examples:

1. The much-maligned ZODB-page-hit-counter is bad in this respect.
Each 'read' of a page modifies the counter object, causing the second
concurrent read (which is actually a write) to raise ConflictError.

2. Folder objects are pretty good, although you cant concurrently add
two objects to a folder since both transactions modify the folder
object.

3. If you need something folderlike with a higher hit rate, it is
possible to avoid some conflicts by splitting the folder. For example,
having one sub-folder for each initial letter of the id. You can add
objects 'chrisw' and 'tdickenson' concurrently (into subfolders with
the id 'c' and 't'), however concurrently adding 'chrisw' and 'chrism'
would cause one ConflictErrorm because they both modify the sub-folder
'c'.

(BTreeFolders have the same advantage, for the same reason, only
neater)



Toby Dickenson
[EMAIL PROTECTED]

___
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-dev] Conflict Errors

2000-11-22 Thread Chris McDonough

 Hurm, well, it appears to happen when we're doing a lot of sequential
 write to a product (automated bulk data upload), but the thing that
 triggers it off is actually trying to read a page from the same area of
 the site... confusing. Although that could also be a one-off
 coincidence...

Conflict errors can be raised by three things:  the storage, the
transaction, and the connection.  The storage will only raise the conflict
error on a write, this is for sure.  The transaction and the connection
objects I looked at a little today, and it's unclear .. although as I
understand it, the idea of a ConflictError is to prevent the modification of
an object by two threads at the same time, and should have nothing to do
with reads.

 You say no corruption or anything, but if a submit results in that
 error, does the submitted form data get processed or not?

No... the transaction is aborted...

  Careful application coding can reduce the chance of conflict errors.

 Can you describe what you mean by careful application coding?

Ah I knew I wasn't gonna get away with that one.  ;-)  I probably shoulda
kept my mouth shut.

If you're writing a ZODB-based app that uses multiple database connections
(like Zope ;-), you should take care to stagger high-load writes against an
object in the threads that use those database connections.  The ZODB tries
hard to avoid error conditions for you by retrying conflicting writes, but
if you really pound the snot out of a particular object, it'll let you know.

That said, I doubt I can be more specific, because to be honest I don't know
the *real* answer myself.  Sigh.  I think I need to learn more about
pickling (to figure out how the objects get split up into component pieces)
and step through a real-world ConflictError situation.  Neither of which I
have time to do right now... sorry, Chris.

  I bet it happens on a catalog write
  for you.

 No, for once it has nothing to do with the catalog. ;-)
 This is a python product of ours that stores lots of data in somewhat
 nested, persistent dictionaries. How can this be improved so this
 doesn't happen?

Can you replicate the error on demand?  Or is it intermittent?  This should
be something covered in developer docs (along with a zillion other things).

I suppose a gross hack would be to raise the number of write retries on
conflicts in the ZODB code if you didn't want to analyze your app code.

But y'know, as I think more about it, I'm afraid I'm gonna need to bail on
this one by saying "I don't know" because it's one of those things where
learning exactly what is going on can chew up time like nobody's business,
because I'd need to step through the code line-by-line.  I shouldn't even be
in here.  :-(

Sorry,

C


___
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-dev] ZPatterns Project Help!

2000-11-22 Thread bentzion

Thanks for answering Steve.

Unfortunitly I am working with version 0.3 of ZPatterns so I have 
to use GAP. 

When I try to translate your Skinscript into GAP like this 
"attrsexprs:account_object=(RESULT is _.None) and NOT_FOUND or 
RESULT" and I try to access the object's id with dtml-var 
"account_object.id" I get a "NameError" on account_object. 
Alternativly if I do dtml-var account_object I get a "KeyError". 

(BTW. for testing I used "accounts.getItem('1434')" which is a 
valid object. If I do "account_object=RESULT.id" it works fine.)

I appreciate any help on this.
-Ben



Hi Ben,
GAPs are sort of deprecated at this point in favor
of SkinScript. In SkinScript you might do something like this: 

WITH accounts.getItem(self.account_id) COMPUTE 
account_object=RESULT 
or more carefully... 

WITH accounts.getItem(self.account_id) COMPUTE 
account_object=(RESULT is _.None) and NOT_FOUND or RESULT 

-steve 

 "bentzion" == bentzion  [EMAIL PROTECTED] writes:
bentzion Another question... bentzion I want to have a 
GAP that will add some other Object to
bentzion an attribute of my DataSkin. This is what I have 
tried




___
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-dev] ZPatterns and ZCLasses

2000-11-22 Thread Phillip J. Eby

At 10:29 AM 11/22/00 +0100, Joachim Schmitz wrote:

I created a FwCS and in it a customizer, but in my list of to customize
object types are only meta_types listed, which have the Base class
"_ZClass_for_DataSkin",. Is this a requirement, and if yes, is there a way
to add this to existing ZClasses ?


It is a requirement.  The only way to add it (or any other base class) to
existing ZClasses is to use the "setbasesholdontoyourbutts" hack, which I
have never done, but a search of the mailing list or Zope site might reveal
the technique.


___
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-dev] ZPatterns: Methods of specialits

2000-11-22 Thread Phillip J. Eby

At 12:41 PM 11/22/00 +0200, Roch'e Compaan wrote:
I have a specialist Contacts and for Contacts I have a method
getAllContactsForCustomer.  Whenever I want to call this method I have to
pass on the whole namespace and the object itself to get it to work eg:
getAllContactsForCustomer(this(), _, _.None).  Why is this the case?  And
what does _.None actually mean?


If your method is a DTML method or document, it does not automatically
supply a "self", so currently you must call such methods in a specialist
like this:

Specialist.someDTMLthing(Specialist,_,...)

Where "..." represents any other arguments you wish to pass the method.
(They must be passed as keyword arguments.)

This is a DTML issue, not a ZPatterns one.  Hopefully, in later versions of
Zope, if method binding is standardized across DTML, Python, etc. method
objects, then you will be able to avoid this issue by setting binding
settings on the method object itself.


___
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-dev] ZPatterns Project Help!

2000-11-22 Thread Phillip J. Eby

At 10:21 AM 11/22/00 -0500, [EMAIL PROTECTED] wrote:
Thanks for answering Steve.

Unfortunitly I am working with version 0.3 of ZPatterns so I have 
to use GAP. 

When I try to translate your Skinscript into GAP like this 
"attrsexprs:account_object=(RESULT is _.None) and NOT_FOUND or 
RESULT" and I try to access the object's id with dtml-var 
"account_object.id" I get a "NameError" on account_object. 
Alternativly if I do dtml-var account_object I get a "KeyError". 

(BTW. for testing I used "accounts.getItem('1434')" which is a 
valid object. If I do "account_object=RESULT.id" it works fine.)


Perhaps this is a security issue?  When you set account_object=RESULT.id,
then the account_object attribute is a string, and has no security
protection from access by DTML.  When it is an object, however, your DTML
must have permissions to the object itself.  I am not positive, but I think
ZPatterns 0.3 may have executed GAP expressions as the superuser, so it may
be that your GAP is able to access the object, but not the DTML which is
using the DataSkin.


___
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-dev] Interface localization: zzLocale 0-0-4a release

2000-11-22 Thread Michel Pelletier


Can we see a screenshot of what the Zope managment interface looks like
in Japanese? (just a personal curiousity)

-Michel

Yves-Eric Martin wrote:
 
 Hello,
 
 Since the SkinnableAndLocalizable project is on hold, and since
 people here in Japan and other non-english speaking countries have
 repeatedly expressed their wish for localized versions of Zope, I
 decided to continue zzLocale development and turn it into an actually
 usable Product. Here is a big step towards it:
 
 zzLocale release 0-0-4a. zzLocale is a Zope locale support Product
 that provides a framework for Zope interface internationalization.
 
 Main new features are:
 
 o New failover code that should break less stuff (previous version broke
 various Products, like ZGadflyDA or LoginManager. All reported
 broken Products are now working)
 o Localization of management tabs
 o Localization of buttons (all should work now).
 o Fixed hideous bug that prevented uninstall
 
 Altogether, this should hopefully make this version actually usable:
 a few things are still not internationalized (like MessageDialogs), but
 it should *work*. Please email me if you can still find things that
 break when using zzLocale.
 
 Download urls:
   from zope.org:   http://www.zope.org/Members/yemartin/zzLocale
   from zope.ne.jp: http://www.zope.ne.jp/users/yemartin/zzLocale
 
 Note that no actual localization file is provided with this release.
 Language packs will be made available as we receive translations. (If
 you have a few hours to kill, how about translating Zope into your
 mother tongue (if it is not English)? ;) ).
 
 Cheers,
 
 --
 Yves-Eric Martin
 Digital Garage Inc.
 [EMAIL PROTECTED]
 
 ___
 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 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 )




  1   2   >