Re: [Zope-dev] Hmmmm.... what do *you* do when Zope is 'stuck'.

2000-12-03 Thread Stefan H. Holek

On Sat, 2 Dec 2000, Steve Spicklemire wrote:

 OK.. more details... this is definitely a PoPy issue... 
 
 I reinstalled ZPoPyDA, ran Zope in single threaded mode 
 ( ./start -t 1 ) and then deleted my ZPoPyDA database adaptor.
 Then I created a new one, connected to postgres, and tested it.
 Then when I shut down Zope, and restared multi-threaded all was
 working again. Soo... this leaves me with a real warm fuzzy 
 feeling ;-). I have been moving databases around recently
 so I probably futzed something in the process... wierd 
 symptoms though 
 
 Anyway.. sorry for bothering... still interested in ideas for
 'debugging' the problem, should it ever arise again.

Though I do not really see an analogy ;), I want to share this:

I have found that my Zope would not start up when the servers mentioned
in a database connection object were unavailable (a ZMySQLDA in my
case). I "fixed" this by adding my db servers to the local /etc/hosts
file with an address of 127.0.0.0. Zope would start up fine then. The db
connections all appeared broken of course, but at least they were not
waiting "indefinitely" for a response from the servers.

This does of course not explain the quantum phenomena you saw ;)

Regards,
Stefan


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




Re: [Zope-dev] ZPoPyDA for FreeBSD... was (Hmmmm.... what do *you* do when Zope is 'stuck'.)

2000-12-03 Thread Steve Spicklemire


Thanks... I'm pretty sure now that what I was was pthreads/popy
related.  I didn't realize there was a new/updated PoPy/ZPoPyDA on the
zope site with lots of thread related (sem_init, sem_wait,... )
changes so I built it on my FreeBSD boxen and haven't seen the same
behavior since.

-steve

P.S.

here are the changes I made to build on FreeBSD:

diff -c -r1.1.1.1 -r1.2
*** PoPymodule.h2000/12/03 14:06:38 1.1.1.1
--- PoPymodule.h2000/12/03 14:09:57 1.2
***
*** 38,43 
--- 38,44 
  #include catalog/pg_type.h
  #include libpq-fe.h
  #include libpq/libpq-fs.h
+ #include sys/types.h
  #include regex.h
  #include string.h
  #include stdlib.h


and 

mercury.spvi.com diff -c foop/pythonmods/PoPy/Makefile foo/pythonmods/PoPy/Makefile
*** old/Makefile   Sun Dec  3 18:06:58 2000
--- new/MakefileSun Dec  3 09:43:00 2000
***
*** 88,94 
  TARGET=   python
  
  # Add more -I and -D options here
! CFLAGS=   $(OPT) -I$(INCLUDEPY) -I$(LIBPL) $(DEFS) 
-I/usr/local/pgsql/include/ -Wall \
-DVERSION=\"1.4.1\"
  
  # These two variables can be set in Setup to merge extensions.
--- 88,94 
  TARGET=   python
  
  # Add more -I and -D options here
! CFLAGS=   $(OPT) -pthread -I$(INCLUDEPY) -I$(LIBPL) $(DEFS) 
-I/usr/local/pgsql/include  
-I/usr/ports/databases/postgresql7/work/postgresql-7.0.2/src/include -Wall \
-DVERSION=\"1.4.1\"
  
  # These two variables can be set in Setup to merge extensions.
***
*** 114,120 
  LINKCC=   $(PURIFY) $(CC)
  SGI_ABI=  
  OPT=  -fomit-frame-pointer -O6
! LDFLAGS=  -L/usr/local/pgsql/lib/ 
  LDLAST=   
  DEFS=  -DHAVE_CONFIG_H=1  -DHAVE_LIBCRYPT=1 
  LIBS= -lcrypt -lc_r
--- 114,120 
  LINKCC=   $(PURIFY) $(CC)
  SGI_ABI=  
  OPT=  -fomit-frame-pointer -O6
! LDFLAGS=  -L/usr/local/pgsql/lib 
  LDLAST=   
  DEFS=  -DHAVE_CONFIG_H=1  -DHAVE_LIBCRYPT=1 
  LIBS= -lcrypt -lc_r
***
*** 123,129 
  RANLIB=   ranlib
  MACHDEP=  freebsd3
  SO=   .so
! LDSHARED= gcc -shared
  CCSHARED= -fpic
  LINKFORSHARED=-Xlinker -export-dynamic
  
--- 123,129 
  RANLIB=   ranlib
  MACHDEP=  freebsd3
  SO=   .so
! LDSHARED= gcc -shared -fpic -pthread 
  CCSHARED= -fpic
  LINKFORSHARED=-Xlinker -export-dynamic
  
***
*** 209,217 
cp -ra test debian mx PoPy-1.4.1/
tar czf PoPy-1.4.1.tar.gz PoPy-1.4.1/
  
-   
- 
  # Rules appended by makedepend
  
  PoPymodule.o: $(srcdir)/PoPymodule.c; $(CC) $(CCSHARED)  $(CFLAGS) -c 
$(srcdir)/PoPymodule.c
! PoPymodule$(SO):  PoPymodule.o; $(LDSHARED)  PoPymodule.o  -L/usr/local/pgsql/lib/ 
-lpq -o PoPymodule$(SO)
--- 209,215 
cp -ra test debian mx PoPy-1.4.1/
tar czf PoPy-1.4.1.tar.gz PoPy-1.4.1/
  
  # Rules appended by makedepend
  
  PoPymodule.o: $(srcdir)/PoPymodule.c; $(CC) $(CCSHARED)  $(CFLAGS) -c 
$(srcdir)/PoPymodule.c
! PoPymodule$(SO):  PoPymodule.o; $(LDSHARED) PoPymodule.o  -L/usr/local/pgsql/lib 
-lpq $(LIBS) -o PoPymodule$(SO)






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




[Zope-dev] Zope, 4Zope and XML???

2000-12-03 Thread Jay, Dylan

I've been considering using XML within Zope as a kind of XML repository with
versioning etc. I've been trying to follow what the developments with XML
with regard to Zope are and I'm becoming very confused. There seems to have
been some really good stuff coming up with regard to integration between
fourthought XML tools and Zope but that was 6 months back. What has
happened? From the looks of it fourthought have back out and are now
creating their own persistent XML storage and 4Suite application server. 

