RE: [Zope] Dreamweaver

2000-12-05 Thread knight

Yes, DW4 has been released. I used it yesterday at work.

Knight

On Tue, 5 Dec 2000, Yvonne Totty wrote:

> Well, I mean how can I make it 'write' the tags right?
>
> For instance, I have this legacy page that needs to be
> reworked visually. I want to keep the code, but move
> the stuff around.
>
> I open it in DW3, and it is a HUGE mess.
>
> Have they released DW4?
>
> -y
>
> ~~~
> Yvonne Totty
> Database Engineer
> -
> Wolverine: You actually go outside in these things?
> Cyclops: Well, what would you prefer? Yellow spandex?
>
> > In Dreamweaver 4, you can also use WebDAV to talk to Zope.
> >
> > ---
> > "Sardonic Slaughterer of Sacred Cows"
> > Todd Coram - mailto:[EMAIL PROTECTED]
> > Digital Creations, Inc - http://www.digicool.com
> > Publishers of Zope - http://www.zope.org
> >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Max M
> > > Sent: Monday, December 04, 2000 7:47 PM
> > > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > > Subject: RE: [Zope] Dreamweaver
> > >
> > >
> > > >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> > Behalf Of Yvonne
> > > Totty
> > >
> > > >I heard a nasty rumor that Dreamweaver could be made
> > > >to use Zope. Is this true? If so, how do I do it?
> > >
> > > You just log onto Zope via ftp and do a "get site"
> > >
> > > getting to the dtml tags in the editor can be a bother though.
> > >
> > > I believe Dreamweaver 4.0 is better in this regards.
> > >
> > > 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 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] newbie questions ?

2000-10-23 Thread knight

http://www.phunc.com/Humor/Signs/ChineseRestaurant

There. ;]

On Mon, 23 Oct 2000, Chris McDonough wrote:

> That's pretty funny, but what's actually funnier is you mispelling
> "restaurant" in your URL.  :-)
> 
> - Original Message -
> From: "knight" <[EMAIL PROTECTED]>
> To: "Bill Anderson" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, October 23, 2000 10:18 PM
> Subject: Re: [Zope] newbie questions ?
> 
> 
> > Heh. authentification hah.
> >
> > http://www.phunc.com/Humor/Signs/ChineseRestraunt
> >
> > Check that out... same kind of humor. Grin.
> >
> > Knight
> >
> > On Mon, 23 Oct 2000, Bill Anderson wrote:
> >
> > > Olivier Ricou wrote:
> > > >
> > > > On Mon, Oct 23, 2000 at 06:43:06AM -0400, Chris McDonough wrote:
> > > > > And by the way, it's "authentication".  Every time I see
> "authentification",
> > > >
> > > > guess how we say in french :)
> > >
> > > I guess since I took 3 years of it, I am barred from guessing? ;^)
> > >
> > >
> > >
> > > --
> > > 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 )
> > >
> > >
> >
> >
> > ___
> > 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] newbie questions ?

2000-10-23 Thread knight

Uh oh, you got me ;] Probably related to the cold medicine. grin.

On Mon, 23 Oct 2000, Chris McDonough wrote:

> That's pretty funny, but what's actually funnier is you mispelling
> "restaurant" in your URL.  :-)
> 
> - Original Message -
> From: "knight" <[EMAIL PROTECTED]>
> To: "Bill Anderson" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, October 23, 2000 10:18 PM
> Subject: Re: [Zope] newbie questions ?
> 
> 
> > Heh. authentification hah.
> >
> > http://www.phunc.com/Humor/Signs/ChineseRestraunt
> >
> > Check that out... same kind of humor. Grin.
> >
> > Knight
> >
> > On Mon, 23 Oct 2000, Bill Anderson wrote:
> >
> > > Olivier Ricou wrote:
> > > >
> > > > On Mon, Oct 23, 2000 at 06:43:06AM -0400, Chris McDonough wrote:
> > > > > And by the way, it's "authentication".  Every time I see
> "authentification",
> > > >
> > > > guess how we say in french :)
> > >
> > > I guess since I took 3 years of it, I am barred from guessing? ;^)
> > >
> > >
> > >
> > > --
> > > 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 )
> > >
> > >
> >
> >
> > ___
> > 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] newbie questions ?

2000-10-23 Thread knight

Heh. authentification hah. 

http://www.phunc.com/Humor/Signs/ChineseRestraunt

Check that out... same kind of humor. Grin.

Knight

On Mon, 23 Oct 2000, Bill Anderson wrote:

> Olivier Ricou wrote:
> > 
> > On Mon, Oct 23, 2000 at 06:43:06AM -0400, Chris McDonough wrote:
> > > And by the way, it's "authentication".  Every time I see "authentification",
> > 
> > guess how we say in french :)
> 
> I guess since I took 3 years of it, I am barred from guessing? ;^)
> 
> 
> 
> --
> 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 )
> 
> 


