[Zope] How to call MessageDialog in DTML method?

2001-01-07 Thread Dirksen

 reports 'resource not found'. Why?

Dirksen

__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.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] Core Session Tracking kudos & namespaces

2001-01-07 Thread Tres Seaver

"Chris McDonough" <[EMAIL PROTECTED]> wrote



> I think the idiom here will be:
> 
> 
>
> 
> 
> > But I don't see how to do that, because if I
> > stick a dtml-with, for instance, into generic header code
> > (included, for example, by standard-html-header, then this
> > with statement is required to be *closed* when I edit it).
> 
> Yeah, the split between header and footer is unfortunate
> right now... one way to have the stuff  available in all
> your documents would be to use the request namespace in the
> header:
> 
> 
> 
> 
> 
> ...then in the rest of your documents, you could refer to
> sessiondata:
> 
> 
> 
> 
> 
> This is not particularly encouraged.  Hopefully the upcoming
> HiperDOM will solve the header/footer split problem.

I think a cleaner near-term workaround is to have the standard
header explicitly copy all the session key-variable pairs into
REQUEST.other:

 
  
   
  
 

(This presumes that the getSessionData() return value supplies
an items() method, which I haven't actually checked).

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] What is python scripts?

2001-01-07 Thread Evan Simpson

From: "Dirksen" <[EMAIL PROTECTED]>
> Is that a product(can't find it in zope's product page) or a new version
of python
> method? Where to download? Please point me to the right direction.

It is the successor to Python Methods (although they can coexist happily),
to be released in 2.3 (now in alpha test).

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 )




[Zope] ZClass Define Permissions confusion

2001-01-07 Thread Ron Bickers

After having read the Zope Book Security chapter and various other security
howtos, I understand better how permissions apply in ZClass methods and
property sheets.  However, I'm still confused about a couple things.

1) What is affected by each of the 'Define Permissions' settings in the
ZClasses main screen?  I created a new permission and assigned it to
different things in the list, but the only one that seems to do as I might
expect is the 'Create class instances'.  I can't figure out what the others
do.

2) I have a ZClass that, upon creation of a new instance, creates an Image
object in the new instance.  Everything works as I would expect, but I'm not
sure how (or if) I can define permissions to that object in the ZClass.
More specifically, I have to give Image create/change/delete access in the
container Folder where the ZClass instance is in order for the user to be
able to modify the image inside the ZClass object.  Is there a better way
using the ZClass permissions?

Does this make sense?  I understand pretty well the permission system
outside of ZClasses, it's just inside them that's giving me a headache.

___

Ron Bickers
Logic Etc, Inc.
[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] How to call ancestral method in ZClass method?

2001-01-07 Thread Steve Spicklemire


Hi Dirksen,

Are you deleting a Rack? or an instance of a DataSkin that
is managed by a Rack? 

-steve

> "Dirksen" == Dirksen  <[EMAIL PROTECTED]> writes:

Dirksen> Hi Steve,

Dirksen> Well, if my rack object is stored persistently, I guess
Dirksen> no skinscript would get fired, am I right? In that case,
Dirksen> I need to override manage_delete, and call it in this
Dirksen> statement:

Dirksen> 

Dirksen> Zope complains NameError of PortalMember. If I changed
Dirksen> to:

Dirksen> 

Dirksen> Zope refuses the upload of the dtml method all together!

Dirksen> Any clues?

Dirksen> Dirksen


