[Zope] Fun with Trees

2000-07-02 Thread Charlie Wilkinson

(I always wanted to be a lumberjack! :)

After RTFMing and flailing at DTML all night, I'm about stumped.
No pun intended.

I'm trying to use dtml-tree to create a selective menu of objects based
on whether or not the object has an "add_to_menu" property.  I've pretty
much figured out that I need a wrapper around objectValues that will
filter out the objects that don't have the "add_to_menu" property.
This wrapper would be called with dtml-tree's "branches" attribute.
I'm trying to do this wrapper in a DTML method and I've gotten all the
way to where I have to return a list of "actual objects", so says the
DTML Quick Reference.

Is there someone who could 'splain to me how to build a list of objects
in DTMLese?

Here's what I have so far (obviously not working):




  




Right off the bat, Zope is giving me attribute errors about REQUEST,
but I'm not sure how else to do a set(), other than with REQUEST or
RESPONSE in front of it.

When I ran it stand-alone, I was *not* getting attribute errors and *was*
getting output that looked remotely like the guts of the desired objects.

Spare clues anyone?

TIA,
Charlie

-- 
~
Charlie Wilkinson - [EMAIL PROTECTED] - N3HAZ
Parental Unit, UNIX Admin, Homebrewer, Cat Lover, Spam Fighter, HAM, SWLer...
Visit the Radio For Peace International Website: http://www.rfpi.org/
~
CLOBBER INTERNET SPAM:  See!! 
   Join!! 
~
QOTD:
Failure is not an option. It's bundled with your software.

___
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: ZClass in ZClass problem

2000-07-02 Thread Tino Wildenhain



Oleg Broytmann wrote:
> 
> Followup to myself...
> 
> On Sat, 1 Jul 2000, Oleg Broytmann wrote:
> >Then the problems begin. All management URLs for inner ZClass contain
> > %20, so URLs look like
> > "propertysheets/methods/RandomZItem%20/manage_workspace" and
> > "propertysheets/methods/RandomZItem_add%20/manage_workspace".
> 
>I found that not only my ZClassess do this way. I imported SiteSummary -
> and got the problem. Something broken in my installation?
%20 is the urlencoded representation of an extraneous space at the end
of your methods ids.

HTH
Tino Wildenhain

___
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 invalidate an object in the cache?

2000-07-02 Thread Marco Mariani

On Sun, Jul 02, 2000 at 03:56:39PM +1000, Marc Boschma wrote:


> Sounds like you need to manipulate the expiry time for the objects. I'd
> suggest that that can either be done in the RESPONSE or via meta tags in the
> standard_html_header to mark the page and the image as non-cacheable.
> 
> I'm actually interested in a Guru's response on this as I will need to set
> the expiry explicitly to save load on the server for content that is
> dynamically generated but doesn't change often.


It would work, but I'd have to set up meta tags for LocalFS objects..



I've found a better kludge: when I call the index page, I pass a "refresh" variable 
along
the URL which contains the number of the modified image.

Within the index method, I then call:


   
   

   "
   
^^
   WIDTH=""
   HEIGHT=""
   ALT="&dtml-id;">

   


This way, the refreshed image is called with a trailing "?0.283759872" that tricks 
Netscape
to think it's a new object, and reloads.


This could work for you too, maybe.



-- 
"This company has performed an illegal operation and will be shut down.
 If the problem persists, contact your vendor or appeal to a higher court."
 - Signal11 on slashdot

___
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 invalidate an object in the cache?

2000-07-02 Thread Itamar Shtull-Trauring

Marc Boschma wrote:

> Sounds like you need to manipulate the expiry time for the objects. I'd
> suggest that that can either be done in the RESPONSE or via meta tags in the
> standard_html_header to mark the page and the image as non-cacheable.

Read the Cacheability Howto - http://www.mnot.net/cache_docs/

You can set the HTTP headers described there using RESPONSE.setHeader:
RESPONSE.setHeader('Cache-Control', 'no-cache')

-- 
Itamar S.T.  [EMAIL PROTECTED]
Fingerprint = D365 7BE8 B81E 2B18 6534  025E D0E7 92DB E441 411C

___
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] PCGI Error: (102) failure during connect to ZServer

2000-07-02 Thread [EMAIL PROTECTED]

Running ./start seems to initiate pcgi_wrapper. Then pcgi handles the
web request perfectly again . 

This was not needed in Zope 1.6, I might be mistaken, though.