___
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] New to list & Zope

2000-10-23 Thread knight

Greetings! Great to have yet another Zope follower; hopefully you will
decide to stick with it... Just be patient, you will find out that after a
solid month of using Zope that is has never ending power (thanks to
python and the awesome coders at digital creations).

You can use ProxyPass (mod_proxy) or Rewrite (mod_rewrite) to communicate
with Zope from Apache. This basically creates a "tunnel" between Apache
and Zope, and data gets exchanged between the two.

Some people find that ProxyPass doesn't work for them, so Rewrite is great
as well (I personally use Rewrite because it suits my site). Confer with
www.zope.org, or come to #zope on irc.zope.net with an irc client.

Regards,

Knight

On Tue, 24 Oct 2000, Curtis Maloney wrote:

> On Tue, 24 Oct 2000, Eileen Orbell wrote:
> > Hi,
> 
> Greetings, and welcome, new Zopista!
> 
> >
> > I run debian 2.2 and have Zope installed and apache.  On bootup my Zope
> > server starts automatic.
> 
> Always handy. (o8
> 
> > I am wondering how I configure Zope with an Apache server?  I am very very
> > new to Zope so really want a little help in starting off.  My network works
> > fine by the way and I use cabke modem with a static IP for my
> > website.  Thanks for any help.  Right now I only see Zope in my cgi-bin and
> > thought I should have a file zope.cgi?  As you can see I am a little lost
> > :-)
> >
> 
> The way we run it at work is to use ProxyPass in Apache.  Check your Apache 
> docs, or even easier is to search for ProxyPass on the Zope web site ( 
> www.zope.com )
> 
> >
> >
> > Eileen Orbell
> > Software & Internet Applications
> > Capitol College
> > mailto:[EMAIL PROTECTED]
> > Don't Fear the Penguin.
> >
> 
> Have a better one,
>   Curtis Maloney
>   Developer
>   Cardgate.Net
> 
> ___
> 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] How about removing broken things like Confera andZDiscussions?

2000-10-18 Thread knight

Cary,

I've written some code that requires ZSQL Methods that I've been heavily
considering porting over to a Product sometime in the near future. It has
been more of a "is there enough demand for a forum product" than anything
really. Take a look at http://www.phunc.com/Forums and tell me if it looks
any bit appealing to you. If I see enough demand, I'll productize it,
otherwise, tough luck ;]

Knight
[EMAIL PROTECTED]

On Wed, 18 Oct 2000, Cary O'Brien wrote:

> 
> Why are things like ZDiscussions and Confera even on the
> zope download pages?  They don't work!  It would be better
> if they were moved to a section called "Things that worked
> once but aren't being maintained so they don't work
> any more".  Otherwise people starting out might see all
> these seemingly useful things and get frustrated when
> they dont work.
> 
> Arrrggg.   I just want a bulletin board that works!
> 
> I know what you are going to say, so I'll start digging
> through the python code before you yell at me...
> 
> -- cary
> 
> 
> ___
> 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] SQL cursor error

2000-10-18 Thread knight

The first problem is your are running Microsoft. Just kidding.

On Wed, 18 Oct 2000, steve smith wrote:

> Anyone know what this means?
> 
> Error Type: sql.error
> Error Value: ('24000', 0, '[Microsoft][ODBC SQL Server Driver]Invalid cursor
> state'
> I get this when I try to submit a form which passes control to a dtml
> method. that method in turn makes a dtml-call to another, which calls a SQL
> method.
> 
> 
> Regards
> Steve Smith
> 
> 
> ___
> 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] Re: Zope digest, Vol 1 #1016 - 28 msgs (I will be out ofthe office Monday, October 16th) office Monday, October 16th)

2000-10-14 Thread knight

May I ask what the relevance this post was to the list?

Regards,

Knight
[EMAIL PROTECTED]

On Sat, 14 Oct 2000, Darin Lee wrote:

> I will be out of the office on Monday, October 16. If you require assistance, please 
>contact the DEQ helpdesk at 241-7495.


___
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] Fw: mysqldb

2000-10-13 Thread knight

Have you run ldconfig after editting the /etc/ld/so/conf file? Run
ldconfig -v | grep mysqlclient and see if the library appears. If so,
everything is all set.

Also try an ls -l /usr/local/mysql/lib/libmysql*.

Knight
[EMAIL PROTECTED]

On Fri, 13 Oct 2000, Dale Lance wrote:

> Hi,
> I am trying to build ZMySQLDA 1.20
> mysql has been built successfully on RedHat 7.0 and resides in
> /usr/local/mysql
> I have followed the instructions for editing /etc/ld/so/conf adding
> /usr/local/mysql/lib/mysql
> /usr/local/mysql/lib
> /usr/local/mysql
> to it. (just tomake sure)
> yet I still get the following error
> anyone know where mysqlclient is supposed to be?
> 
> Dale
> 
> 
> > gcc -shared  _mysqlmodule.o  -L/usr/local/mysql/lib -lmysqlclient -o
> > _mysqlmodule.so
> > /usr/bin/ld: cannot find -lmysqlclient
> > collect2: ld returned 1 exit status
> > make: *** [_mysqlmodule.so] Error 1
> > Traceback (innermost last):
> >   File "build.py", line 14, in ?
> > import MySQLdb
> >   File "MySQLdb.py", line 19, in ?
> > from _mysql import *
> > ImportError: No module named _mysql
> >
> >
> 
> 
> 
> ___
> 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] Non-existing Zope-Security!!!

2000-10-13 Thread knight

Also, consider adding an accessrule. This won't stop them from using
__no_before_traverse__ or _SUPPRESS_ACCESSRULE but it will make it
'appear' there is nothing more than the current level.

knight
[EMAIL PROTECTED]

On Fri, 13 Oct 2000, Tim Cook wrote:

> Stephan Goeldi wrote:
> > 
> > OK let me state that I don't think so (subject line). I had to choose this
> > subject, because it seems to me, that nobody was interested in my previous
> > attempts to get information about my problem. So here is my newbie (?)
> > question again:
> > 
> > I have the folders:
> > 
> > /www/folder1
> > /www/folder2
> > 
> > Apache redirects domain1 to folder1 and domain2 to folder2.
> > The manager of folder1 is able to browse to /www and see what folders exist
> > there. He shouldn't, because he only exists in the acl_user of /www/folder1.
> > He even can look into the folder /www/folder2 (but not into the objects).
> > 
> > Is it possible to disable the access for the folder1-manager above folder1?
> > It doesn't seem to me. If it really isn't possible, there is no security at
> > all for ISP uses of Zope. But I'm sure, there should be a possibility.
> > 
> > I even created a local role in /www/folder1 too. Even with the local role I
> > can browse /www and /www/folder2!
> > 
> > Any suggestions?
> 
> Create the user in the top level folder that they are allowed to
> see. 
> Not in the /www folder
> 
> HTH,
> -- Tim Cook --
> Cook Information Systems | Office: (901) 884-4126 8am-5pm CDT
> Free Practice Management 
> Project Coordinator http://www.freepm.org
> OSHCA Founding Supporter http://www.oshca.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 - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Using ProxyPass and SiteRoot

2000-10-11 Thread knight

> Hi everyone,
> 
> I've read the "Using Apache with ZServer (NOT Zope.cgi)" How-To and I find
> that my situation is different enough from the ones described that I'm not
> having any luck setting it up. I'd appreciate any suggestions on the
> following:
> 
> My current Zope site is at http://www.isd197.k12.mn.us/ which uses
> Zope.cgi. There are a number of other static, non-Zope virtual hosts running
> on that same machine representing a number of our elementary schools.
> 
> I've been developing a new Zope site on a separate machine at
> http://206.131.108.103:8080/ using just ZServer and I would like to use
> ProxyPass to pass a request for www.isd197.k12.mn.us through to this new
> site.
> 
> Can someone suggest ProxyPass and SiteRoot settings that will make this
> work?
> 
> -Tim

Timothy,

Without going into too much detail, you are going to want to set up a
virtual host in apache for the hostname www.isd197.k12.mn.us, and inside
that virtual host you will want to add your ProxyPass lines similar to my
example:


 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot /home/knight/www/phunc/html
 ServerName www.phunc.com
 ErrorLog /home/knight/www/phunc/logs/error_log
 CustomLog /home/knight/www/phunc/logs/access_log combined
 ScriptAlias /cgi-bin/ "/home/knight/www/cgi-bin/"


 RewriteEngine On
 RewriteLog "/home/knight/www/phunc/logs/rewrite_log"
 RewriteLogLevel 2
 RewriteRule ^/cgi-bin/ - [L]
 RewriteRule ^/local/(.*) http://www.phunc.com/$1 [L]
 RewriteRule ^/(.*) http://www.phunc.com:8080/$1 [P]
 ProxyVia on




Where I've used Rewrite, you will want to replace it with your ProxyPass
lines. Keep in mind that _any_ requests for www.isd197.k12.mn.us will get
passed to your zope site, and you will need to add "local" entries for
directories you want to stay on the apache system for that FQDN.

For the other non-Zope virtual hosts, just have them set up the same way
they are most likely.

Knight
[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] Re: Upload just file headers?

2000-10-11 Thread knight