I've read all the xml-wiki stuff but there doesn't seem to have been any
actual code produced to improve support for XML in Zope for over 6 months.
What there is is pretty behind the times. I'd really like to see XPath, XQL,
XLink, XPointer all being well supported with some kind of heavy duty
XMLRepository storage in Zope. I see Zope as the perfect place to put this
sort of thing since it provides all the undo, versioning, transparent
persistence to make it easy to work with XML. What's needed is support for
more powerful query languages. I want to be able to use a Zope XML
repository as an alternative to an RDBMS i.e. to store data for use in
applications. I want to do this because RDBMS's are not so nice when it
comes to the kind of structured information that XML is good at. I don't
want to use straight Zope objects because I want a very loose coupling
between my data and my interface (something that I see as a deficit in the
default way Zope seems to promote development). I want to be able to examine
my data in an independent way and take it out and use something else as the
interface if necessary. XML lets me do that. RDBMS lets me do that.

Anyway, what's the story with Zope and XML?


Dylan Jay   mailto:[EMAIL PROTECTED]
Avaya Communication Tel:   +61 2 9886-8961
Level 5, 15 Talavera Road   FAX:   +61 2 9352 9224
Nth Ryde NSW 2113   Mobile:0409 606 171
AUSTRALIA

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




Re: [Zope] Running Zope

2000-12-03 Thread Phil Harris

Norm,

Calm down, take a deep breath, right that's better.

The behaviour you see is again quite normal.

The decision has been made that the superuser cannot own anything, apart
from user objects and user folder type objects.

So the first thing you need to do is to create another user that has
management rights then use that user for all the tutorial work.

This is mentioned in the docs somewhere, but it escapes me at the moment as
to where that is.

This should be your final major hurdle, and you'll be serving zope pages in
no time ;)

I would urge you to take a look at the upcoming Zope book, which is
available from the front page of Zope.org.

hth

Phil
[EMAIL PROTECTED]


- Original Message -
From: "Norm LaDuke" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, December 03, 2000 1:17 AM
Subject: [Zope] Running Zope


| Can anyone out there tell me why anyone would use a product whose tutorial
won't
| even run.  You guys are either INFINITELY more patient than I or you all
have
| WAY too much time on your hands.  I'm about 7 hours into this thing and we
do
| finally have zope up and running but of course the tutorial doesn't work.
| Requires you to put in an ID then blows up and goes no further.What a
piece
| of garbage  (Does my frustration show??)
|
|
| ___
| 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] Link counter

2000-12-03 Thread Brendon Grunewald



I have recently been asked by a partner site to 
provide them with a count of how many times someone links from my site to 
theirs. Since there are many ways they could hyperlink to that site (Squishdot 
articles, normal links, banner ads etc), is there a way in zope to keep track or 
to extract that info? OR am I stuck with the server logs?

Regards,Brendon--70South: the No.1 source for 
Antarcticles.For the latest news and views on Antarctica visit : http://www.70south.com


Re: [Zope] trouble: products created inside Zope, updating from 2.1 to 2.2

2000-12-03 Thread Dieter Maurer

Thies =?ISO-8859-1?Q?B=E4hr?= writes:
   authorization problems for TTW products
  after 2.1 -- 2.2 transition 

The reason is simple that you do not find upgrade documentation for TTW
products: there should be nothing to worry about.

Thus, you have a case, that should not be.

Let the authorization fail and post the resulting traceback.
Maybe, we see something.

You may also look into the (searchable) list archive.
There have been several threads about similar problems.

And, I (at your place) would use Zope 2.2.4 rather than 2.2.2.
Maybe, the problem disappears (because a bug was fixed).



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] Intercepting NotFoundError with standard_error_message

2000-12-03 Thread Dieter Maurer

Philipp Auersperg writes:
   missing control over stack trace 

I agree with you:

  you should have control over this stack trace.

  However, I fear, you will need to change the Zope source
  to get this.

  It should be easy to implement:
  Bind the traceback to a variable in the namespace,
  the "standard_html_error" page is rendered in
  rather than appending it directly.
  The "standard_html_error" is free to do with it
  whatever it likes.


Maybe, you file a feature request into the Collector.


Dieter


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




Re: [Zope] Making lots of external data searchable?

2000-12-03 Thread Dieter Maurer

Anselm Lingnau writes:
   indexing big mail archives from Zope 
You can use the Zope product "LocalFS" (maybe also "ExternalFile")
to wrap external files into Zope objects (without storing
then in the ZODB).

Newer versions of "LocalFS" allow you the catalog its contents
with ZCatalog.

However, before you commit to ZCatalog, make some performance
measures. ZCatalog tends to require large amounts of time
and memory to build its indexes.


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] Custom tpValues for dtml-tree

2000-12-03 Thread Dieter Maurer

Randall Kern writes:
  
  Error Type: AttributeError
  Error Value: 'tuple' object has no attribute 'append'
  
File /usr/src/Zope-2.2.2-src/lib/python/TreeDisplay/TreeTag.py, line 566,
  in apply_diff
  (Info: ([None, ([140975456, []],)], [140974880, 140974088]))
  AttributeError: (see above)

You may try to replace in "TreeDisplay.TreeTag.TreeTag.tpRender":

if state is substate and not (args.has_key('single') and args['single']):
state=state or ([id],)
state=encode_seq(state)
by:
if state is substate and not (args.has_key('single') and args['single']):
state=state or [[id],]
state=encode_seq(state)


If you do and have success, please file a bug report with patch
into the collector.


You may later get a different problem:

  In some contexts, the Zope security policy requires
  an acquisition context. You "Foo" objects do not
  have such contexts.

If the problem shows up, you will get Unauthorized exceptions
where you do not expect them.


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] Help - cannot import zexp

2000-12-03 Thread Dieter Maurer

Oleg Broytmann writes:
   functions as default parameters to external method functions
  cause import problems 
  
 "Cannot import default_render from module __main__". Oops! What's that?
  The default_render isn't in __main__, sure. I tried to create External
  Method before importing, but this didn't help :(
This is a severe danger of "pickle" and the external method
implementation:

  *  the implementation does not import the Python source files
 but reads them in and executes them.

 All functions and classes appear to be defined in the
 module "__main__".

  *  The implementation places the function default arguments
 into the ZODB (as a pickle).

  *  "unpickle" cannot load the corresponding object,
 as it imports "__main__" and looks there for the
 function -- in vain.


As a rule:

  Avoid the use of class of function definitons from
  an external method source file for anything that
  may be written to the ZODB (or more generally
  be pickled; this applies e.g. to session context, too).
  This includes created object instances that may
  end up as attributes of Zope objects or
  function default parameters to external methods.