> 
> > This is with Zope-2.2.0b3-src.tgz
> > 
> > The pcgi wrapper reports ...is unable to connect to the ZServer
> > background process via Unix socket .../var/pcgi.soc
> > 
> > I am trying to install this on a remote host, this error came up
> > locally too, though.
> > 
> > I followed glndspud's howto on 3rdparty host setup. With a 2.1.6
> > release I was able to get zope running. However, with this setup I
> > was not able to login through manage, the authorization did not work.
> > So my reasoning, an upgrade should make this error vanish. Not so,
> > until now. ;-(
> > 
> > Christian
> 
> 
Christian

___
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 default SU password in Zope 2.2b3?

2000-07-02 Thread Alexander Chelnokov

Hello All,

A friend of mine has just installed Zope 2.2b3 by, as he told, simply
run install script in RedHat 5.?. He reports that at least
his_site:8080 shows normal start-up screen but no password was
displayed during installation so he can't proceed to managemet screen.
Zpasswd.py utility seems not to work due to lack of some library (?).
Should he reinstall Zope or there is a default password?

Best regards,
Alexander N. Chelnokov
Ural Scientific Institute of Traumatology and Orthopaedics
7, Bankovsky str. Ekaterinburg 620014 Russia
ICQ: 25640913  



___
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 default SU password in Zope 2.2b3?

2000-07-02 Thread Luke Tymowski

Hello,

>Zpasswd.py utility seems not to work due to lack of some library (?).
>Should he reinstall Zope or there is a default password?

The password is displayed at the end of the setup process.
It is stored in the root directory, in a file called access
The default username is 'superuser', but the password is randomly generated.
The format of the file is:
username: password

To reset it, edit the file, and change the password to whatever you'll 
remember.

Note that by doing this the root password is exposed to anyone with access 
to that file.
If it's a public server you should get zpasswd working asap.

Luke


___
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 invalidate an object in the cache?

2000-07-02 Thread Tino Wildenhain

Hi,

Itamar Shtull-Trauring wrote:
> 
> Marc Boschma wrote:
> 
> > Sounds like you need to manipulate the expiry time for the objects. I'd
> > suggest that that can either be done in the RESPONSE or via meta tags in the
> > standard_html_header to mark the page and the image as non-cacheable.
> 
> Read the Cacheability Howto - http://www.mnot.net/cache_docs/
> 
> You can set the HTTP headers described there using RESPONSE.setHeader:
> RESPONSE.setHeader('Cache-Control', 'no-cache')
Yeah, but you have to do this in the image, not the document.
So one has to patch the image-object as I did for this case.

Regards
Tino Wildenhain

___
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] When does Zope become single-threaded?

2000-07-02 Thread Martijn Pieters

On Sat, Jul 01, 2000 at 10:56:30PM -0700, Hung Jung Lu wrote:
> I seem to remember that in the old days, if one uses Zope with PCGI, it 
> would only run single-threaded. Is the correct? Or is Zope now always 
> multi-threaded?
> 
> (I know one can control the number of threads via the -t option in the start 
> script.)

Using ZServer, Zope will always run multi-threaded. In the olden days, before
ZServer, Zope ran single threaded through PCGI or a simple HTTP server that is
no longer bundled. 

You could still use Zope this way, that is, use it without ZServer, and have
PCGI go directly to Zope. This would indeed be single-threaded. But why would
you want to do that?

-- 
Martijn Pieters
| Software Engineermailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
| ZopeStudio: http://www.zope.org/Products/ZopeStudio
-

___
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] Single content tree, 3 'look-n-feel's...

2000-07-02 Thread Jon Franz

Hello,
I'm currently preparing to build a large corporate website with
Zope.  the corporation in question ants a dell-ish sort of interface and
content tree in which users will choose on the opening pages what Sort of
user they are (home-user, small business, or corporate) - after choosing the
type of user they are, the look-n-feel of the site will be geared towards
their specific type, but, the content will be shared across all of the
different styles.  that is to say, I might have a products dtml document,
but it will need to look different for each type of user.  I know this can
be done easily with some simple session variables and some logic in my
standard_html_header and footer, but I was wondering if there was an easier
(to manage - different people will be in charge of each look-in-feel)
way...?  I saw an announcement on "transparent" folders - would that be of
any use in this situation?


___
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] [Fwd: CorruptedDataError]

2000-07-02 Thread Jonathan Desp

How I can shut down zope without clicking on the shutdown button ?
because I'm not able to see the page.