Dirksen> --- Steve Spicklemire <[EMAIL PROTECTED]> wrote:
>>  Hi Dirksen,
>> 
>> In python you would normally do:
>> 
>> super_class_object.manage_delete(self)
>> 
>> but it might be easier/better in the case of a DataSkin to use
>> a SkinScript 'WHEN OBJECT DELETED xxx '.
>> 
>> -steve
>> 
>> > "Dirksen" == Dirksen <[EMAIL PROTECTED]> writes:
>> 
Dirksen> I have a ZClass 'stuff' which is a subclass of
Dirksen> DataSkin. 'stuff' overrides 'manage_delete' method, so as
Dirksen> to do some extra clean-up jobs. After that, it will call
Dirksen> its ancestor's 'manage_delete' method to wipe itself
Dirksen> off. In java, you can do this by calling
Dirksen> 'super.manage_delete()', but how to do it in zope?
>>
Dirksen> Dirksen
>>
Dirksen> __ Do You
Dirksen> Yahoo!?  Yahoo! Photos - Share your holiday photos
Dirksen> online!  http://photos.yahoo.com/
>>
Dirksen> ___ Zope
Dirksen> maillist - [EMAIL PROTECTED]
Dirksen> http://lists.zope.org/mailman/listinfo/zope ** No cross
Dirksen> posts or HTML encoding!  ** (Related lists -
Dirksen> http://lists.zope.org/mailman/listinfo/zope-announce
Dirksen> http://lists.zope.org/mailman/listinfo/zope-dev )
>>


Dirksen> __ Do You
Dirksen> Yahoo!?  Yahoo! Photos - Share your holiday photos
Dirksen> online!  http://photos.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] What is python scripts?

2001-01-07 Thread Dirksen

Is that a product(can't find it in zope's product page) or a new version of python
method? Where to download? Please point me to the right direction.

Dirksen

__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.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] RSS and JavaScript

2001-01-07 Thread John Morton

On 7 Jan 2001 17:51:24 -0800 LARRY CHUON <[EMAIL PROTECTED]> wrote:

> Hi Zopistas,
> 
> Happy New Year!
> 
> I'm working with SiteSummary and would like htmlPreview to grab the URL
> and open it up in a new window.  It's not working correct.  I'm unsure
> how Zope handle javascript either.

Zope handles javascript in the same way it handles html - it just sends
it to the client and let's the browser figure out what to do with it.
DTML, on the other hand, is interpreted beforehand, and the results are
sent to the browser. 

>  Any help is greatly appreciated. 
> Below is my htmlPreview.  I also tried to put the javascript function
> (I'm new to js as well) in a file and import it to the same directory as
> standard_html_header.  Then I add  SRC="openMe.js"> to stand_html_header.  That doesn't work
> either. By the way, js doesn't seen to work well in Zope.  I could n't
> find much info on-line.  

[cut]
> html_quote>

My understanding of what happens when this link is traversed is that the
browser calls the javascript function 'openMe(...)', which should already
defined in the page. It doesn't attempt to fetch anything from the server
with that URL.

So what you need to do is ensure that htmlPreview include the function
openMe by either including the code into the html document like this:





(note that I've replaced the dot in openMe.js with an underscore, as
objects with dots in there ids need to be quoted to be used, and 
1) I've forgotten how to do it
2) Searching through the documentation has given me a headache
)

...Or do what you did before:

">

Use the absolute_url() method, so that the browser is sure of getting the
right url for the script (which may have been your problem before).

I'd use the first method as you can at least eyeball the html output of
htmlPreview and see if the openMe function has acutally been include,
before having to use whatever passes for javascript debugging in your
browser.

HTH,
John


___
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] "SELECT ... AS ..." statement in ZSQL

2001-01-07 Thread Bowyer, Alex

A simple question, but I can't seem to find a simple answer in any of the
documentation...

How do you do a SELECT AS statement in a ZSQL method?

For example
SELECT FirstName + " " + LastName AS FullName

Whenever I use AS, I end up getting the SQL error "Two few parameters: x
expected" where is the number of AS expressions in my query.

I have tried the same query in Access on the same database and it works
fine.
I even tried to leave Access to do the query and then just let Zope treat
the query as a table.
SELECT * FROM MyQueryInAccessWhichUsesAsStatements
but I get the same error.

Can anyone help?

Thanks

Alex

==
Alex Bowyer
IT Consultant, Logica Australasia
Tel: +61 2 9202 8130
Fax: +61 2 9922 7466
E-mail : [EMAIL PROTECTED]
WWW: http://www.logica.com.au/
==

___
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 'Best Practices'?

2001-01-07 Thread Steve McMahon

Is there anything like a Zope 'Best Practices' document or Wiki? One that 
would encourage use of certain practices, DTML idioms or products, and warn 
of practices, idioms or products that are known to cause problems down the 
line or are slated for extinction?