If you defined such classes or functions in a true
Python module, you should have no problem.



What can you do, if your zexp is valuable?

  *  put a dummy definition of "default_render" in the
 "__main__" module.

 You should then be able to import your zexp
 and change the problematic external method.

 I do not know precisely, what Zope's "__main__"
 module is. I expect the "z2.py".
 If this is not the case, then a small dummy product
 that does "import __main__; __main__.default_render= 0"
 should do the trick, whatever "__main__" may be.


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] IMAP and WorldPilot?

2000-12-03 Thread Cymen Vig

I'm trying to setup WorldPilot on one server with IMAP running on another.
The documentation for the install says simply:

"Set your corresponding IMAP and SMTP servers, if they are not on
localhost."

I went ahead and added a MailHost (SMTP) server but how do I add an IMAP
one?  Do I need to digup a product?

Thanks,
Cymen Vig
[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] VHost logs.

2000-12-03 Thread seb bacon

  mod_rewrite is your friend.  You just make a Rule that redirects
  anyone accessing your site on port 80 to port 443, something like
  this:
  
  VirtualHost 123.123.123.123
ServerName www.foobar.com
RewriteEngine on
RewriteRule ^/(.*)https://www.foobar.com/
  /VirtualHost
 
 I don't want to force ALL access to port 443, only certain sections of 
 the site which require authentication to access.  I guess the above 
 still holds true (your correction in a later message is noted), I just 
 need to get more creative with my rewrite rules.  Thanks for the tip.

FYI, in these situations I put bits I want to enforce SSL on in a
folder called secure, and then do mod_rewrite variations on

  RewriteCond   %{REQUEST_URI}   ^/.*secure.*/
  RewriteRule   ^/(.*)   https://www.foobar.com/$1

seb

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




[Zope] What is Formatted Document

2000-12-03 Thread administrator

Hi,

where can I find the "Formatted Document" product?
I can find documents of meta type "Formatted Document,
but how can I create one.

  Arno
  [EMAIL PROTECTED]



Re: [Zope] Link counter

2000-12-03 Thread Chris Gray

You want something like this in your linking page:

form action="count_and_pass"
input type="hidden" name="target_url" value="http://www.zope.org/"
input type="submit" value="Go to Zope.org"

OR

a href="count_and_pass?target_url=http%3a//www.zope.org/"Go to
Zope.org/a

Then you need a 'count_and_pass' DTML Method like:

dtml-call increment
dtml-call expr="RESPONSE.redirect(_['target_url'])"

and a ZSQL Method called 'increment' that takes 'target_url' as an
argument and increments the count for that URL.  Or you can get fancier
and use the ZSQL method to record each click through along with date and
info like the users IP and the refering page.  These last will be in the
REQUEST from the linking page.

Cheers,
Chris

On Sun, 3 Dec 2000, Brendon Grunewald wrote:

 I have recently been asked by a partner site to provide them with a count of how 
many times someone links from my site to theirs. Since there are many ways they could 
hyperlink to that site (Squishdot articles, normal links, banner ads etc), is there a 
way in zope to keep track or to extract that info? OR am I stuck with the server logs?
 
 Regards,
 Brendon
 --
 70South: the No.1 source for Antarcticles.
 For the latest news and views on Antarctica visit : http://www.70south.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] Running Zope == ZopeVirgins

2000-12-03 Thread Jason Cunliffe

I hope Norm LaDuke does take a breath and follow the advise others have
given.

But his post does in fact seem to be a common first-time experience. So I
would like to suggest a sensible super-newbie-oriented adjustment to _all_
future Zope installations:

At installation Zope system should create a default user called 'tutorial'
or 'guest' or 'first-time' or something.

Upon launching Zope the first time after installation, user 'tutorial' would
immediately be logged in automatically and routed to the tutuorial istelf,
where the first page advises him/her to create a personal user 'Id' and
password for any further real-world use of Zope. This page should also
include a form right there to do this.


- Jason

 - Original Message -
 From: "Norm LaDuke" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, December 03, 2000 1:17 AM
 Subject: [Zope] Running Zope


 | Can anyone out there tell me why anyone would use a product whose
tutorial
 won't
 | even run.  You guys are either INFINITELY more patient than I or you all
 have
 | WAY too much time on your hands.  I'm about 7 hours into this thing and
we
 do
 | finally have zope up and running but of course the tutorial doesn't
work.
 | Requires you to put in an ID then blows up and goes no further.What
a
 piece
 | of garbage  (Does my frustration show??)



___
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] database query

2000-12-03 Thread Dieter Maurer

Lee writes:
  ERROR:
  The call can not be completed as dialed.
  Error Type: IOError
  Error Value: [Errno 13] Permission denied:
  '/usr/local/Zope-2.1.6-src/var/gadfly/demo/demo.gfl'
This is a file permission problem with
"/usr/local/Zope-2.1.6-src/var/gadfly/demo/demo.gfl"

Check that the user running Zope is allowed to read and write
to this file (and maybe the directory
"/usr/local/Zope-2.1.6-src/var/gadfly/demo/".

It has nothing to do with Chapter 10.


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] weird bug?

2000-12-03 Thread Dieter Maurer

michael angelo ruberto writes:
  one of the DTML methods i've created recently has started to create
  problems. the method adds properties to documents as people browse zope. it
  worked fine for a while but now it's causing zope to prompt for a password.
  i gave the method manager proxy which solved the problem on my test server
  but didn't make a difference on the intranet zope. the error generated when
  you click Cancel on the password prompt is "You are not authorized to access
  manage_addProperties."
It is strange that it worked before you added the manager proxy role:
   "manage_addProperties" is for good reasons protected.

It is strange, too, that the proxy role does not work in the
other installation. Do you use Zope 2.2?
In this case, maybe, something is wrong with the owner
of the method. Moreover, proxy roles are no longer inherited
to called methods.


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

2000-12-03 Thread Dieter Maurer

Chris Gray writes:
  Zope Book - Chapter 9 - 2nd sentence:
  
  "You can also use it to search external data such as relational data,
  files, and remote web pages."
  
  Can anyone point me to further information on how to do these things?
ZCatalog uses the method "objectItems" to find the children
of an object in the ZCatalog method "Find Objects to Catalog".

Thus, to extend cataloguing into a database, you will need
an object the "objectItems" of which will return the database
records you want to be cataloged.