Actually, I replied on list, but the phenomina of receiving your CC
before the list replicated my original reply occured. ;]

Knight
[EMAIL PROTECTED]

On Wed, 11 Oct 2000, Paul Winkler wrote:

> Much thanks to Knight and to Peter Bengtsson (who replied
> off-list), I know have at least two possible avenues to
> explore.
> 
> If I ever get this to work, I'll post it!
> 
> -- 
> .paul winkler..
> slinkP arts:   music, sound, illustration, design, etc.
>web page:  http://www.slinkp.com
>   A member of ARMS:   http://www.reacharms.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] Re: Upload just file headers?

2000-10-11 Thread knight

Here's an idea for you. I use some of the code below in my FileBase
product to receive uploads, although, I've added some "code" I think might
help you for grabbing just the header.

Although I'm not sure if the file descriptor that infile claims from the
form has already been loaded into either a StringIO or some other
"buffer" (i.e. already received in full from client), it's possible that
this is reading directly from the http stream coming from the client.

infilename = REQUEST.form['attached_file'].filename  # Get filename
infile = REQUEST.form['attached_file'] # Get the file descriptor
myheader = infile.read(500)# Read up to 500 bytes
infile.close() # Close the stream

This should be in an external method or product.

I haven't tested whether or not this will only let the client upload the
first 500 bytes, it's very possible zope takes in the entire file, and
puts it into a buffer that is like a file descriptor (hence StringIO).

Knight
[EMAIL PROTECTED]

On Wed, 11 Oct 2000, Paul Winkler wrote:

> Another way to look at it:
> I want to start uploading the file, but stop the upload
> almost immediately - after I've got enough to read the file
> header, but long before the upload would normally finish.
> 
> Chris McDonough wrote:
> > 
> > Paul,
> > 
> > I'm sorry if I'm dropping context here, but I'm not sure what you mean when
> > you say "headers of files".
> > 
> > Do you just want to check the size of files before you put them in the ZODB?
> 
> That would be useful, but I need more information than that.
> I need to read some of the file's description of itself
> that's commonly kept in a header at the beginning of a file.
> 
> For example, take a .gif or .jpeg file and throw away all
> but the first (let's say) 1 kb of the file.
> If you try to open this truncated file with an image editor
> (gimp, photoshop, whatever) you'll have problems. But useful
> information is still stored in that first part of the file,
> as we can see using python and PIL.
> Example, on linux:
> 
> head --bytes 1000 foo.gif > foo_truncated.gif
> python
> ...
> >>> import Image
> >>> test = Image.open('foo_truncated.gif', 'r')
> >>> test.size
> (210, 210)
> 
> So in this case, we can find out that foo.gif is 210 x 210
> pixels even if we only have access to the first 1 kb of the
> 12 kb file.
> 
> If the file in question is 1 MB or so, this trick becomes
> really useful.
> Suppose your web application needs an image about 1000 x
> 1000 pixels. You could warn the user if their image is too
> small to look good, or so big it's a waste of their time.
> 
> So basically what I want to do is start uploading the file,
> but stop quickly.
> 
> Now then, does anyone know how to do it?
> 
> Thanks again,
> 
> Paul
> 
> -- 
> .paul winkler..
> slinkP arts:   music, sound, illustration, design, etc.
>web page:  http://www.slinkp.com
>   A member of ARMS:   http://www.reacharms.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] ZSQL Method Timings/Profiling or MySQL SQL ExecutionTiming Statistics

2000-10-09 Thread knight

I'm answering myself because I found a solution to my problem, and I
wanted to share the results with the list, in case someone is struggling
to try to do the same thing...

The problem with mysql (go easy, we're not talking about the fact that
mysql is primitive and overall does not match up to the known
transactional rdbms) is that it does not provide any sql statement
profiling or timing statistics. If you use the mysql client to check a
query, you can see a time. You can even write a perl script utilizing the
benchmark module that comes with mysql to get more sql timings.

However, neither of these methods work with Zope (i.e. do you really feel
like interfacing to perl from Zope, and then calling the benchmark module
for EVERY one of your queries?). A more "automated" approach is desirable,
that compares to Oracle's profiling that logs ALL queries to a file with
timing statistics.

I finally decided after searching for a few hours for information, that I
would modify Zope to handle this for me. The logical place was to put it
in ZMySQLDA. I'm attaching a patch of a really _simple_ logging
mechanism. The only activity that really occurs is the time is noted
before and after the query gets processed and fetched, and the difference
is noted. Finally, it gets logged to /tmp/mysql_timing.log --- You need to
turn off MYSQL_TIMING in db.py of ZMySQL after applying the patch should
you not want the timing to occur any longer. And as usual, a Zope restart
is required after patching your ZMySQLDA.

The patch was written for ZMySQLDA 1.2.0 (nothing below).

Knight
[EMAIL PROTECTED]

On Mon, 9 Oct 2000, knight wrote:

> Greetings,
> 
> I have a lot of past experience with tuning and timing on Oracle (quite
> simple), but I seem to have hit a hurdle with timing my sql statements in
> MySQL. Getting these timings are _incredibly_ important to finding
> bottlenecks in a web site's performance...
> 
> Now, first, is it possible to turn on profiling for ZSQL methods? I've
> turned on my Zope's profiling, and I can see statistics on how many times
> sqlvar was called, but not specific zsql methods. Second, anyone familiar
> with any mysql settings that will dump a log displaying real-time sql
> executions and the corresponding execute time?
> 
> I like to turn sql timing on, then run around the site for a while, send
> some people to test it out, or throw up a http load tester script up, and
> then check the timing logs to see how things worked out.
> 
> Regards,
> 
> Knight
> [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 )
> 
> 


--- db.py   Thu Jun 15 02:10:41 2000
+++ db.py   Mon Oct  9 18:06:53 2000
@@ -142,6 +142,12 @@
 
 def __init__(self,connection):
 self.connection=connection
+self.MYSQL_TIMING = 1
+if self.MYSQL_TIMING:
+  self.timinglog = open('/tmp/mysql_timing.log', 'w+')
+  if not self.timinglog:
+print "Error: Can't open /tmp/mysql_timing.log for writing"
+self.MYSQL_TIMING = None
 
 info=split(connection)
 if info and len(info) < 4:
@@ -174,6 +180,7 @@
   select_m=regex.compile('[\0- ]*select[\0- ]+',
  regex.casefold).match,
   ):