I ask this as a new user who's bewildered by the array of Zope tools and 
products. So, I read of a practice or Product and think 'wow, that's 
great!' But I have no idea whether it's in common usage and destined to 
become part of the core, or is headed for replacement or extinction.

Thanks! Steve McMahon
_
Steve McMahon, SunType Publishing Systems
[EMAIL PROTECTED]
voice & fax: (530) 757-7682
http://www.suntype.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] My own alternative interface WHOOPS that got mangled

2001-01-07 Thread Tim Cook

Max M wrote:
> 
> This is waht i meant
> 
> When I make an alternate interface to my properties for a zClass and it then
> calls manage_editProperties, manage_editProperties redirects me to the
> original properties page. How can I avoid that?
> 

Mukhsein's excellent Job Board HowTo was the resource I first
used to solve that problem.
http://www.zope.org/Members/mukhsein/job_board_howto

HTH,
-- Tim Cook, President --
Free Practice Management,Inc. | http://www.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 )




[Zope] RSS and JavaScript

2001-01-07 Thread LARRY CHUON

Hi Zopistas,

Happy New Year!

I'm working with SiteSummary and would like htmlPreview to grab the URL and open it up 
in a new window.  It's not working correct.  I'm unsure how Zope handle javascript 
either.  Any help is greatly appreciated.  Below is my htmlPreview.  I also tried to 
put the javascript function (I'm new to js as well) in a file and import it to the 
same directory as standard_html_header.  Then I add  to stand_html_header.  That doesn't work either. By the way, 
js doesn't seen to work well in Zope.  I could n't find much info on-line.  

Thanks in advance.


































___
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 call ancestral method in ZClass method?

2001-01-07 Thread Dirksen

Hi Steve,

Well, if my rack object is stored persistently, I guess no skinscript would get fired, 
am
I right? In that case, I need to override manage_delete, and call it in this statement:



Zope complains NameError of PortalMember. If I changed to:



Zope refuses the upload of the dtml method all together!

Any clues?

Dirksen


--- Steve Spicklemire <[EMAIL PROTECTED]> wrote:
> 
> Hi Dirksen,
> 
>In python you would normally do:
> 
>   super_class_object.manage_delete(self)
> 
>but it might be easier/better in the case of a DataSkin 
> to use a SkinScript 'WHEN OBJECT DELETED xxx  '.
> 
> -steve
> 



__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.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] How to call ancestral method in ZClass method?

2001-01-07 Thread Dirksen

Hi Steve,

Well, if my rack object is stored persistently, I guess no skinscript would get fired, 
am
I right? In that case, I need to override manage_delete, and call it in this statement:



Zope complains NameError of PortalMember. If I changed to:



Zope refuses the upload of the dtml method all together!

Any clues?

Dirksen


--- Steve Spicklemire <[EMAIL PROTECTED]> wrote:
> 
> Hi Dirksen,
> 
>In python you would normally do:
> 
>   super_class_object.manage_delete(self)
> 
>but it might be easier/better in the case of a DataSkin 
> to use a SkinScript 'WHEN OBJECT DELETED xxx  '.
> 
> -steve
> 
> > "Dirksen" == Dirksen  <[EMAIL PROTECTED]> writes:
> 
> Dirksen> I have a ZClass 'stuff' which is a subclass of
> Dirksen> DataSkin. 'stuff' overrides 'manage_delete' method, so as
> Dirksen> to do some extra clean-up jobs. After that, it will call
> Dirksen> its ancestor's 'manage_delete' method to wipe itself
> Dirksen> off. In java, you can do this by calling
> Dirksen> 'super.manage_delete()', but how to do it in zope?
> 
> Dirksen> Dirksen
> 
> Dirksen> __ Do You
> Dirksen> Yahoo!?  Yahoo! Photos - Share your holiday photos
> Dirksen> online!  http://photos.yahoo.com/
> 
> Dirksen> ___ Zope
> Dirksen> maillist - [EMAIL PROTECTED]
> Dirksen> http://lists.zope.org/mailman/listinfo/zope ** No cross
> Dirksen> posts or HTML encoding!  ** (Related lists -
> Dirksen> http://lists.zope.org/mailman/listinfo/zope-announce
> Dirksen> http://lists.zope.org/mailman/listinfo/zope-dev )
> 


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.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] Re: Leaking Oracle connections & processes