You can not use raw database records, as the catalog requires
each catalogued object to be URL addressable (it uses the
URL to identify the object). Thus, you must use
a pluggable brain (-- Advanced tab of Z SQL methods management
interface) to provide the "absolute_url" method (or whatever
ZCatalog will tell you, it does not find during the cataloguing).

As you probably will be interested, that the object can be retrieved
with the URL, you will also need to learn about "direct traversal".
This is make database records URL addressable.

As you may see, it is not trivial.


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] Passing lists in a get request (ZCatalog Search)

2000-12-03 Thread Dieter Maurer

Darin Lee writes:
  ... 
  but when I try to sort the column (with a ?sort_on=index "get" request), the 
 selected criteria are forgotten and the entire result set is returned sorted. 
You add also the search criteria to your URL?
I.e. you use

 your_method?sort_on=themetheme=xxxtheme=yyy

If you simply append "?sort_on=theme" to

 your_method?theme=xxxtheme=xxx

Then, you would have two '?parameter' sections. Only the last
would be taken. The first would be part of the path which should
give you a NotFound Exception. But maybe, there is a bug somewhere.

You could also use a dtml-call "REQUEST.set('sort_on','theme')"
in "your_method" before the "dtml-in", in case the sort order
is fixed.


  for example, one of my search criteria is "theme" - there are four possible  (Air, 
 Land, Water, and Waste). 
  
  the request would look like:
  search?meta_type=Publicationtheme=Airtheme=Landtheme=Water
  
  I can't figure out how to pass a list in the get request.
That is a good approach. If the same parameter is repeated,
Zope will bind a list of all values to the parameter name.

If you would like to be sure to get a list (or no value at all),
you can use "theme:list". This will ensure, that a list is
bound even if there is only a single "theme" parameter.

This is irrelevant for your application, however.

   difficult to build long list "param=v1param=v2" 
Usually, the browser builds such URL for you (out of a form).
E.g., if you use a multiple select box or several check boxes
with the same name, the browser will construct corresponding
"param=v" for each selected/checked value.

   length limitation with get 
HTTP 1.1 (and I think HTTP 1.0) has removed the length restriction.
At least Zope/Zserver will not impose an unreasonalble limit.


Someone else suggested to use a post (rather than get) request.
In general, I would warn you against this solution.
It will break the "dtml-in" batch support.



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] Help! Accessing product constructors methods programmatically

2000-12-03 Thread Dieter Maurer

[EMAIL PROTECTED] writes:
  Can anyone suggest an approach to this problem? Any relevant 
  documents I need to read?
I like to repeat my general remark (you find it several time
in the (searchable) list archiv ;-)):

   Whenever, you can do something with the Zope management
   interface, you can do it programmatically.

   Moreover, a look at the source of the Zope management
   pages (mostly DTML and mostly in the OFS/ and App/ subfolders
   of your distribution), will tell you how to do it.


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] Wampum generator on Zope 2.2.4 fails / _isBeingUsedAsAMethod

2000-12-03 Thread Brad Clements

Selecting the Security Tab on a Wampum Generator produces this 
output:

Error Type: AttributeError
Error Value: _isBeingUsedAsAMethod


Traceback (innermost last):
  File /usr/holmes/Zope/lib/python/ZPublisher/Publish.py, line 222, in publish_module
  File /usr/holmes/Zope/lib/python/ZPublisher/Publish.py, line 187, in publish
  File /usr/holmes/Zope/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
(Object: CyberCash)
  File /usr/holmes/Zope/lib/python/ZPublisher/Publish.py, line 171, in publish
  File /usr/holmes/Zope/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: manage_access)
  File /usr/holmes/Zope/lib/python/ZPublisher/Publish.py, line 112, in call_object
(Object: manage_access)
  File /usr/holmes/Zope/lib/python/AccessControl/Role.py, line 252, in manage_access
(Object: Traversable)
AttributeError: (see above)


Any ideas?

Brad Clements,[EMAIL PROTECTED]   (315)268-1000
http://www.murkworks.com  (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com   AOL-IM: BKClements

___
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] It's NOT a Zope error

2000-12-03 Thread Didier Georgieff

On 3 Dec 2000, at 12:00, Jason Cunliffe" [EMAIL PROTECTED]  wrote:

 But his post does in fact seem to be a common first-time experience. So I
 would like to suggest a sensible super-newbie-oriented adjustment to _all_
 future Zope installations:

While i really agree to that (always in term of bringing Zope to the 
masses), this remains me a **very common** comment i often receive.

First, forget all what you know about web programming, languages, python 
and zope.
Imagine you're just a good buddy who only wants to be convinced to allow 
you to use whatever tool you propose (yes evangelization...)

Each time they see the message "Zope Error" (even for unauthorized login 
! or your own programing error) they are telling "pfff this software is really 
buggy", and the poison is here.

So i would suggest, as a "marketing" feature to change the error message 
to something more accurate or at least who doesn't imply Zope 
(something like "your code sucks" ..  just kidding !).

I know that i can patch zope (and i've done it) to change the general error 
message but this would be a general benefit for non technical people if 
they can leave this bad feeling about "Zope Error", because it's NOT a 
zope error, and finaly this simple thing makes more against Zope than a 
lot of real complain wich remains out of the knowledge area for managers 
or executives.

Regards.
Didier.

___
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] News article.

2000-12-03 Thread J. Michael Mc Kay



If anyone has a copy of a recent news article in 
the Fredericksburg Free Lance Star about DC, would they please send me a copy to 
[EMAIL PROTECTED].


Thanks...


[Zope] ZMySQL Database Connection

2000-12-03 Thread corey


Greetings!

I'm at the point where I could really use some help...

Specifically, I cannot for the life of me get a ZMySQL
instance to work - on two different machines, using 
about 4 different combinations of Zope, Python, ZMySQLDA
and MySQLdb versions...  What occurs ( depending on which
particular combo I try ) is one of three things, either: 

#1 - the loading of the ZMySQLDA Product fails entirely,
 causing Zope itself to die upon startup,
or

#2 - an error about invalid syntax or somesuch occurs,
 although the sql query is perfectly correct. ( sorry,
 I can't remember the exact error msg, although it occured
 frequently through my attempts - and I'm not going
 to try and reproduce it ) 

or

#3 - the following error is recieved: 'There was no data 
 matching this Z MySQL Database Connection (connected) 
 query.'  Even though I *know* that the simple query
 I'm testing with *definately* returns data.