+import time
 db=self.db
 try:
 queries=filter(None, map(strip,split(query_string, '\0')))
@@ -181,11 +188,22 @@
 result=()
 desc=None
 for qs in queries:
+if self.MYSQL_TIMING:
+  start_time = time.time()
 db.query(qs)
+
 c=db.store_result()
 try:
 desc=c.describe()
 r=c.fetch_all_rows()
+if self.MYSQL_TIMING:
+  end_time = time.time()
+  tot_time = end_time - start_time
+  tmpstr = "SQL Statement: " + qs + "\n"
+  self.timinglog.write(tmpstr)
+  tmpstr = "Execution Time: " + str(tot_time*1000) + " 
+miliseconds (ms)\n\n"
+  self.timinglog.write(tmpstr)
+  self.timinglog.flush()
 except: r=None
 if not r: continue
 if result:



[Zope] ZSQL Method Timings/Profiling or MySQL SQL Execution Timing Statistics

2000-10-09 Thread knight

Greetings,

I have a lot of past experience with tuning and timing on Oracle (quite
simple), but I seem to have hit a hurdle with timing my sql statements in
MySQL. Getting these timings are _incredibly_ important to finding
bottlenecks in a web site's performance...

Now, first, is it possible to turn on profiling for ZSQL methods? I've
turned on my Zope's profiling, and I can see statistics on how many times
sqlvar was called, but not specific zsql methods. Second, anyone familiar
with any mysql settings that will dump a log displaying real-time sql
executions and the corresponding execute time?

I like to turn sql timing on, then run around the site for a while, send
some people to test it out, or throw up a http load tester script up, and
then check the timing logs to see how things worked out.

Regards,

Knight
[EMAIL PROTECTED]


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




Re: [Zope] Zope in Windows is faster than Linux ???

2000-10-09 Thread knight

> On Sat, 07 Oct 2000 01:57:40 +0200, "Ansgar W. Konermann"
> <[EMAIL PROTECTED]> wrote:
> 
> >Definitely, yea!
> >
> >> I would really be interested in its correct results.
> 
> We have been stress testing our Zope application on NT and Linux. Our
> conclusion is that OS is not a factor in Zope performance.
> 
> Toby Dickenson
> [EMAIL PROTECTED]

Can we see some profiling data from that to support your statement?

Regards,

Knight
[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] AUTHENTICATED_USER (or something) making me crazy

2000-10-07 Thread knight

Dennis,

You might benefit from reading some of the general HOWTO's at
http://www.zope.org. Consider searching for "AUTHENTICATED_USER" or "user
manager".

A quick answer to your problem though:

AUTHENTICATED_USER is actually a class object (meaning it contains
variables of it's own, as well as functions). To _properly_ access the
data in the AUTHENTICATED_USER, you need to call upon the methods
(functions) that perform the task you want.

In this case, you want to compare the current user to some other value. In
that case, you want to call the getUserName method of AUTHENTICATED_USER.

Your code modified to work would be:

  
    Guest
  

  

Regards,

Knight
[EMAIL PROTECTED]

On Sat, 7 Oct 2000, Dennis Nichols wrote:

> If I inspect REQUEST by inserting a  in my dtml I can see 
> that AUTHENTICATED_USER is set to Anonymous User. Yet when I insert the 
> following code, it never displays Guest. It takes the else branch and then, 
> perversely, displays Anonymous User. Please point out my stupid mistake.
> 
> 
>   Guest
> 
>   
> 
> 
> Thanks. Maybe I shouldn't work on Saturdays. Zope 2.2.2 roughly, Python 
> 1.5.2, RH 6.2
> 
> --
> Dennis Nichols
> [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] Underscore Caracter

2000-10-07 Thread knight

> Chris McDonough wrote:
> > 
> > Yes.  Thank you.
> > 
> > Note however that methods of modules accessed via the underscore namespace
> > may be filtered individually, so although 'replace' exists as a method of
> > the Python string module, this does not necessarily make it accessible
> > implicitly through Zope via _.string.replace.  It happens to be accessible
> > in this case, but I'd bet there are cases in which methods accessible
> > via modules of the _ namespace have been removed for "safe scripting"
> > purposes.
> 
> having recently gone through the code to produce ZModules (defined
> interface for adding modules to _), it was apparent that all the modules
> that live in namespace are completely exposed.

What's the problem with that? Aren't most, if not all, the modules living
in the _ namespace just standard python modules available anyways?

Knight


___
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 in Windows is faster than Linux ???

2000-10-06 Thread knight

> Don't you all Zope mailinglist participants think that Aitor Grajal owe us all an 
>excuse in the form of a NEW TEST with the Win32 ZServer running properly?
> ;-)
> Especially to all Linux supporters for the badwill of the emails title.
> 
> I would really be interested in its correct results.
> 
> Cheers everyone

Especially with all this press I've seen in publications over the last
month or two regarding Windows 2000 is outperforming *nix. (over my dead
_dead_ body)

Knight

> 
> > > Failed requests:137
> > 
> > No - look at your results. Every request failed on the win32
> > box (and they all succeeded on linux). You have some sort of 
> > problem in your windows setup, and you'll always get higher
> > throughput for errors than you can for completed requests...
> > 
> > 
> > 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 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, Threads and Signals

2000-10-06 Thread knight

cw,

Are you spawning additional threads by chance? Or just the threads that
Zope creates?

Knight
[EMAIL PROTECTED]
On Fri, 6 Oct 2000, Wilkinson Charlie E wrote:

> It all began when I was a small child, but I'll skip ahead a bit  Last
> night I wrote a network client class with plans to use it as an External
> Method in Zope.  Works great from the command line.  My first real Python
> program.  Mom and Dad were so proud!  However, when I plugged it into Zope
> and tried to call it from a document method, I got this:
> 
>   Error Type: ValueError
>   Error Value: signal only works in main thread
> 
> Gack!!  Um...  Silly me, but I wrote all this code to use sigalarm and
> blocking I/O.  Anyone know how I can overcome this great adversity, aside
> from rewriting it all to use non-blocking I/O?  Know of any good examples of
> External Method network clients you could point me at?  Or would making it a
> Zope Product somehow fix everything?  (Sorry, I had to ask...)
> 
> -cw-
> 
> -- 
> Charlie Wilkinson
> TRIS Development Systems Administrator 
> IS:SD:CT:CC:TD
> Phone: 202-283-3241 
> MSMail:   [EMAIL PROTECTED]
> SMTP:  [EMAIL PROTECTED]
> Home:  [EMAIL PROTECTED] 
> This message constructed from 90% post-consumer electrons.
> 


___
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] one external method calling another; what possibilities?

2000-10-06 Thread knight

External methods are not extensions to any Zope classes. External methods
allow you to incorporate external functionality from Zope, as you already
know. You can define classes that are referenced in your functions though.

Keep in mind, that the external method that you created that gets called
is just a function. By default, self gets passed in, so be sure its in
your function definition. When calling _another_ function from your
external method, self does NOT get passed, since your external method does
not belong to a specific class instance... i.e. there's no container to
pass as self. So you have to pass self explicitly.

Example:

def myextmethod(self, somevar):
  something()
  morethings()

  myotherfunc(self, somevar):

def myotherfunc(self, somevar):
  print somevar

If this doesn't help, please clarify what exactly you are trying to do...

Knight
[EMAIL PROTECTED]

On Fri, 6 Oct 2000, Fred Yankowski wrote:

> I'm using some example code that defines an External Method to process
> a form.  That External Method calls another utility function to log
> some data.  I'm not quite sure what choices I have for creating that
> utility function, so I created another External Method for it.  Both
> functions are in the same Python source file in the Extensions folder.
> 
> Anyway, the main external function calls the utility function like this:
> 
>   self.function2(arg1=valuex, arg2=valuey)
> 
> I expected that function2 would have to be defined like this:
> 
>   def function2(self, **kwargs)
> 
> but it turned out that that fails at runtime with a complaint about a
> mismatch between the number of arguments sent and expected (0 and 1,
> respectively).  The following does work:
> 
>   def function2(**kwargs)
> 
> So, why isn't function2 called as a method function?
> 
> Was there some better way I could have implemented function2, rather
> than as an external method?
> 
> Where is reference documentation on External Methods?  I couldn't find
> anything other than a very cursory overview in one of the PDF'ed
> documents (I forget which).
> 
> -- 
> Fred Yankowski   [EMAIL PROTECTED]  tel: +1.630.879.1312
> Principal Consultant www.OntoSys.com   fax: +1.630.879.1370
> OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA
> 
> ___
> 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] Newbie question : ZopeTime & permissions

2000-10-06 Thread knight

Aaron, you left out the error. What was it...

On Fri, 6 Oct 2000, Aaron Straup Cope wrote:

> Hi,
> 
> My name is Aaron.
> 
> I am trying to set up zope with (atleast) three roles : manager, admin,
> user.
> 
> I'd like to give the last two the bare minimum Security permissions
> possible and adding them as needed later on. 
> 
> My problem is that I can't seem to figure out, specifically, which
> permissions to give a user that will allow them to read ZopeTime().
> 
> (see below)
> 
> For the admin user, I have set the Access content information and View *
> options globally. I've tried guessing at some others, but there are alot
> of possible combinations to try so I thought maybe I would just ask.
> 
> Related, is there a detailed description of the default Security
> settings? I've checked the mailing lists and the Zope docs and if it's
> there, I guess I missed it.
> 
> Thanks,
> 
> 
> 
> 
> 
> 
> Traceback (innermost last):
>   File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line 222, in
> publish_module
>   File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line 187, in
> publish
>   File /usr/local/zope.old/lib/python/Zope/__init__.py, line 221, in
> zpublisher_exception_hook
> (Object: Traversable)
>   File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line 171, in
> publish
>   File /usr/local/zope.old/lib/python/ZPublisher/mapply.py, line 160, in
> mapply
> (Object: test)
>   File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line 112, in
> call_object
> (Object: test)
>   File /usr/local/zope.old/lib/python/OFS/DTMLDocument.py, line 177, in
> __call__
> (Object: test)
>   File /usr/local/zope.old/lib/python/DocumentTemplate/DT_String.py, line
> 528, in __call__
> (Object: test)
>   File /usr/local/zope.old/lib/python/DocumentTemplate/DT_Util.py, line
> 337, in eval
> (Object: REQUEST.set('ts', ZopeTime()))
> (Info: REQUEST)
>   File , line 0, in ?
> NameError: (see above)
> 
> 
> ___
> 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 in Windows is faster than Linux ???

2000-10-06 Thread knight

To get ACCURATE timings, you need to create the situations almost
identical, other than the operating system.

So, that means:

  1) Windows and Linux tunings should be similar; are you running extra
daemons on the Linux box that Windows isn't (smtp, ftp, etc)?
  2) The server architecture should be the same (identical hardware)
  3) The software architecture should be the same; are you running
both Zope and Apache on each machine, or are you spliting these services
up somehow. A server with Apache+Zope, and then another server with just
Zope will NOT match up.

Just keep that in mind...

Knight
[EMAIL PROTECTED]

On Fri, 6 Oct 2000, Aitor Grajal Crespo wrote:

> both of them go through the apache server, cos I have installed a proxy server (the 
>reason is that windows is located on a different machine, and the proxy redirects to 
>the windows zserver)
> thanks.
> 
> *** REPLY SEPARATOR  ***
> 
> On 06/10/2000 at 17:27 Tom Deprez wrote:
> 
> >Why do you test the one with ZServer and the other with Apache?
> >If you want correct results you've to test both with ZServer or both with
> >Zope behind Apache. Not?
> >
> >Tom.
> 
> 
> /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
>  
> Aitor Grajal Crespo
> Director General
> e-mail: [EMAIL PROTECTED]
> 
> INETSYS, S.L.
> ETSI Informática
> Ctra. Colmenar, km. 15,500
> 28049 MADRID
> SPAIN
> Tfno : (34) 91 348 22 66 - Fax : (34) 91 348 22 66
> http://www.inetsysonline.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 in Windows is faster than Linux ???

2000-10-06 Thread knight

On Fri, 6 Oct 2000, Tom Deprez wrote:

> Why do you test the one with ZServer and the other with Apache?
> If you want correct results you've to test both with ZServer or both with
> Zope behind Apache. Not?
> 
> Tom.