2001-01-07 Thread Dieter Maurer

Shai Berger writes:
 > ... excess Oracle processes and zombies ...
I have checked our installation and can confirm that
both problems have gone.

We do not yet know what caused the excess Oracle processes.
After an increase of Zope's ZODB cache and an upgrade
to the newest DCOracle, the problem simply went away.

We do know what caused our zombie processes:
a bug in the Oracle Java runtime library:
they had added a "NOWAIT" flag to their "wait" calls.
This ensured that a "wait" call does not release
the Zombie child but keeps it in its state.
As a consequence,
each process started from Java became a Zombie
process.
As Oracle reported, the problem was introduced in 8.1.6
and should be fixed in 8.1.7.


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] UserFolder Alternate Login

2001-01-07 Thread Dieter Maurer

[EMAIL PROTECTED] writes:
 > I need functionality that none of the UserManagers seem to address. I 
 > need to allow a user to elect to log in (and set 
 > AUTHENTICATED_USER) as opposed to have them access a restricted 
 > resource to trigger cookie authentication. 
Maybe, I do not understand you.
But it appears to me that this is the behaviour of
*all* cookie based UserFolder implementations, including GUF.

GUF, especially as a "login" method which allows you to log in
at will. It pops up the usual login dialog and after you
provided login information and submitted the form,
it calls "login_success" (which happens to be priviledged).

However, after your login, *any* access of a page governed
by the GUF with authenticate the user and set the cookie,
whether or not the page is protected or not.
Only is your "login" form action goes to a resource
which is not goverend by the GUF (i.e. above in the
hierarchy or in a different subpath), then
the login information is lost.


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] My own alternative interface WHOOPS that got mangled

2001-01-07 Thread Max M

This is waht i meant

When I make an alternate interface to my properties for a zClass and it then
calls manage_editProperties, manage_editProperties redirects me to the
original properties page. How can I avoid that?

"edit" is the alternative interface dtml method.

I thought i could just set:  in the alternative form.

Do I have to make a new page to avoid it? something like:




Regards Max m

Max M. W. Rasmussen,Denmark.   New Media Director
private: [EMAIL PROTECTED] work: [EMAIL PROTECTED]
-
Specialization is for insects.  -  Robert A. Heinlein


___
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] My own alternative interface to a propertysheet in a zClass gets redirected to the original interface

2001-01-07 Thread Max M

When I make an alternate interface to my properties for a zClass and it then
calls manage_editProperties, manage_editProperties redirects me to the
original properties page. How can I avoid that?

"edit" is the alternative interface dtml method.

Do I have to make a new page to avoid it? something like:

I thought i could just set:  in the alternative form.




Regards Max m

Max M. W. Rasmussen,Denmark.   New Media Director
private: [EMAIL PROTECTED] work: [EMAIL PROTECTED]
-
Specialization is for insects.  -  Robert A. Heinlein


___
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] Core Session Tracking kudos & namespaces

2001-01-07 Thread Chris McDonough

On Thu, 4 Jan 2001 19:48:53 -0800 (PST)
 Bob Sidebotham <[EMAIL PROTECTED]> wrote:
> --- Somebody wrote:
> > > Of course, the best solution would be for the 'magic'
> lookup to be
> > > optional...
> 
> Alright, I've not a zope master, but isn't this already
> provided
> generically with:
> 
>   

Yes...

> 
> All these arguments leave me a little confused: As a
> newbie, I read the
> zope book, and it tells me all these wonderful things
> about feeding
> alligators with ostriches, and the like, and I assume
> this is meant to
> be universal, and just assume that all names are supposed
> to behave in
> this manner. But Chris seems to be saying that *because
> you've had
> flack about this model* maybe a new feature shouldn't use
> it. Forgive
> me if I'm paraphrasing you incorrectly. So the question I
> have is
> this--if there's a basic problem with zope's acquisition
> semantics (as
> some posts on this list would indicate at least some
> people believe),
> then is the right fix for new features to avoid
> acquisition, or would
> it be better to figure out what is good and what is bad
> and bite the
> bullet and get rid of the bad?