I was finally able to get past errors #1 and #2, with 
#3 being the closest I've been able to get everything 
working - I can create and load the ZMysqlDA Product
just fine, I can test the query, without error #2,
but for some reason no matter what - the response is
*allways* that there was no data matching my query!
I've attempted the same query using the same user on
the same database with the same table via the mysql
client just fine... why is Zope failing me?

Any suggestions? Anyone else run accross this problem?
I'm at wits end here. I've been through ever possible
logical solution I can think of to no avail. Is there
some lower level interface or debug or log that I can
inspect for further details?

Current config:

Zope version: Zope 2.2.4 (source release, python 1.5.2, linux2) 
Python version: 2.0 (#1, Oct 25 2000, 19:37:52) [GCC egcs-2.91.66 19990314/Linux 
(egcs-1.1.2 release)] 
System Platform: linux2 
ZMySQLDA: 1.2.0
MySQLdb: 0.1.2


Beers,

Corey




___
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] weird bug?

2000-12-03 Thread Randall Kern


- Original Message -
From: "Dieter Maurer" [EMAIL PROTECTED]
 of the method. Moreover, proxy roles are no longer inherited
 to called methods.

This has confused me several times, could anyone shed some light as to why
proxy roles are not inherited?

Thanks,
-Randy


___
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] Public CVS Zope won't compile (fwd)

2000-12-03 Thread Chris Gray

Did a fresh checkout but "python w_pcgi.py" chokes at:

Writing the pcgi resource file (ie cgi script),
/home/cpgray/zope_cvs_run/Zope2/Zope.cgi
chmod 0755 /home/cpgray/zope_cvs_run/Zope2/Zope.cgi
Traceback (innermost last):
  File "w_pcgi.py", line 111, in ?
if __name__=='__main__': main(sys.argv[0])
  File "w_pcgi.py", line 109, in main
import wo_pcgi; wo_pcgi.main(me)
  File "/home/cpgray/zope_cvs_run/Zope2/wo_pcgi.py", line 98
import comcontent.main(home, user, group)
  ^
SyntaxError: invalid syntax

Cheers and Beers,
Chris



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




Re: [Zope] ZMySQL Database Connection

2000-12-03 Thread corey


Of course... after two complete days and nights of trying to get
this to work, and finally throwing up my hands in despair and
asking for help here on the list -- I made one last attempt while
awaiting a response... and behold! Viola! I finally got everything
to work correctly! ( and there was much rejoicing )

I just ended up compeletely erradicating every last vestige of
Python, Zope, ZMySQLDA and MySQLdb on my system - and recompiling
everything from scratch, carefully and methodically.

Anyhow - problem solved, sorry for the rant.


Beers!

Corey


And upon Sunday of December 03, the illustrious [EMAIL PROTECTED] spake thusly...
 
 Greetings!
 
 I'm at the point where I could really use some help...
 
 Specifically, I cannot for the life of me get a ZMySQL
 instance to work - on two different machines, using 
 about 4 different combinations of Zope, Python, ZMySQLDA
 and MySQLdb versions...  What occurs ( depending on which
 particular combo I try ) is one of three things, either: 
 
 #1 - the loading of the ZMySQLDA Product fails entirely,
  causing Zope itself to die upon startup,
 or
 
 #2 - an error about invalid syntax or somesuch occurs,
  although the sql query is perfectly correct. ( sorry,
  I can't remember the exact error msg, although it occured
  frequently through my attempts - and I'm not going
  to try and reproduce it ) 
 
 or
 
 #3 - the following error is recieved: 'There was no data 
  matching this Z MySQL Database Connection (connected) 
  query.'  Even though I *know* that the simple query
  I'm testing with *definately* returns data.
 
 
 I was finally able to get past errors #1 and #2, with 
 #3 being the closest I've been able to get everything 
 working - I can create and load the ZMysqlDA Product
 just fine, I can test the query, without error #2,
 but for some reason no matter what - the response is
 *allways* that there was no data matching my query!
 I've attempted the same query using the same user on
 the same database with the same table via the mysql
 client just fine... why is Zope failing me?
 
 Any suggestions? Anyone else run accross this problem?
 I'm at wits end here. I've been through ever possible
 logical solution I can think of to no avail. Is there
 some lower level interface or debug or log that I can
 inspect for further details?
 
 Current config:
 
 Zope version: Zope 2.2.4 (source release, python 1.5.2, linux2) 
 Python version: 2.0 (#1, Oct 25 2000, 19:37:52) [GCC egcs-2.91.66 19990314/Linux 
(egcs-1.1.2 release)] 
 System Platform: linux2 
 ZMySQLDA: 1.2.0
 MySQLdb: 0.1.2
 
 
 Beers,
 
 Corey
 
 
 
 
 ___
 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] Monitoring Zope.

2000-12-03 Thread Jason C. Leach

hi,

A while ago someone was asking about monitoring zope. This is a simple
python script I use to keep an eye on the server.

It's run in cron, every so often it fetches the last known zope PID, and
makes sure zope is still running on it.  If it's not, it runs the Zope
startup script.

I'll eventual improve upon it so it mails me a note and makes a log so I
know if zope starts to bail quite a bit.

j.

..
. Jason C. Leach
... University College of the Cariboo.
.. 


#!/usr/local/bin/python
#
# Simple Zope monitoring script.
# Jason C. Leach. Canada.
#


import string, os

def ScanLines(token, command):
#print 'in ScanLines'

Status = 0

# fetch data
Lines = PipeInput(command)

# cycle through the input
for line in Lines:
# if a line contains the 'daemons' name, just exit gracefully.
Status = string.find(line, token)
#print Status
#print line
# should exit
if Status = 0:
Status = 1
break
else:
Status = 0

#print 'done ScanLines'
return Status

def PipeInput(command):
# check to make sure the disks are not to full.
#print 'int PipeInput'

# variable decleration
Lines = []

# open pipe to os command
pipe = os.popen(command, 'r')

# fetch input
Lines = pipe.readlines()

# close the pipe
pipe.close()

return Lines

def GetPid(FILE):

fin = open(FILE, 'r')

pid = fin.readline()

fin.close()

return pid



if __name__ == '__main__':

TOKEN = 'Zope'
ZOPEPID = '/usr/local/www/Zope/var/zProcessManager.pid'
CMD = 'ps -p ' + GetPid(ZOPEPID) + ' | grep Zope'
SCRIPT = ' /usr/local/etc/rc.d/zope.sh start'