Jonathan Desp wrote:
> 
> Hi,
> 
> well it's again, a problem, I mean, the size of my data.fs don't exceed
> 50 M, but I still see CorruptedDataError, when I want to shutdown Zope.
> 
> How I can shut down Zope, without the button ?
> 
> why my zope is CorruptedDataError ?
> 
> I'm not able to see my new data in my zope. that I did in my local zope.
> 
> here is the description:
> 
> Zope Error
> Zope has encountered an error while publishing this resource.
> 
> CorruptedDataError
> 
> Sorry, a Zope error occurred.
> 
> Traceback (innermost last):
>   File /home/jonano/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py,
> line 214, in publish_module
>   File /home/jonano/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py,
> line 179, in publish
>   File /home/jonano/Zope-2.1.6-src/lib/python/Zope/__init__.py, line
> 202, in zpublisher_exception_hook
> (Object: ElementWithAttributes)
>   File /home/jonano/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py,
> line 165, in publish
>   File /home/jonano/Zope-2.1.6-src/lib/python/ZPublisher/mapply.py, line
> 160, in mapply
> (Object: manage_main)
>   File /home/jonano/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py,
> line 102, in call_object
> (Object: manage_main)
>   File /home/jonano/Zope-2.1.6-src/lib/python/App/special_dtml.py, line
> 120, in __call__
> (Object: manage_main)
> (Info: /home/jonano/Zope-2.1.6-src/lib/python/App/cpContents.dtml)
>   File
> /home/jonano/Zope-2.1.6-src/lib/python/DocumentTemplate/DT_String.py,
> line 502, in __call__
> (Object: manage_main)
>   File /home/jonano/Zope-2.1.6-src/lib/python/DocumentTemplate/DT_In.py,
> line 691, in renderwob
> (Object: objectItems)
>   File /home/jonano/Zope-2.1.6-src/lib/python/App/PersistentExtra.py,
> line 114, in locked_in_version
> (Object: ElementWithAttributes)
>   File /home/jonano/Zope-2.1.6-src/lib/python/ZODB/Connection.py, line
> 380, in modifiedInVersion
>   File /home/jonano/Zope-2.1.6-src/lib/python/ZODB/DB.py, line 356, in
> modifiedInVersion
>   File /home/jonano/Zope-2.1.6-src/lib/python/ZODB/FileStorage.py, line
> 596, in modifiedInVersion
> (Object: /home/jonano/Zope-2.1.6-src/var/Data.fs)
> CorruptedDataError: 46553584
> 
> 
> 
> 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.

-- 
Very truly yours,

<><><><><><><><><><><><><><>
Jonathan Desp
Atoma
Matter will become Software
http://www.atoma.f2s.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] [Q] corrupt PDF Files?

2000-07-02 Thread Veikko Wuensche

Hi,
 
_sometimes_ ;-) I get data corruption with PDF files.
 
After uploading a PDF file I get from the ZServer a file which is shorter
than the first one. It's corrupt.
 
The served file does not start with '%PDF-1.2^M...' for a PDF file.
The original file length in this case was 482376 bytes and ZServer was sending
me 458752 bytes. It should be the same length! :-)
 
The content type ist always 'application/pdf'
 
I've done the same steps frequently:
 - file upload: PDF Files
 - control the value of Content Type (application/pdf)
 
Sometimes the PDF file ist corrupt - sometimes not! ;-)
 
The same seems to appear with *.ps.gz files.
 
We are using Zope 2.1.6
 
Any hint?
 
 
The working PDF File (German: LinuxTag 2000-07-01 Stuttgart "Performante
WWW-Umgebungen mit Zope") you can find under:
http://www.lightwerk.de/zope/
 
Regards,
 
Veikko


-- 
Veikko Wünsche 
[EMAIL PROTECTED] http://www.lightwerk.de/


___
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] Shutting down Zope

2000-07-02 Thread Steve Alexander

Jonathan,

Jonathan Desp wrote:
> How I can shut down zope without clicking on the shutdown button ?
> because I'm not able to see the page.

You can run the "stop" script that is in the directory you installed
zope into.

In your case it will be:

  /home/jonano/Zope-2.1.6-src/stop

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.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] Re: Shutting down Zope

2000-07-02 Thread Jonathan Desp

Good Good. It's a nice mailing list. You can get your answer of your
question. I succeeded to shut down the zope, and now all works well.