A deeper look at how Zope makes use of acquisition is on the
plate for future development... there's been talks at DC
about in a major future revision making acquisition explicit
by default instead of the current situation where
acquisition is implicit by default.

Til then, we need to work with what we've got.  ;-)

> 
> Chris keeps saying that it would be hard to explain the
> semantics. But
> if zope is worth learning, shouldn't these semantics be
> explainable
> totally generically? Why should they have to be
> separately documented
> just for session variables? What is really special about
> session
> variables (other than that they can be written to)?

Nothing.  It's a new feature, and hopefully I'd be doing the
right thing to make its semantics more explicit for a
learnability perspective.

> 
> As an aside, how did zope even get this far without
> session variables?
> I'm very confused...

There are other good sessioning Products available:
FSSession, SQLSession, HappySession come to mind.  These are
great, but we need something that will work across ZEO
clients that doesn't require a relational database backend.
Thus the coresessiontracking stuff...

> 
> And finally, *even* if the session variables are kept in
> a private
> space, I'd at least like some way to make them public
> using some
> generic pre-processing.

I think the idiom here will be:


   


> But I don't see how to do that,
> because if I
> stick a dtml-with, for instance, into generic header code
> (included,
> for example, by standard-html-header, then this with
> statement is
> required to be *closed* when I edit it).

Yeah, the split between header and footer is unfortunate
right now... one way to have the stuff  available in all
your documents would be to use the request namespace in the
header:





...then in the rest of your documents, you could refer to
sessiondata:





This is not particularly encouraged.  Hopefully the upcoming
HiperDOM will solve the header/footer split problem.

___
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] [python] converting int to string?

2001-01-07 Thread Max M

From: Jens Vagelpohl

>in python you can do:

>str(int)

>and in zope you do it like

>_.str(int)

You can also use the short form in both Zope and Python:

`int`

Two of those funny `` characters surrounding what you want converted to a
string.

Regards Max M

Max M. W. Rasmussen,Denmark.   New Media Director
private: [EMAIL PROTECTED] work: [EMAIL PROTECTED]
-
Specialization is for insects.  -  Robert A. Heinlein


___
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] ODBC errors

2001-01-07 Thread Philipp Auersperg

I have worked with ODBC and Zope under Win2k and had no such problems with 
MSSQL,Oracle and Access.

Since you work with mysql the problem seems to happen in conjunction with the mysql 
ODBC AND Zope, I don't have 
experiences with MySQL ODBc, but:
If you work with mysql & Zope I would anyhow recommend Zope's native mysql adapter 
since it is full-threaded and
ZODBCDA  is not. 

*** REPLY SEPARATOR  ***

On 06.01.2001 at 10:41 Doug Brewer wrote:

>Hello
>
>I'm relatively new to Zope, and have been working on getting mySql connected via
>ZODBC on Win2k. The connection is working, however, I have one column which
>repeatedly throws an error when I try to access data. The column contains text
>with many "\n" to retain formatting for email messages (it's an archive).
>
>The error seems to be from the ODBC driver:
>
>Error, sql.error: ('24000', 0, '[Microsoft][ODBC Driver Manager] Invalid cursor
>state')
>
>however I can successfully access values from this column directly from the
>mysql console AND through the exact same datasource used by zope but from other
>apps (I used Excel as a test, and successfully returned data). IOW, only Zope
>produces this error.
>
>Any thoughts or pointers would be greatly appreciated.
>
>Doug Brewer
>
>
>___
>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] [python] converting int to string?

2001-01-07 Thread Jens Vagelpohl

in python you can do:

str(int)

and in zope you do it like

_.str(int)

"Learning Python" by o'reilly is a pretty good beginner's book for python. i
suggest you read it. it's well written and gives you the basics.

jens


on 1/7/01 11:12, Lee at [EMAIL PROTECTED] wrote:

> Hi,
> 
> I wonder if anyone could help me here...
> 
> Is there any way to convert an integer to a string data type in Python?
> I see there is a facility for accomplishing the reverse conversion
> (string -> int)?
> 
> I have 4 integers, which are primarily used to handled the logic in the
> program below (in the while loops). The value of this integer must also
> be added to a string (as a table column name), which will be used to
> create a SQL query.
> 
> Here's a rough sketch of the program:
> 
> p = 2 # no.of practicals
> t = 2 # no.of tutorials
> a = 2 # no.of assignments
> b = 3 # no.of bomus marks
> 
> c = "52225"
> 
> SQL = "CREATE TABLE CLASS" + c + "\n"
> SQL = SQL + "( \n"
> SQL = SQL + "matric float, \n"
> SQL = SQL + "fname varchar, \n"
> SQL = SQL + "lname varchar, \n"
> SQL = SQL + "uname varchar, \n"
> 
> while p > 0 :
>SQL = SQL + "p" + p + " integer, \n" # cannot add type "int" to
> string
>p = p - 1
> 
> while t > 0 :
>SQL = SQL + "t" + t + " char(1), \n"
>t = t - 1
> 
> while a > 0 :
>SQL = SQL + "a" + a + " integer, \n"
>a = a - 1
> 
> while b > 1 :
>SQL = SQL + "b" + b + " integer, \n"
>b = b - 1
> while b > 0 :
> SQL = SQL + "b" + b + " integer \n" # ',' taken out from last
> query
> b = b - 1
> 
> SQL = SQL + ")"
> 
> Of course, I could have a load of statements in the while loops like:
> 
> if p = 1:
>   pString="1"
>   ... etc.
> 
> But that would look hella ugly!
> 
> Another alternative would be to send both the integer value and a string
> parameter (converted by Zope) in the calling DTML method. This is okay -
> but is there a better way to do it?
> 
> As usual, thankyou very much in advance.
> 
> Is this off-topic BTW? Should I address any future questions regarding
> Python to a Python newsgroup/list?
> 
> --
> Lee Reilly
> mailto:[EMAIL PROTECTED]
> http://www.footkick.co.uk/lee
> 


___
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] LoginManager with SQL and Skinscript: adding properties topropertysheet propertysheet

2001-01-07 Thread Aaron Payne

Hi all,

I am following Dan Pierson's How-To SQL LoginManager with SQL and 
Skinscript. I am not able to add properties.

I created LoginManager:LoginUser subclassed zclass def for a user with a 
propertysheet Basic.
It had properties password and email.  The LM methods I tested failed so I 
deleted the properties.  Now I want to add them again. When I try I get:

for password
Invalid property id, password. It is in use.
for email:
Invalid property id, email. It is in use.

I also deleted the entire propertysheet and tried to add the props but the 
same error occured.

I can add new props but not ones that were deleted earlier. Is there a way 
around this problem?

Zope 2.2.1
System Platform: freebsd4

-Aaron


___
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] converting int to string?

2001-01-07 Thread Lee

Hi,

I wonder if anyone could help me here...

Is there any way to convert an integer to a string data type in Python?
I see there is a facility for accomplishing the reverse conversion
(string -> int)?

I have 4 integers, which are primarily used to handled the logic in the
program below (in the while loops). The value of this integer must also
be added to a string (as a table column name), which will be used to
create a SQL query.

Here's a rough sketch of the program:

p = 2 # no.of practicals
t = 2 # no.of tutorials
a = 2 # no.of assignments
b = 3 # no.of bomus marks

c = "52225"

SQL = "CREATE TABLE CLASS" + c + "\n"
SQL = SQL + "( \n"
SQL = SQL + "matric float, \n"
SQL = SQL + "fname varchar, \n"
SQL = SQL + "lname varchar, \n"
SQL = SQL + "uname varchar, \n"

while p > 0 :
 SQL = SQL + "p" + p + " integer, \n" # cannot add type "int" to
string
 p = p - 1