Status = ScanLines(TOKEN, CMD)
if not Status:
os.system(SCRIPT)

#return 1





[Zope] Fragments of html in IE (Was: Why Not Zope? ...)

2000-12-03 Thread seb bacon

* Riku Voipio [EMAIL PROTECTED] [001201 10:46]:
 Besides, the zserver on 2.1.6 seems to have bugs that sometimes let 
 the page only 90% through.

I don't know if your 90% problem is the same as the one I've been
having, but I'm scratching my head a lot here:

When I test my site using IE5.5, the page seems to get fragmented
somewhere along the way.  Usually, all but the last few bytes arrive
at the browser.  Sometimes _only_ the last few bytes arrive at the
browser.  But using NS under 'nix, everything's fine.

I've tried running the HTTP headers from each browser through a telnet
session and I seem to get all the data every time.

Has anyone else seen this behaviour?  You can check it out at

  http://test1.jamkit.com

and if you're running IE you may see either a stray

 /ta

at the bottom of the screen, or perhaps just a

 ble/body/html

on a white background.

Cheers,

seb

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




Re: [Zope] It's NOT a Zope error

2000-12-03 Thread Tim Cook

Didier Georgieff wrote:


 Each time they see the message "Zope Error" (even for unauthorized login
 ! or your own programing error) they are telling "pfff this software is really
 buggy", and the poison is here.
 
 So i would suggest, as a "marketing" feature to change the error message

I agree 100%. "Zope Exception" might be a better choice.  I have
had several people send me an error report because they don't
read the exception message that basically says "you must enter a
first  last name."
As soon as they see "Zope Error" they quite and tell you there is
a problem.

Then again maybe this is where I need to build my own
standard_error_message?
Instead of letting it fall through to Zope's.

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

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




Re: [Zope] IMAP and WorldPilot?

2000-12-03 Thread Jason C. Leach


IMAP is a mail server for the MTA.  It does not have anything to do with
Zope.

j.


..
. Jason C. Leach
... University College of the Cariboo.
.. 

On Sun, 3 Dec 2000, Cymen Vig wrote:

 I'm trying to setup WorldPilot on one server with IMAP running on another.
 The documentation for the install says simply:
 
 "Set your corresponding IMAP and SMTP servers, if they are not on
 localhost."
 
 I went ahead and added a MailHost (SMTP) server but how do I add an IMAP
 one?  Do I need to digup a product?
 
 Thanks,
 Cymen Vig
 [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] Running Zope

2000-12-03 Thread Jason C. Leach

hi,

So you think that because you can not get it going it's Zopes
fault? 

Why not ask a specific question, based on what you say below I have no
idea what you are doing or what your problem; this makes it difficult to
write a response. Throw in a few details so we know what you are doing.

I got Zope going on Linux and FreeBSD in under 10 mins each when I first
installed it as a novice.

..
. Jason C. Leach
... University College of the Cariboo.
.. 

On Sat, 2 Dec 2000, Norm LaDuke wrote:

 Can anyone out there tell me why anyone would use a product whose tutorial won't
 even run.  You guys are either INFINITELY more patient than I or you all have
 WAY too much time on your hands.  I'm about 7 hours into this thing and we do
 finally have zope up and running but of course the tutorial doesn't work.
 Requires you to put in an ID then blows up and goes no further.What a piece
 of garbage  (Does my frustration show??)
 
 


___
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] Fragments of html in IE (Was: Why Not Zope? ...)

2000-12-03 Thread dale . w . lance

I just tried with netscape and get the same thing.
(the dangling /ta)

Hope this helps
Dale