Steve Alexander wrote:
> 
> Jonathan,
> 
> Jonathan Desp wrote:
> > How I can shut down zope without clicking on the shutdown button ?
> > because I'm not able to see the page.
> 
> You can run the "stop" script that is in the directory you installed
> zope into.
> 
> In your case it will be:
> 
>   /home/jonano/Zope-2.1.6-src/stop
> 
> --
> Steve Alexander
> Software Engineer
> Cat-Box limited
> http://www.cat-box.net

-- 
Very truly yours,

<><><><><><><><><><><><><><>
Jonathan Desp
Atoma
Matter will become Software
http://www.atoma.f2s.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] Unique id product

2000-07-02 Thread Steve Alexander

Hi Kent,

Kent Sin wrote:
> I want to develope a unique sequence id generator product, I have the
> following code
>
> def newid(self, increment=1):
> """ return new id """
> self.counter = self.counter+increment
> return self.counter
> 
> I am not quite sure if this works when more than one process asking for a
> newid concurrently. 

Do you need unique sequential ids, or will just unique ids do?

The problem with sequential ids is that you need to store the next id in
the sequence somewhere, and access to and incrementing this value
becomes a performance bottleneck for your server.

Also, if you store the sequence value in the ZODB, you will be creating
an undo record each time the id is incremented, and this is an
additional performance and storage overhead.

If you just want ids that are unique to a folder, try the following
algorithm (taken originally from the Discussion object code in the PTK).
The variable "self" is the one passed to the constructor method of a
particular Python class, and represents the folder you want to put the
new object into. I'm assuming the object is a "FooBar Item". The
"foobar-%06d" bit generates a unique id for the object that looks like
"foobar-290172837", based on the current time.

id = int(DateTime().timeTime())
while hasattr(self, str(id)):
id = id +1
id = 'foobar-%09d' % id


The advantage of this approach is that there is very little contention
in most cases.

> Is that zodb automatically serial all transaction?

For the purposes of generating ids, yes.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.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 )




Re: [Zope] Programattically adding rolesZope Folk , '@reepicheep.avalongroup.net

2000-07-02 Thread Dieter Maurer

Timothy Grant writes:
 > I know how to add users programatically, but I am having a difficult thing
 > finding out how to add roles programatically. I have a list of user defined
 > roles that I would like to add, but am unsure how to do it within DTML or an
 > external method.
 > 
 > Please note that I am *not* trying to assign roles to users here, I am just
 > trying to add roles to the system.
You can do anything programmatically, that you can do manually
through the management screen.
Just look at the DTML code that generates the respective form.


In your case (adding a role), the DTML source is
"AccessControl/access.dtml".

The analysis of the code shows you, that the
method "manage_defined_roles" does what you
want. It gets 2 keyword parameters: "role=your_role" and "submit='Add Role'".


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] calling standard_html_header from external methods

2000-07-02 Thread Dieter Maurer

Marco Mariani writes:
 > How may I access standard_html_header through acquisition
 > form foo.py?
 > 
 > I've tried
 > 
 > HEADER=self.standard_html_header()
 > 
 > It acquires, but gives me an error on title_or_id, on PARENTS,
 > on whatever. What arguments should I pass to it?
The __call__ function of DTML methods gets the following
arguments: client=None, mapping=None, **kw.

You therefore may call it: "self.standard_html_header(self,REQUEST)"
or "self.standard_html_header(None,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] Accesing a new context from a manipulated string

2000-07-02 Thread Dieter Maurer

Michael Bernstein writes:
 > Here's my problem:
 > 
 > given a method itemURL(), that typically returns a site
 > relative URL such as '/about/', I need to change to the
 > appropriate directories context using .
 > 
 > In short I need to do the equivalent of .
You may try
  



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] Arrg! dtml-in can't handle lists of pairs!

2000-07-02 Thread Dieter Maurer

"Cary O'Brien" <[EMAIL PROTECTED]> writes:
 > It seems as if dtml-in handles lists of pairs specially. 
It does, and it is documented.

For pairs, the first component becomes "sequence-key" and
the second "sequence-item".

 > Not a good thing.  Can I supress this behavior?
Not that I know.



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

2000-07-02 Thread Dieter Maurer

Oleg Broytmann writes:
 > On Sat, 1 Jul 2000, Jonathan Desp wrote:
 > > Do you know any software, for creating mailing list, under Zope ?
 > 
 >Zope is web-sever (mostly), how do you think it could handle mailing
 > lists?
 >Use mailman (www.list.org) for good python mailing list manager.
I do not like "mailman" at all.
At least as used by the Zope lists, its digest mode is utterly
broken.


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] sort=id, _.map, _.lambda woes