while t > 0 :
 SQL = SQL + "t" + t + " char(1), \n"
 t = t - 1

while a > 0 :
 SQL = SQL + "a" + a + " integer, \n"
 a = a - 1

while b > 1 :
 SQL = SQL + "b" + b + " integer, \n"
 b = b - 1
while b > 0 :
  SQL = SQL + "b" + b + " integer \n" # ',' taken out from last
query
  b = b - 1

SQL = SQL + ")"

Of course, I could have a load of statements in the while loops like:

if p = 1:
pString="1"
... etc.

But that would look hella ugly!

Another alternative would be to send both the integer value and a string
parameter (converted by Zope) in the calling DTML method. This is okay -
but is there a better way to do it?

As usual, thankyou very much in advance.

Is this off-topic BTW? Should I address any future questions regarding
Python to a Python newsgroup/list?

--
Lee Reilly
mailto:[EMAIL PROTECTED]
http://www.footkick.co.uk/lee




___
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: Leaking Oracle connections & processes

2001-01-07 Thread Shai Berger



Shai Berger wrote:

> I have checked a little before the disaster, and it seems
> that not all those processes actually have connections; the problem
> may be unrelated to open connections, but just to processes.
> 
A little progress: We just had it happen again, and checked to see how
many live processes and how many zombies were involved. pstree showed
108 Zope-spawned Oracle processes, but ps showed only 55 zombies.

I assume, therefore, that the problem is not because of zombies; there
were over 50 live processes accessing oracle.

The accumulation of zombies is a problem in itself, of course, but I
understand it is also a known problem. And from what I see, it is a
separate problem.

Our impression here -- based on not much more than gut feeling -- is
that the problem is related to abandoned transactions, where an 
exception is raised.

Thanks, Dieter, for your earlier response -- we are trying a larger
cache now, and we'll see how things go.

Have fun,
Shai.

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

2001-01-07 Thread Jan H. Haul

nando n wrote:
> 
> i want to know as much as possible about dtml.

Nando,
this is the perfect time to read the Zope Book. You can read it
on the Zope.Org site or download the HTML and print a copy
yourself. It will be published by O'Reilly later this year, by
the way.
This book is just made as a good, in-depth tutorial answering
broad questions like yours.

After you've read the book, feel free to contact the list again
with specific questions if there is anything you need help with -
we all do it, and it surely helps.

On the other hand, very broad, basic questions are best answered
by the book. Really. To fully answer your question on the list,
someone would just have to rewrite the chapter on DTML of the
Zope book, which is a waste of everybodies' time, including
yours, as it would surely take longer than downloading the
chapter from zope.org :-)

For goot DTML examples, you can click at the "DTML source" link
on every Zope.org page.

Jan

___
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] (no subject)

2001-01-07 Thread sdlclkds

GET YOUR OWN 100 MEG WEBSITE FOR ONLY $11.95 PER MONTH TODAY!

STOP PAYING $19.95 or more TODAY for your web site, WHEN YOU CAN 
GET ONE FOR ONLY $11.95 PER MONTH!

DO YOU ALREADY HAVE A WEBSITE? ALL YOU HAVE TO DO IS TRANSFER THE 
DOMAIN TO OUR SERVERS AND UPLOAD YOUR DATA AND YOU ARE READY TO 
GO! YOUR NEW WEB SPACE CAN BE CREATED INSTANTLY WITH JUST A 
SIMPLE PHONE CALL TO  OUR OFFICE.

YOU CAN CHANGE THE DESIGN OF YOUR SITE AS MUCH AS YOU WANT with 
no extra charge!  UNLIMITED TRAFFIC -- no extra charge!

FRONT PAGE EXTENSIONS are FULLY SUPPORTED.

A SET UP FEE OF $40.00 APPLIES for FIRST TIME CUSTOMERS.

ALL FEES PREPAID IN ADVANCE FOR THE YEAR PLUS A $40.00 SET UP 
CHARGE.

FOR DETAILS CALL 1 888 248 0765  if you are outside the USA,
please fax 240 337 8325

Webhosting International

 
 
 
 
 
 
 
 
 
 

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