-Original Message-
From: seb [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 03, 2000 5:45 PM
To: riku.voipio
Cc: seb; zope
Subject: [Zope] Fragments of html in IE (Was: Why Not Zope? ...)


* Riku Voipio [EMAIL PROTECTED] [001201 10:46]:
 Besides, the zserver on 2.1.6 seems to have bugs that sometimes let 
 the page only 90% through.

I don't know if your 90% problem is the same as the one I've been
having, but I'm scratching my head a lot here:

When I test my site using IE5.5, the page seems to get fragmented
somewhere along the way.  Usually, all but the last few bytes arrive
at the browser.  Sometimes _only_ the last few bytes arrive at the
browser.  But using NS under 'nix, everything's fine.

I've tried running the HTTP headers from each browser through a telnet
session and I seem to get all the data every time.

Has anyone else seen this behaviour?  You can check it out at

  http://test1.jamkit.com

and if you're running IE you may see either a stray

 /ta

at the bottom of the screen, or perhaps just a

 ble/body/html

on a white background.

Cheers,

seb

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




[Zope] Can't load confirm message box

2000-12-03 Thread Angietel





body class="body" 

script language="JavaScript"
function confirm(){window.confirm("Are you sure 
you want to delete?");}/script


Re: [Zope] Public CVS Zope won't compile (fwd)

2000-12-03 Thread Michel Pelletier



On Sun, 3 Dec 2000, Chris Gray wrote:

 Did a fresh checkout but "python w_pcgi.py" chokes at:
 
 Writing the pcgi resource file (ie cgi script),
 /home/cpgray/zope_cvs_run/Zope2/Zope.cgi
 chmod 0755 /home/cpgray/zope_cvs_run/Zope2/Zope.cgi
 Traceback (innermost last):
   File "w_pcgi.py", line 111, in ?
 if __name__=='__main__': main(sys.argv[0])
   File "w_pcgi.py", line 109, in main
 import wo_pcgi; wo_pcgi.main(me)
   File "/home/cpgray/zope_cvs_run/Zope2/wo_pcgi.py", line 98
 import comcontent.main(home, user, group)
   ^
 SyntaxError: invalid syntax
 
 Cheers and Beers,
 Chris

Works dandy here, neither w_pcgi.py or wo_pcgi.py have been modified in
over a year.  I agree that the code your traceback reports on line 98 is a
syntax error, but it doesn't match what is on line 98 in the CVS.

-Michel



___
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] Wampum generator on Zope 2.2.4 fails / _isBeingUsedAsAMethod

2000-12-03 Thread Steve Spicklemire


Hmm.. I *know* I've seen this before. I think it was when I was trying
to move ZClasses that were *created* under Zope 2.2.0+ to Zope 2.1.x.
Are you sure you're working with 100% 2.2.4?

-steve

 "Brad" == Brad Clements [EMAIL PROTECTED] writes:

Brad Selecting the Security Tab on a Wampum Generator produces
Brad this output:

Brad Error Type: AttributeError Error Value:
Brad _isBeingUsedAsAMethod


Brad Traceback (innermost last): File
Brad /usr/holmes/Zope/lib/python/ZPublisher/Publish.py, line 222,
Brad in publish_module File
Brad /usr/holmes/Zope/lib/python/ZPublisher/Publish.py, line 187,
Brad in publish File
Brad /usr/holmes/Zope/lib/python/Zope/__init__.py, line 221, in
Brad zpublisher_exception_hook (Object: CyberCash) File
Brad /usr/holmes/Zope/lib/python/ZPublisher/Publish.py, line 171,
Brad in publish File
Brad /usr/holmes/Zope/lib/python/ZPublisher/mapply.py, line 160,
Brad in mapply (Object: manage_access) File
Brad /usr/holmes/Zope/lib/python/ZPublisher/Publish.py, line 112,
Brad in call_object (Object: manage_access) File
Brad /usr/holmes/Zope/lib/python/AccessControl/Role.py, line 252,
Brad in manage_access (Object: Traversable) AttributeError: (see
Brad above)


Brad Any ideas?

Brad Brad Clements, [EMAIL PROTECTED] (315)268-1000
Brad http://www.murkworks.com (315)268-9812 Fax netmeeting:
Brad ils://ils.murkworks.com AOL-IM: BKClements

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

2000-12-03 Thread Willem Broekema

As a DTML method is said to work with the properties of the object it
is called at:

DTML method "m":
 dtml-var bobobase_modification_time

root folder of site/m 
 displays the date/time when the last change happened to any file
 in the root folder

root folder/m/m
 displays last change date/time of method m

Why does the method not display it's modification time on the first
occasion? Or: why does it not give the folder's modification time
on the second occasion?

- Willem

___
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] siblings of me, rather than of parent

2000-12-03 Thread Randall Kern



My site has two main classes of objects, Modules 
(and their derivatives), and Categories. A normal setup might look 
something like this:

root
 blab 
(Module)
 weather (Category)
 rain 
(Category)
  sun 
(Category)
 region (Category)

I need to handle URLs like 
/root/blab/weather. The problem is that I need weather.__of__(blab) on the 
stack, rather than weather.__of__(root) on top. This is because blab (in 
some cases) overrides default behaviors from root.

I thought the proper way to do this was by adding a 
__bobo_traverse__ method to my Module, like this:

 def __bobo_traverse__(self, REQUEST, 
name): 
try: 
parents = 
REQUEST['PARENTS'] 
parent = 
parents[-2] 
if hasattr(parent, 
name): 
ob = getattr(parent, 
name) 
if ob.meta_type == 
'Category': 
return ob.aq_inner.__of__(self) 
except: 
pass

 return 
getattr(self, name)

But that doesn't seem to change anything, although 
it does perform the return (and doesn't throw any exceptions.)

Basically, I'm trying to offer my siblings as if 
they were my children, so if they fail to offer something, it will be looked for 
in me, rather than my parent.

Thanks,
-Randy


[Zope] confusing access error

2000-12-03 Thread Matthew Wilbert

I am getting an access error I don't understand at all,
which makes me think I have some basic conceptual problem
which I hope you can help me get past.  I have never used
ZopeFind before, so that may be part of it.

I have a DTML method that looks like this:

dtml-var standard_html_header
dtml-in "ZopeFind(this())"
  dtml-with sequence-item
  /dtml-with
/dtml-in
dtml-var standard_html_footer

I actually want to put something in the dtml-with, and
add some additional parameters to the find, but just trying
to execute the method as written I get the following Zope error.

Zope Error
Zope has encountered an error while publishing this resource.
Unauthorized
 
You are not authorized to access title_or_id.

Traceback (innermost last):
  File C:\PROGRA~1\test\lib\python\ZPublisher\Publish.py, line 222, in publish_module
  File C:\PROGRA~1\test\lib\python\ZPublisher\Publish.py, line 187, in publish
  File C:\PROGRA~1\test\lib\python\ZPublisher\Publish.py, line 171, in publish
  File C:\PROGRA~1\test\lib\python\ZPublisher\mapply.py, line 160, in mapply
(Object: testit)
  File C:\PROGRA~1\test\lib\python\ZPublisher\Publish.py, line 112, in call_object
(Object: testit)
  File C:\PROGRA~1\test\lib\python\OFS\DTMLMethod.py, line 167, in __call__
(Object: testit)
  File C:\PROGRA~1\test\lib\python\DocumentTemplate\DT_String.py, line 502, in __call__
(Object: testit)
  File C:\PROGRA~1\test\lib\python\DocumentTemplate\DT_In.py, line 691, in renderwob
(Object: ZopeFind(this()))
  File C:\PROGRA~1\test\lib\python\DocumentTemplate\DT_With.py, line 132, in render
(Object: sequence-item)
  File C:\PROGRA~1\test\lib\python\OFS\DTMLMethod.py, line 163, in __call__
(Object: addEventToResource)
  File C:\PROGRA~1\test\lib\python\DocumentTemplate\DT_String.py, line 502, in __call__
(Object: addEventToResource)
  File C:\PROGRA~1\test\lib\python\OFS\DTMLMethod.py, line 163, in __call__
(Object: standard_html_header)
  File C:\PROGRA~1\test\lib\python\DocumentTemplate\DT_String.py, line 502, in __call__
(Object: standard_html_header)
  File C:\PROGRA~1\test\lib\python\OFS\DTMLMethod.py, line 189, in validate
(Object: testit)
  File C:\PROGRA~1\test\lib\python\AccessControl\SecurityManager.py, line 139, in 
validate
  File C:\PROGRA~1\test\lib\python\AccessControl\ZopeSecurityPolicy.py, line 209, in 
validate
Unauthorized: (see above)

If I replace the dtml-with sequence-item with 
dtml-with sequence-index or dtml-with sequence-key, I get no error, and if I 
display them I see the right thing.

There is only the root acl_users folder around, and it has only one user set up with 
manage priv's for pretty much everything.  That user can do anything I have tried 
except run this DTML method.  When I try to run the method, I get
prompted several times for a username/password--clearly it doesn't want to accept that 
user's authorization.

If anyone could explain why this is happening, and how I can
make it stop, that would be very helpful.

Thanks very much,

Matt Wilbert
[EMAIL PROTECTED]
___
Visit http://www.visto.com/info, your free web-based communications center.
Visto.com. Life on the Dot.


___
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] dynpersist.dll for ZPatterns

2000-12-03 Thread Ot Ratsaphong

Hi,

I am new to Zope (1 week old) and have installed Zope 2.2.4 on my Win98 PC.

I am interested in learning about the Object-Oriented capabilities of Zope
and am interested in installing ZPatterns. Unfortunately I do not have MSVC
6.0 installed on my PC 8^(. Subsequently I cannot built dynpersist.dll.

I am wondering whether someone could help me out and send me a copy of the
above dll. I have installed Zope 2.2.4 in C:\Zope.

I would much appreciate any assistance in this matter.

Thanks in Advance
Ot Ratsaphong
Canberra, Australia



___
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] newbie question -- database list/report with sort by column header

2000-12-03 Thread John Cappelletti


I am listing the results of a database query using dtml-in. I'd like to
be able to give the user the option to re-sort the list by clicking on a
column header. ok... I'm starting small with a form and radio buttons to
allow the user to specify the sort.

I've created what I believe to be a global variable for this page using
the property screen. The variable is to capture the column name for the
sort. My simple question is how do I assign a value to this variable
inside of the dtml method! I'm not finding a description of variable
assignment in the documentation (yeah, I must be missing the obvious).

Any pointers would be appreciated.  (also, know if anyone has
implemented interactive sort by column header?)

thanks,
John Cappelletti
  AverStar, Inc.
  1593 Spring Hill Road, Suite 700
  Vienna, VA 22182-2249
  Tel: (703) 827-2606 x 4291 (also, 301 443-7509)
  Fax: (703) 827-5560



___
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] Tag attributes...