2000-07-02 Thread Dieter Maurer

Marco Mariani writes:
 > 
 > 
 > where "id" is a filename representing a number.
 > Of course, sort uses it like a string and sorts it wrong.
 > 
 > Maybe, since sortexpr= is not implemented (yet?) I could
 > get away with:
 > 
 > 
 > 
 > but _.map doesn't exist (nor _.lambda. Why?)
You would not need _.lambda.
"lambda" is not a function but a keyword in Python expressions.
It, therefore, is not required in "_" to be used.



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] Re: Every user should have the Anonymous role everywhere (was :Re: [Zope] Authentication, Anonymous and Public)

2000-07-02 Thread Dieter Maurer

Chris Withers writes:
 > Dieter Maurer wrote:
 > > In Zope, each user has a set of roles.
 > > Any user has the "Anonymous" role. Log-in users may have
 > > additional roles.
 > 
 > I'm not convinced this is true...
The Content Manager Guide (Security, Authorization) states it
this way:

  The "Anonymous" role, which all users have implicitly, 


This is natural, too.
Why should a registered user have
less authorization than an anonymous one.


Thus, two reasons to change the Zope authorization, such
that each user has implicitely the "Anonymous" role,
if this is not the case now.



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 not authorizing

2000-07-02 Thread Rajil Saraswat

i installed the zope-pcgi rpm file. the default user is superuser and
password is 123. but when i give these values in the prompt, the software
does not authorize me. i also changed the access file in /var/zope using
zpasswd but still the login is not working. 
earlier i was using zserver and it was working fine, is there some problem
with pcgi, is there some changes to be made. i did all the changes as
given on the rpm page at zope.org(httpd file change)
however when i goto http://localhost/static the zope screen is not
displayed. but if i goto http://localhost/cgi-bin/Zope.cgi then the
welcome screen comes. but i am not able to authorize myself at the
auth. prompt.
using pcgi what is the default object url, will it be
http://localhost/Zope.cgi/sample. if this is the case can we change it to
http://localhost/sample. 
basically i want the zope root to be located on http://localhost instead
of obscure url like http://localhost:8080 or
http://localhost/cgi-bin/Zope.cgi. This was the reason i wanted to try out
pcgi. can we do this.
please help!!


___
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] Fun with Trees

2000-07-02 Thread Dieter Maurer

Charlie Wilkinson writes:
 > I'm trying to use dtml-tree to create a selective menu of objects based
 > on whether or not the object has an "add_to_menu" property.  I've pretty
 > much figured out that I need a wrapper around objectValues that will
 > filter out the objects that don't have the "add_to_menu" property.
 > This wrapper would be called with dtml-tree's "branches" attribute.
 > I'm trying to do this wrapper in a DTML method and I've gotten all the
 > way to where I have to return a list of "actual objects", so says the
 > DTML Quick Reference.
 > 
 > Is there someone who could 'splain to me how to build a list of objects
 > in DTMLese?
 > 
 > Here's what I have so far (obviously not working):
 > 
 > 
 > 
 > 
 >   
 > 
 > 
 > 
That's perfect.

Almost surely, your problem results from the fact
that "dtml-tree" does not expect "branches" to be
a DTML method and does not pass a namespace to it.

I do not know, how you can avoid this (other than
changing the "dtml-tree" code.



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] Re: Copy/Paste problem

2000-07-02 Thread Curtis Maloney

On Sun, 02 Jul 2000, Oleg Broytmann wrote:
> Followup to myself...
>
> On Sat, 1 Jul 2000, Oleg Broytmann wrote:
> >I (and some my friends) have problem with Copy/Paste. Sometimes it's
> > wotking, but often Paste button does not appeared after Copy/Cut.
>
>After investigating I found that the problem is mostly related to
> SiteAccess. I can copy FROM a folder with SiteRoot object, but cannot paste
> INTO such folder. After removing SiteRoot object copy/paste worked. After
> reinstalling SiteRoot copy/paste stopped working again.

Ah, SiteAccess.  You can save yourself the repeated addition/removal of 
SiteAccess objects by learning how to type __no_before_traverse__ quickly in 
your URLs. (o8

http://my.site.com/path/to/zope/__no_before_traverse__/manage 

It tells SiteAccess to not do it's thing, and you should be able to direct 
access the Zope site there.

Have a better one,
Curtis



___
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] calling standard_html_header from external methods

2000-07-02 Thread Daryl Tester

Dieter Maurer wrote:

> The __call__ function of DTML methods gets the following
> arguments: client=None, mapping=None, **kw.
> 
> You therefore may call it: "self.standard_html_header(self,REQUEST)"
> or "self.standard_html_header(None,REQUEST)".

And what's the difference between passing in self or None?  What
does the client parameter actually do?

Regards,
  Daryl Tester

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

2000-07-02 Thread Terry Kerr

Hi,

I just downloaded Confera-1.2.0-nonbin.tgz, installed it, and created a
Confera topic instance.   I posted a mesage to the topic, and then
posted a reply to this messge.  This is what i get:

Traceback (innermost last):
  File /home/tejay/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line
214, in publish_module
  File /home/tejay/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line
179, in publish
  File /home/tejay/Zope-2.1.6-src/lib/python/Zope/__init__.py, line 202,
in zpublisher_exception_hook
  File /home/tejay/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line
165, in publish
  File /home/tejay/Zope-2.1.6-src/lib/python/ZPublisher/mapply.py, line
160, in mapply
(Object: addMessage)
  File /home/tejay/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line
102, in call_object
(Object: addMessage)
  File lib/python/Products/Confera/Confera.py, line 565, in addMessage
  File /var/tmp/python-root/usr/lib/python1.5/regsub.py, line 38, in
gsub
AttributeError: (see above)

Has any one had this problem?  I don't really have time to go hunting
for the problem at the moment.

I am running a Zope 2.1.6 from src on RH linux 6.2.

terry


--
Terry Kerr ([EMAIL PROTECTED])
Adroit Internet Solutions Pty Ltd (www.adroit.net)
Phone:   +613 9563 4461
Fax: +613 9563 3856
Mobile:  +61 414 938 124




___
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 and caching

2000-07-02 Thread Bak @ kedai

hi good people
i've been using zope for quite some time now.  everything has been great; zope,
the mailinglist, products are great!  


i want to serve a dynamic site and zope fits the bill.  now, i think i want to have 
some of the dynamic methods cached, so as to reduce the cpu cycles on my server. 

y'see, the site has slowly bogged down as the number of users increase(dwhich is
good, the users increase :)) and cpu cycles processing user requests have
increased.  i'm not too sure (being a newbie) whether all my methods contribute
to the consumption of cpu cycles.

caching.  yes, i've tried putting cache headers on my docs, but it  seems that
ie do not honor the headers, or maybe i put it wrongly.  ie(4.x and 5.x) kept
showing the cached version of my pages, even after clearing the local cache.  
only deleting the temp files solved the problem.  i had no bad behaviour from
netscape.  

also tried ZCache, but according to the product author, better wait for the
next version.  so, i'm waiting.

meanwhile, i've tried Cache Pool, and it looks good.  i have yet to test the
effectiveness of Cache Pool, but it looks as if the page loads faster now.


the point is this:
will zope ever have a method cacheing modules/object in the future?  for i think zope 
can be faster if he/she/it have this built in.

just a thought.  what say you guys?  how do you guys tackle this?

thanks


-- 
--
http://www.kedai.com.my/kk
Am I Evil?


___
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's wrong with this code?

2000-07-02 Thread Luke Tymowski

Hello,

When:


blah blah


Is put in the standard_html_header object it behaves correctly:
I want my standard header and footer objects to render when pages 
containing them are published.
I don't want my standard header and footer objects to render when

When that same code is put in the standard_html_footer object it never is 
published.

If I preview just the standard_html_header it works.
If I preview just the standard_html_footer it works.

If I create a simple page like:

This is some text.


The footer doesn't get published.

I'm sure it's something obvious, but I've spent a few hours going through 
everything I can find and haven't got anywhere.

thanks,

Luke


___
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's wrong with this code?

2000-07-02 Thread Andrew Kenneth Milton

+[ Luke Tymowski ]-
| Hello,
| 
| When:
| 
| 
| blah blah
| 

...snip...

| If I create a simple page like:
| 
| This is some text.
| 
| 
| The footer doesn't get published.

I'll go the obvious answer straight up...

Because 'renderedHeader' is already set?
You want to change it to renderedFooter in the footer...

-- 
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 |  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] Cannot "uncheck" boolean properties in 2.2b3

2000-07-02 Thread Ron Bickers

In 2.2b3, after setting a boolean property to "checked", it will not save
when trying to "uncheck" it.  I reported this to the Collector already
(751).

As a workaround, you can just delete it and readd it since it defaults to
unchecked.

___

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 )