Exactly, or atleast both ZServer. You can definately attribute some
latency due to the Apache integration... (minimal, but still needs to be
noted!)

Knight
[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] Base ZClass propertysheet management

2000-10-06 Thread knight

Either I don't fully understand your question, or I'm misinterpreting what
you are trying to accomplish.

If you are subclassing A, calling it B, then it _already_ has the
properties of A when it was subclassed. However, if you have two instances
running, one A, and one subclass of A called B, then you can not access
that data in A from B since they are seperate instances.

Maybe you could clarify what you are trying to accomplish (example
maybe)...

Regards,

Knight
[EMAIL PROTECTED]

On Fri, 6 Oct 2000, Seb Bacon wrote:

> I've got a ZClass "A" that subclasses another ZClass "B".  I can use the
> default propertysheets/B/manage method to update B's properties; but how do
> I access the properties of A through the management interface?
> 
> Many thanks
> 
> Seb.
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> knight
> Sent: 06 October 2000 10:05
> To: [EMAIL PROTECTED]
> Cc: Mark Twiddy
> Subject: Re: [Zope] external method database connection
> 
> 
> Also, you could always import the specific module for your database, and
> create a db connection, then execute() and fetch() directly. Although, if
> you are putting this in an external method, it would be wiser to use your
> existing ZSQL methods ;]
> 
> Knight
> [EMAIL PROTECTED]
> 
> On Fri, 6 Oct 2000, knight wrote:
> 
> >
> > > How do I get  a zope database connection from an enternal method?
> >
> > You can access your db using your existing ZSQL Methods by calling them
> > from the namespace passed in, specifically self.
> >
> > Example:
> >
> > def myextmethod(self):
> >   mfl_id = 3
> >   results = self.sqlCountUsers(mfl_id=mfl_id)
> >   for result in results:
> > print result[0], result[3]
> >
> >
> >
> > Keep in mind that a list is returned, not a dictionary.
> >
> > Knight
> > [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 )
> 
> 


___
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 method database connection

2000-10-06 Thread knight

Also, you could always import the specific module for your database, and
create a db connection, then execute() and fetch() directly. Although, if
you are putting this in an external method, it would be wiser to use your
existing ZSQL methods ;]

Knight
[EMAIL PROTECTED]

On Fri, 6 Oct 2000, knight wrote:

> 
> > How do I get  a zope database connection from an enternal method? 
> 
> You can access your db using your existing ZSQL Methods by calling them
> from the namespace passed in, specifically self.
> 
> Example:
> 
> def myextmethod(self):
>   mfl_id = 3
>   results = self.sqlCountUsers(mfl_id=mfl_id)
>   for result in results:
> print result[0], result[3]
> 
> 
> 
> Keep in mind that a list is returned, not a dictionary.
> 
> Knight
> [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] external method database connection

2000-10-06 Thread knight


> How do I get  a zope database connection from an enternal method? 

You can access your db using your existing ZSQL Methods by calling them
from the namespace passed in, specifically self.

Example:

def myextmethod(self):
  mfl_id = 3
  results = self.sqlCountUsers(mfl_id=mfl_id)
  for result in results:
print result[0], result[3]



Keep in mind that a list is returned, not a dictionary.

Knight
[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] redirect to user's folder not working

2000-10-06 Thread knight

> On Fri, 06 Oct 2000, Andy McKay wrote:
> > AUTHENTICATED_USER is not a string so need to cast it before doing the
> > string operation:
> >
> > 
> >
> >  effectively does the same thing, it calls the
> > string representation of AUTHENTICATED_USER.
> >
> 
> A more 'polite' way to get the user name is to use 
> AUTHENTICATED_USER.getUserName().  Not as short, true, but definitely more 
> explicit.

Agreed. Any remember, several user managers don't completely conform to
the AUTHENTICATED_USER "standards", and you might see calling
AUTHENTICATED_USER directly fail completely.

;]

Knight
[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] Embedding authentication in a Zope Website

2000-06-19 Thread knight

Greetings,

Please bear with me, I'm still slightly new to Zope, but I'm pretty up on
the structure, miscellaneous administration, etc. I'm also beginning to do
well with Python development.

I wanted to start adding authentication to my site via HTML forms, and I
saw mysqlUserFolder. There aren't any real docs that come with it. More or
less, a README that explains the feature set of the Product is all that it
has.

Installing mysqlUserFolder wasn't the problem. The problem is now
dynamically outputting content based upon login information. How do I
manipulate who is logged in? How do I check to see if a user is logged in,
etc? Do I need to read some plain zope authentication docs? If so, please
point me in the right direction.

What do I embed in my DTML in order to check for authentication?

I really appreciate the help... The Zope documentation is still a little
out of order, and slightly confusing to navigate.

Knight


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