2000-12-03 Thread Curtis Maloney


Green things,

I've written a handy tag for my Zope site, and it accepts a few attributes.  
This is all going well, and the tag is working nicely. (Even though I 
couldn't seem to find any docs on doing this, I just fumbled about with the 
source from the sendmail tag)

However, it seems there is no way to determine if an attribute is a quoted 
string, or just a variable name, and the only solution is to provide 
different attributes depending on how this information is passed.

Have I missed something, or is there some hidden feature of 'parse_params' 
that I'm missing?

Have a better one,
Curtis Maloney.

___
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 methods and properties

2000-12-03 Thread Chris Gray

On Mon, 4 Dec 2000, Willem Broekema wrote:

 As a DTML method is said to work with the properties of the object it
 is called at:
 
 DTML method "m":
  dtml-var bobobase_modification_time
 
 root folder of site/m 
  displays the date/time when the last change happened to any file
  in the root folder

This _is_ the folder's bobobase_modification_time you're getting. A folder
is largely a container.  Aside from creating or deleting it you can only
change it by changing what it contains.  Changing a folder's properties or
deleting a file it contains also updates it's bbb_mod_time.
 
 root folder/m/m
  displays last change date/time of method m

By calling m/m you've bound m as the client object for the method
m.  dtml-var id will give you m's id, dtml-var title will give you m's
title.  DTML Methods are designed to give you access to the attributes of
the object they are called on.

 Why does the method not display it's modification time on the first
 occasion? Or: why does it not give the folder's modification time
 on the second occasion?

If you make m a DTML Document it will give it's own bbb_mod_time no matter
how you call it.


Cheers,
Chris




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




[Zope] REQUEST.set('n', n+1) broken on zope.org

2000-12-03 Thread Richard Jones

As the subject says, REQUEST.set('n', n+1) is broken on zope.org. The
following DTML will raise an AttributeError on __add__:

dtml-call REQUEST.set('n', 1)
dtml-call REQUEST.set('n', n+1)

Is this a permanent change and is this going into the Zope codebase?


Richard

-- 
Richard Jones
[EMAIL PROTECTED]
Senior Software Developer, Bizar Software
www.bizarsoftware.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 )




Re: [Zope] siblings of me, rather than of parent

2000-12-03 Thread Randall Kern



Sorry, my __bobo_traverse__ method is working, the 
PARENTS stack is exactly as I would hope, with my module as the parent of the 
category, rather than the root.

Here's the whole story:

/
 index_html 
(dtml method)
 index.html 
(dtml method)
 category (Folder)
foo.html 
(dtml method)
 blah 
(Module)
 category 
(Folder)
 
header.html (dtml method)
 weather 
(Category)

/index_html:
 dtml-var 
index.html

/index.html:
 dtml-var 
standard_html_header

 dtml-if expr="meta_type == 
'Category'" !-- true in cases of url like 
/blah/weather --
  dtml-call 
expr="REQUEST.set('splevel', category)"
 /dtml-if

 dtml-with splevel 
mapping
  dtml-var 
header.html
 /dtml-with

 dtml-var 
standard_html_footer


Now, what I hope to happen is that the dtml-with 
would bind to the /blah/category folder, and therefore be able to find 
header.html. However, somehow it's getting the /category folder instead, 
which doesn't have header.html.

Anyone understand why this is 
happening?

Thanks again,
-Randy

  - Original Message - 
  From: 
  Randall Kern 
  
  To: [EMAIL PROTECTED] 
  Sent: Sunday, December 03, 2000 8:08 
  PM
  Subject: [Zope] siblings of me, rather 
  than of parent
  
  My site has two main classes of objects, Modules 
  (and their derivatives), and Categories. A normal setup might look 
  something like this:
  
  root
   blab 
  (Module)
   weather 
(Category)
   rain 
  (Category)
sun 
  (Category)
   region (Category)
  
  I need to handle URLs like 
  /root/blab/weather. The problem is that I need weather.__of__(blab) on 
  the stack, rather than weather.__of__(root) on top. This is because blab 
  (in some cases) overrides default behaviors from root.
  
  I thought the proper way to do this was by adding 
  a __bobo_traverse__ method to my Module, like this:
  
   def __bobo_traverse__(self, REQUEST, 
  name): 
  try: 
  parents = 
  REQUEST['PARENTS'] 
  parent = 
  parents[-2] 
  if hasattr(parent, 
  name): 
  ob = getattr(parent, 
  name) 
  if ob.meta_type == 
  'Category': 
  return ob.aq_inner.__of__(self) 
  except: 
  pass
  
   return 
  getattr(self, name)
  
  But that doesn't seem to change anything, 
  although it does perform the return (and doesn't throw any 
  exceptions.)
  
  Basically, I'm trying to offer my siblings as if 
  they were my children, so if they fail to offer something, it will be looked 
  for in me, rather than my parent.
  
  Thanks,
  -Randy