Re: [Zope] Re: superuser confusion

2000-09-04 Thread Evan Simpson

From: "Chris McDonough" <[EMAIL PROTECTED]>
> On Mon, 4 Sep 2000, Chris Withers wrote:
> > Well, okay, let me rephrase the question:
> > Why is it bad for the bootstrap user to own anything?
> > It used to be considered okay before Zope 2.2, so was has been
> > changed/discovered that makes this now such a bad idea that despite
> > loads of newbie pain and confusion, it's still worth while/necessary?
>
> I've got to say I agree with you here.  I'm still not 100% sure why the
> superuser or bootstrap user can't own anything.

It's due to a combination of the trojan horse issue and the sticky
authentication issue, I think.  You really don't want to be authenticated as
super very often, because while you are, if you visit a page someone else
wrote, they can make your browser do evil things to your site.  This is also
true of Managers, but less so.  Similarly, a page owned by non-super has
tighter permissions than one owned by the super would.

Ideally, people working in a site should be operating with the bare minimum
of privileges to get the job done.  The super should only be called in when
no one else can fix it.

Cheers,

Evan @ digicool & 4-am


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




Re: [Zope] supplemental group ids (Linux)

2000-09-04 Thread Kip Rugger

Chris McDonough  <[EMAIL PROTECTED]> wrote:
>Aplogies for the ignorance, but can you maybe explain the concept
>of supplemental group ids and give an example of how the current unpatched
>behavior could be subverted?

I can try...

Supplemental gids are useful for allowing a user to belong to more
than one group, or maybe to more than one project in normal parlance.
This is normally effected by listing the uid opposite more than one
group in /etc/group.  The login process issues the initgroups(3) call
to install these supplemental groups, which are inherited by all
processes forked from the login shell.

The problem is comes when you change user ids; for example what I
saw with Zope (start -u nobody) was:

 before change   after change
 =   
 user id root   nobody
 group idroot   nobody
 sup id(s)   root   root

Thus the process has group access privilages for nobody (correct) and
root (bad) in unpatched Zope.

I cannot give you an exploit based on this -- my knowledge of Zope
is not deep enough -- and in a bug free world there probably would
be no exploit.  But the reason for running as nobody, I think, is
to contain damage should an exploit be found.  For that reason, it
would seem reasonable to change the supplemental gids too.

I saw this on Linux; supplemental groups come from the BSD tradition,
so you likely will find the same situation on *BSD, Solaris, etc.

___
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] Folder and SQL security

2000-09-04 Thread R. David Murray

On Mon, 4 Sep 2000, George wrote:
> asks for the password even for the viewing. Then I enable 'access the
> content' and the site works as long as I do not try to use sql. When I
> how ever enable 'use sql methods' permission they can access my
> database, delete and add entries to it. What do I have to do to allow

Chris may have pointed you in the right direction, but depending on
the complexity of what you are doing you may also need to learn about
using proxy roles.  This allows you to write a dtml-method that
an anonymous user can call, where the dtml-method can accessed
privileged functions.  Since you control the method code, you
thereby control the security of that access and can limit it
to just what you need to make the site functional.

--RDM


___
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] Render the number of occurrence in a batch

2000-09-04 Thread R. David Murray

On Fri, 1 Sep 2000, Kapil Thangavelu wrote:
> Francois-Regis CHALAOUX wrote:
> > How to render the total number of result coming from the search in a ZCatalog
> > even if the batch will be render in several sequences ?
> > 
> > Howto render  : "Your search contain  results"
> 
> 

Or just

 while inside the dtml-in, say inside
the  block.

--RDM


___
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] Java applet with inner classes causing probs in Zope

2000-09-04 Thread Morten W. Petersen

[Eric L. Walstad]

| Hello all,
| 
| The problem is that inner classes have names like "Parent$Inner.class"
| I'm unable to create a Zope file object with a name that includes the dollar
| sign.  However, the applet won't function without it.
| 
| Has any one overcome this?

Adding files to Zope through FTP doesn't seem to have the same restrictions.

-Morten

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




[Zope] Managed Meeting semi-broken in 2.2.1

2000-09-04 Thread Bill Anderson

It appears that there has been _some_ change in security somewhere. As Manager, I 
cannot add a Managed Meeting object in
a Zope 2.2.1 server.
Nor can someone with the role 'Member', who has been given the neccessary permission. 
It tells me I don't have
uthroization to access 'ManagedMeeting'.

Bill


--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
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] Nevermind? (SQLSession problem...)

2000-09-04 Thread Charlie Wilkinson

In a last, desparate effort I downgraded to SQLSession 0.2.9a and it's
working fine.  Is this normal?

-cw-

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




[Zope] Arrrgh!!! *Weird* SQLSession problem

2000-09-04 Thread Charlie Wilkinson

Ok, all weekend I've been chasing my tail.  Now I scream for help...

I cannot get SQLSession to insert values into the zsession_data table
to save my freeking life.  I'm not getting errors of any kind, just no
inserted session data.  However, the zsessions table shows the sessions
being created, so that table is working ok.  I mangled the SQL syntax for
sqlSetValue, *then* I got a pg. error, so sqlSetValue *is* running, yes?
I installed Logger and logged the values from sqlSetValue to the zope log.
I cut and pasted those values from the log into the test query screen for
sqlSetValues and when I submit the query it inserts just fine.  At that
point I can see the manually inserted values from session_test.dtml, so
sqlGetValues is working.  But if I try to insert values with session_test,
they show up in the very next screen, but are gone thereafter and of
course they do not show up in the database.  I'm really at quite a loss here.

I made sure to give SQLSession its very own ZPyGresQLDA connection.
After beating on that unsuccessfully for awhile, I installed ZPoPyDA,
and set SQLSession to use that, which of course didn't change anything.

Here's the version particulars:

Zope version: Zope 2.1.6 (source release, python 1.5.2, linux2) 
Python version: 1.5.2 (#1, Sep 17 1999, 20:15:36) [GCC egcs-2.91.66 19990314/Linux 
(egcs- 
System Platform: linux-i386 

ZPyGreSQLDA 0.3
ZPoPyDA 0.5.1
PoPy 1.3.2 beta
SQLSession 0.3.0
PostgreSQL 7.0.2

Other installed products (if it matters...):

ZPyGreSQLDA Fortune Calendar Logger Photo ZPatterns Confera LoginManager
SQLSession ZPoPyDA WorldPilot iTrack

Mild rant:

I've got a big, scary, and now behind schedule database-enabled website
to build for a client.  Most everything I've read, and even my earlier,
simpler experiences with Zope have been fantastic.  I've been going
on to my client about how great Zope is, rapid deployment, etc, blah.
So I committed, but after fighting with LM (It took weeks to get it
working once and I have not been able to duplicate that feat since), a
failed upgrade to Zope 2.2 (LM wouldn't work there yet(?), doh!), and now
SQLSession...  I'm *not* having an overall good feeling about all this.
I'm even starting to get thoughts of retreating to Perl or learning PHP3
and never looking back.  But I really want to get over what's probably
mostly newbie learning curve & lack of docs and make this work in Zope.
Please help!!!

-cw-

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




[Zope] Java applet with inner classes causing probs in Zope

2000-09-04 Thread Eric L. Walstad

Hello all,

The problem is that inner classes have names like "Parent$Inner.class"
I'm unable to create a Zope file object with a name that includes the dollar
sign.  However, the applet won't function without it.

Has any one overcome this?

Yes, the applet functions properly when served from apache (but I need to
serve it from Zope).

Please respond directly to me and mailing list as I am not currently on the
mailing list.

Thanks,

Eric.


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




Re: [Zope] newbie question: installing ZSiteMap and ZPhotoAlbum

2000-09-04 Thread Bill Anderson

Tamara Temple wrote:
> 
> Hi all,
> 
> My first posting here, please forgive if this is obvious, cause it
> isn't to me. I already checked the How-To's and searched the zope-list
> archives and came up with nothing.
> 
> I downloaded the two zexp files for ZSiteMap and ZPhotoAlbum, and put
> them in the import directory. When I try to import them, I get an
> error and a traceback saying that "this operation isn't support by
> ZSiteMap" (or ZPhotoAlbum, depending). There are no instructions with
> either one on how to install them. What do I need to do in order for
> these to work?

You have to import products into the Control Panel -> Products folder.


--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
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] Stumped: Python in operator seems to not work

2000-09-04 Thread Andy Dustman

(Please CC: me on responses.)

I have a DTML Method (build_navigation_bar) that is called from
standard_html_header to (surprise) build a navigation
bar. standard_html_header invokes it thusly:



where foo is the top of the tree; standard_html_header can be acquired
further down in the tree. parents is initialized to PARENTS, which is the
list of parents of the original object. build_navigation_bar invokes
itself on Folders that it finds that are among the parents of the original
object. I.e., this is somewhat like a tree, but we only want to expand the
branch we're in. This is done with:




  
  
  


  




Unfortunately, this doesn't work: The conditional is always false. Some of
the debugging output:




Note that in the first line, the expression correctly evaluates to 0,
while the second line incorrectly evaluates to 0. Using  should not, and does not, make a difference. Initializing
parents with a copy of PARENTS (PARENTS[:]) does not make a difference, as
expected. Direct comparisons, i.e.  (or
==) also fail.

What did I overlook, because this seems like it ought to work.

-- 
andy dustman   | programmer/analyst |  comstar.net, inc.
telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d
"Therefore, sweet knights, if you may doubt your strength or courage, 
come no further, for death awaits you all, with nasty, big, pointy teeth!"


___
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] Folder and SQL security

2000-09-04 Thread Chris McDonough

On Tue, 5 Sep 2000, George Osvald wrote:

> My sql works now and security is satisfactory so thank you. The only thing
> that remains in question is that one subfolder. I created a user folder
> inside, set all the security and it does not do what I want. I want to
> restrict any access including viewing for nobody. Only authorised customers
> would be able to view the page. After turning off all the security options
> though I am still able to view the pages as nobody. How do I prevent that?

Do you have "acquire permissions" set on all the permissions of the
folder?  Have you tried turning it off?

This may be a wild goose chase because I'm sort of guessing at your
problem.   Your message has generalizations like "that one subfolder"
(what subfolder?  what are its settings?), "set all the security"
(how?), "does not do what I want" (what do you want?  exactly how
does it fail, can you give a concrete example?) and "the page" (what
page?).  It'd be helpful to define these, because as much as I try, I
can't read minds.  :-)

HTH,

C

> >
> > George wrote:
> > >
> > > Security in ZOPE is very puzzling. If I have certain rules set for the
> > > root folder, can I set something different for the sub folders?
> >
> > Sure... for general security information see both
> > http://www.zope.org/Members/michel/ZB (the Zope book security chapter,
> > mostly finished) and http://www.zope.org/Members/mcdonc/PDG (security
> > chapter mostly finished).
> >
> > > Any
> > > changes seem to have no effect at all.
> >
> > can you be more specific?
> >
> > > I am especially wandering about
> > > setting for anonymous user. I'd like to give them only 'viewing'
> > > privilege but that does not work.
> >
> > How doesn't it work?
> >
> > > The site is not functional at all and
> > > asks for the password even for the viewing. Then I enable 'access the
> > > content' and the site works as long as I do not try to use sql.
> >
> > Yes, "access contents information" is equivalent to allowing the user to
> > list the objects in an object manager.  It's given to anonymous by
> > default most of the time, and is probably required for most operations.
> >
> > > When I
> > > how ever enable 'use sql methods' permission they can access my
> > > database, delete and add entries to it.
> >
> > This should have nothing to do with 'access contents information'.
> > There should be permissions available to restrict the use of sql
> > methods.  Have you seen them?
> >
> > > What do I have to do to allow
> > > anonymous viewers to just view the site
> >
> > Give them "view" and "access contents information" permissions.
> > Depending on the products you've got installed and the operations you
> > want the users to be able to carry out, you may need to give them other
> > permissions.
> >
> > > (keep in mind that I am using a
> > > couple of zsql methods for embedding of data in my html) I also want to
> > > have one of the sub folders not accessible to any one but me.
> > > Can you help anyone?
> > >

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


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




Re: [Zope] Underscore Caracter

2000-09-04 Thread Chris McDonough

Hi Marcus,

This is untested.

Turn "asd asd" into "asd_asd" and output:



Turn "asd_asd" into "asd asd" and output:



On Sun, 3 Sep 2000, Marcus Mendes wrote:
> Hello,
> 
> I need replace 0x20 (space caracter ) to Undescore Caracter. I need also
> a function that UNDO this operation. How can I to do this in DTML
> sintaxe?

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


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




Re: [Zope] supplemental group ids (Linux)

2000-09-04 Thread Chris McDonough

Aplogies for the ignorance, but can you maybe explain the concept
of supplemental group ids and give an example of how the current unpatched
behavior could be subverted?

On 4 Sep 2000 [EMAIL PROTECTED] wrote:

> I noticed when starting Zope as root (to get privilaged ports),
> but requesting suid to `nobody' (start -u nobody) the resulting
> processes have the correct uid and gid, but the supplemental
> group id list still has the appropriate value for root.  This
> means that the Zope process could, for example, write to files
> that may belong to root.
> 
> It's not clear whether this deserves a bug report, so I though
> I'd ask here instead.
> 
> 
> The fix is easy (and very lightly tested):
> 
> 1) grab and install the supplemental gid package (for python)
>http://www.ccraig.org/software/group.c
> 
> 2) patch (for 2.2.0)
> 
> --- z2.py.origFri Jun 30 10:23:53 2000
> +++ z2.py Mon Sep  4 14:33:51 2000
> @@ -682,13 +682,20 @@
>  if type(UID) == type(""):
>  uid = pwd.getpwnam(UID)[2]
>  gid = pwd.getpwnam(UID)[3]
> +uname = UID
>  elif type(UID) == type(1):
>  uid = pwd.getpwuid(UID)[2]
>  gid = pwd.getpwuid(UID)[3]
> +uname = pwd.getpwuid(UID)[1]
>  else:
>  raise KeyError 
>  try:
>  if gid is not None:
> +try:
> +import group
> +group.initgroups(uname, gid)
> +except:
> +pass
>  try:
>  os.setgid(gid)
>  except OSError:
> 
> 
> ___
> 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 )
> 

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


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




[Zope] newbie question: installing ZSiteMap and ZPhotoAlbum

2000-09-04 Thread Tamara Temple

Hi all,

My first posting here, please forgive if this is obvious, cause it
isn't to me. I already checked the How-To's and searched the zope-list
archives and came up with nothing.

I downloaded the two zexp files for ZSiteMap and ZPhotoAlbum, and put
them in the import directory. When I try to import them, I get an
error and a traceback saying that "this operation isn't support by
ZSiteMap" (or ZPhotoAlbum, depending). There are no instructions with
either one on how to install them. What do I need to do in order for
these to work?

This newbie thanks you in advance.

--
  Tamara Temple <^)~
  [EMAIL PROTECTED]
  
Perhaps loving something is the only starting place there is for
making your life your own. -- Alice Koller



___
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] Fourth Posting, is this really that difficult or have Ibeen blackballed :)balled :)

2000-09-04 Thread Chris McDonough


One thing to remember about using __init__ to add subobjects:  during
__init__, you don't have access to any acquired objects.  This is probably
the main rationale for manage_afterAdd, and is the reason manage_afterAdd
is so useful.  There are a lot of dependencies on acquisition even in the
Zope core, so when things fail during your __init__ method, suspect
acquisition dependence.

On Sun, 3 Sep 2000, Kapil Thangavelu wrote:

> Daniel Rusch wrote:
> > 
> > not sure what you mean by "subobject adding in your __init__ method"
> 
> 
> python prod
> 
> def manage_addfooclass():
> 
>   x= fooclass()
>   id = 1
>   self._setObject(id, x)
> 
> 
> def fooclass:
> 
>   def __init__():
> 
>   >>> add subobjects here
> 
> 
> seems like you were adding subobjects to your class in your
> manage_addfoo when it probably would have been better to add them in
> your __init__ method
> 
> 
> 
> > Dan
> > 
> > Kapil Thangavelu wrote:
> > 
> > > btw daniel,
> > >
> > > i've looked at some your postings for the day and i thought i should
> > > tell you that most of your problems would go away if you did subobject
> > > adding in your __init__ method within your class or in the hook method
> > > manage_afterAdd within your class. for future reference. You'd get all
> > > the benefits of inheritance. Let manage_add to do just that, instantiate
> > > and set a instance of your class.
> > >
> > > Kapil
> > >
> > > Kapil Thangavelu wrote:
> > > >
> > > > Daniel wrote
> > > >
> > > > > I've created a folderish product. When I select that product from the
> > > > > available objects list, thus creating an instance of that product, I can
> > > > >
> > > > > create objects like dtml document and dtml method in the new folderish
> > > > > object (very similar to what happens when you instantiate a folder
> > > > > object, you can have a dtml method created in the new folder).
> > > > >
> > > > > The question is why can't I create objects from the Products directory,
> > > > > such as Local File System?
> > > > >
> > > > > The code below works great, I get a dtml document, two folders each with
> > > > >
> > > > > a dtml method in them
> > > > > HOW CAN I CREATE A LOCAL FILE SYSTEM OR ANY OTHER OBJECT FROM THE
> > > > > PRODUCTS DIRECTORY IN THIS MANAGE_ADD FUNCTION???
> > > > >
> > > > > def manage_addSimpleSite(self, id, title='',
> > > > >  createNewFolder=0,
> > > > >  createEditFolder=0,
> > > > >  REQUEST=None):
> > > > > """Add a new SimpleSite object with id *id*.
> > > > >
> > > > > If the 'createNewFolder' and 'createEditFolder' parameters are set
> > > > > to any true
> > > > > value, an 'New sub Folder' and an 'edit sub Folder' objects are
> > > > > created respectively
> > > > > in the new SimpleSite.
> > > > > """
> > > > > ob=SimpleSite()
> > > > > ob.id=id
> > > > > ob.title=title
> > > > > self._setObject(id, ob)
> > > > > try: user=REQUEST['AUTHENTICATED_USER']
> > > > > except: user=None
> > > > > ob.manage_addDTMLDocument(id='index_html', title='')
> > > > > if createNewFolder:
> > > > > if (user is not None) and not (
> > > > > user.has_permission('Add User SimpleSites', self)):
> > > > > raise 'Unauthorized', (
> > > > >   'You are not authorized to add User SimpleSites.'
> > > > >   )
> > > > > ob.manage_addFolder(id='New'+id, title='', createPublic=1)
> > > > > if createEditFolder:
> > > > > if (user is not None) and not (
> > > > > user.has_permission('Add Documents, Images, and Files',
> > > > > self)):
> > > > > raise 'Unauthorized', (
> > > > >   'You are not authorized to add DTML Documents.'
> > > > >   )
> > > > > ob.manage_addFolder(id='Edit'+id, title='', createPublic=1)
> > > > > if REQUEST is not None:
> > > > > return self.manage_main(self, REQUEST, update_menu=1)
> > > > >
> > > >
> > > > a couple of things.
> > > >
> > > > A. you're not being blackballed. when you're posting to the list its
> > > > hard to help without specifics. you're posting above, would be better
> > > > with a traceback of code that does attempt to instantiate a product.
> > > > which leads to
> > > >
> > > > B. how are you attempting to instantiate your other products. example
> > > > code of what you're trying to do would be helpful. are you doing it the
> > > > same as adding folders like above... i have no idea...
> > > >
> > > > C. seems like you're doing this in python. the code below should work
> > > > fine.
> > > >
> > > > from Products import LocalFS
> > > >
> > > > in manage_add:
> > > >
> > > > id = 'foo'
> > > > ob2 = LocalFS.LocalFS(id) # check the exact calls to __init__ in
> > > > LocalFS
> > > > id2 = 'foo2'
> > > >
> > > > ob = yourproduct(id2)
> > > > ob._set

Re: [Zope] doesn't? Please fix... ;-)

2000-09-04 Thread Andrew Kenneth Milton

+---[ Kip Rugger ]--
|
| [snip]
| 
| 
| crap
| more crap
| 
| Lots of crap
| 
| 
| 
| by analogy with the common practice of #if 0 in C

Won't work, the container will still be parsed for correctness at 'save' time.
The problem isn't getting nested comments per se, we already have that. 
The problem is to completely ignore the contents of the comment tag whilst
still allowing nested comments.

Th second part of the problem is that ChrisW(hinger) really wants it, but,
doesn't want to do what is necessary to do it. So the problem is simplified
to not actually doing anything except talking about doing it. d8)

Thankyou for playing d8)

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

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




Re: [Zope] Regaining lost privileges

2000-09-04 Thread Andrew Kenneth Milton

+---[ Dieter Maurer ]--
| Andrew Kenneth Milton writes:
|  > Is there anyway to regain 'root' privs from inside a zope product?
|  > 
|  > Using the -u flag to start causes the privs to be permanently gone because
|  > z2.py uses setuid + setgid (and python doesn't seem to define sete[ug]id, at
|  > least not on my system).
|  > 
|  > Other than running zope as root permanently (which I really would like to
|  > avoid), does anyone have any quick ideas on how to achieve this?
| The same trick could be used by any process to gain root privileges
| 
| It is easy to implement a Python wrapper for the
| sete[ug]id.

I'm happy to write the wrapper, and also modify the Z2.py script to
only use seteuid if explicitly requested on the command line.

There's not much point in really doing so if there's only two people
who want to use it :-)

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

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




Re: [Zope] .

2000-09-04 Thread Bill Anderson

Matthew Burleigh wrote:
> 
> --
> - Matthew Burleigh
> - Systems Administrator, Digital Creations - publishers of Zope.
> - (888)344-4332 -- http://www.digicool.com - http://www.zope.org


Well said (subject = Zope .) ;)

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

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

2000-09-04 Thread Matthew Burleigh

-- 
- Matthew Burleigh
- Systems Administrator, Digital Creations - publishers of Zope.
- (888)344-4332 -- http://www.digicool.com - http://www.zope.org

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




Re: [Zope] How to access id and title of document calling standard_html_header

2000-09-04 Thread Tim Hicks


- Original Message -
From: "Dieter Maurer" <[EMAIL PROTECTED]>
To: "Tim Hicks" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, September 04, 2000 7:48 PM
Subject: Re: [Zope] How to access id and title of document calling
standard_html_header


> Tim Hicks writes:
>  > I have a standard_html_header that is inserted into Zclasses.
These
>  > Zclasses have properties including meta_author ...
>  > In standard_html_header, I use code such as  ...
>  > This works fine and the properties of
>  > the *zclass* are inserted.  However, if I put  into
the
>  > standard_html_header, I get the id of standard_html_header, *not*
of
>  > the zclass.
> When I do this, I get the id of the Z class instance.
> It should be impossible to get the id of the *standard_html_header*,
> if this header is a DTML *method* (rather than document) as you
> told us in a different message.
>
> Because we see different things, we need to describe carefully,
> what we do. Apparently, we do not do the same.
>
> I have a folder-like ZClass, say ZC, and an instance of this class,
say ZI.
> ZC has a method, say M, using "standard_html_header".
> "standard_html_header" is a DMTL method (!) rendering "id".
> When I open "ZI/M", "standard_html_header" renders "ZI", i.e.
> ZI's id.
>
> The same happens, if "standard_html_header" is not in ZI but
> a ZC method.
>
>
> Now, it is your turn to describe precisely, what you are doing.
>

OK, I think that I am perhaps misusing zclasses then.  Here is what I
have.

I have a Folder that was created by using the 'Add new item' menu
within Zope.  This folder is called 'Site'.

I have a Zclass called 'theatre_class' that has "Base classes ZObject,
_ZClass_for_CatalogAware, _ZClass_for_DTMLDocument".  I have set the
zclass to have the following properties by creating a
'theatre_class_property' property sheet for it:
head_title
meta_author
meta_description
... amongst others.

Within the Folder 'Site', I have standard_html_header dtml-method that
is an edited version of the default one that is found in the root
folder of a Zope instance (if that is the right term).  This
standard_html_header uses things code such as this:




When I use the standard_html_header in an instance of a zclass, the
appropriate property of the zclass is indeed inserted into it.  See
below.

Zclass instance has code such as:



This is an instance of my Theatre Zclass



However, if I try to put  into the standard_html_header,
I get nothing, and if I use , I get
'standard_html_header' inserted into the document.

I hope I have made it clear what I am doing.  It is certainly becoming
clear to me that I have got the wrong end of the stick a little with
this.

Thanks for your help.

tim

>
> 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] supplemental group ids (Linux)

2000-09-04 Thread Kip Rugger

I noticed when starting Zope as root (to get privilaged ports),
but requesting suid to `nobody' (start -u nobody) the resulting
processes have the correct uid and gid, but the supplemental
group id list still has the appropriate value for root.  This
means that the Zope process could, for example, write to files
that may belong to root.

It's not clear whether this deserves a bug report, so I though
I'd ask here instead.


The fix is easy (and very lightly tested):

1) grab and install the supplemental gid package (for python)
   http://www.ccraig.org/software/group.c

2) patch (for 2.2.0)

--- z2.py.orig  Fri Jun 30 10:23:53 2000
+++ z2.py   Mon Sep  4 14:33:51 2000
@@ -682,13 +682,20 @@
 if type(UID) == type(""):
 uid = pwd.getpwnam(UID)[2]
 gid = pwd.getpwnam(UID)[3]
+uname = UID
 elif type(UID) == type(1):
 uid = pwd.getpwuid(UID)[2]
 gid = pwd.getpwuid(UID)[3]
+uname = pwd.getpwuid(UID)[1]
 else:
 raise KeyError 
 try:
 if gid is not None:
+try:
+import group
+group.initgroups(uname, gid)
+except:
+pass
 try:
 os.setgid(gid)
 except OSError:


___
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: superuser confusion

2000-09-04 Thread Chris McDonough

On Mon, 4 Sep 2000, Chris Withers wrote:

> > Well, I think the real problem is that the account that you use to
> > "bootstrap" Zope is named "superuser".  If it was named something else
> > like "bootstrapuser" or "fixupuser" or something, I doubt you'd wonder why
> > it couldn't own anything.
> 
> Well, okay, let me rephrase the question:
> Why is it bad for the bootstrap user to own anything?
> It used to be considered okay before Zope 2.2, so was has been
> changed/discovered that makes this now such a bad idea that despite
> loads of newbie pain and confusion, it's still worth while/necessary?

I've got to say I agree with you here.  I'm still not 100% sure why the
superuser or bootstrap user can't own anything.  The argument for
protecting the user against himself by making this so is something I had a
rough time rationalizing in that document.  I suppose there's the argument
for having a meaningful audit trail when things go wrong (instead of
superuser hosing your site, it'd be "chrism").  But this is also a
rationalization.  I guess the ultimate answer is "shrug."

I'm certainly not even going to think of trying to tear apart the code
that makes it that way (nevermind the flamefest it would cause). Rather,
to ameliorate the situation, Zope should prompt the installer to define a
separate management user at setup.

> 
> > > Come to thing of it, is there a concise description anywhere of what the
> > > new rules are WRT to ownership, the logged in user and how 'code' of all
> > > the various types is executed?
> > 
> > What isn't covered in that document that you'd like to know?
> 
> Urm, again, no offence ('cos I think the book is aimed at a different
> audience) but the keyword for me was 'concise'. I did have a look at the
> document above, but didn't read it 'cos it looked about 10 pages long
> :-(
> 
> I'm looking for something closer to 10 _lines_ long, but that may not be
> possible ;-)

No.  But the document is divided into sections, and one of those sections
regards ownership.

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


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




Re: [Zope] If-Modified-Since problem again?!

2000-09-04 Thread Dieter Maurer

Chris Withers writes:
 > Dieter Maurer wrote:
 > > By the way, Zope should cope with rounding problems
 > > for the "If-Modified-Since" headers.
 > 
 > AFAIK, Brian Lloyd fixed this with a pretty generalised try...except in
 > Image.py
 > If stuff is still getting through, we should narrow it down further...
No traceback, because no exception.

I speak of a true rounding problem:

the image is modified at "x" (expressed in seconds)
Zope sends "x" converted to a date/time string as "Last-Modified"
Zope receives the date/time string back as "If-Modified-Since".
Zope converts it to a "long", say y.

*BUT* y is not x, it is "x-1".

Of cause, this does not happen for all modification times. But there
are not too few of 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] Images slow rendering problem

2000-09-04 Thread Dieter Maurer

Pierre-Julien Grizel writes:
 > I already posted this message several monthes ago, expecting a new Zope
 > version would fix the problem, but...
 > 
 > 
 > I have some images on my pages (let's say 10 - not a lot), rendered
 > either by dtml-var or a manual  tag.
 > When I render the page on some of my LAN boxes (especially with IE),
 > some images doesn't load at the first time. I need to reload the page to
 > make them appear. When I monkeyly hit the 'F5' key, some images do not
 > show again. Argl. Anoying
 > 
 > The problem is worst ever through Internet.
I, myself, have seen a very similar problem -- with Netscape 4.5.1
under Solaris 2.7.

I tried to analyse it, but failed.
I can say, that is was *not* the Netscape image bug
(Netscape sends If-Modified-Since headers with two year digits). 
Inside Zope's "OFS.Image.File.index_html" everything looks fine.


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] How to access id and title of document calling standard_html_header

2000-09-04 Thread Dieter Maurer

Tim Hicks writes:
 > I have a standard_html_header that is inserted into Zclasses.  These
 > Zclasses have properties including meta_author ...
 > In standard_html_header, I use code such as  ...
 > This works fine and the properties of
 > the *zclass* are inserted.  However, if I put  into the
 > standard_html_header, I get the id of standard_html_header, *not* of
 > the zclass.
When I do this, I get the id of the Z class instance.
It should be impossible to get the id of the *standard_html_header*,
if this header is a DTML *method* (rather than document) as you
told us in a different message.

Because we see different things, we need to describe carefully,
what we do. Apparently, we do not do the same.

I have a folder-like ZClass, say ZC, and an instance of this class, say ZI.
ZC has a method, say M, using "standard_html_header".
"standard_html_header" is a DMTL method (!) rendering "id".
When I open "ZI/M", "standard_html_header" renders "ZI", i.e.
ZI's id.

The same happens, if "standard_html_header" is not in ZI but
a ZC method.


Now, it is your turn to describe precisely, what you are doing.


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] Migrating passwords from Apache to Zope?

2000-09-04 Thread Dieter Maurer

Marcin Kasperski writes:
 > Is it possible to smoothly migrate accounts and passwords from Apache to
 > Zope? 
 > 
 > More details: I keep Apache accounts in some file of the format
 > 
 > username:encoded_password
 > 
 > where username is plaintext username and encoded_password is the
 > password encoded in the normal Unix way (via crypt function)
There is a GUF (Generic User Folder) HowTo that explains
how to use encryted passwords in the same way as you do.

After you have set up GUF (very good explanation in the HowTo),
all you need to do is place your "username,password" pairs
into the database.
A small Python script can be used for this. It probably would
use the DB Api to control the database.


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] Way to list vocabulary words specific to a page?

2000-09-04 Thread Dieter Maurer

Kevin Smith writes:
 > I am interested in showing the vocabulary words indexed for the page being viewed, 
 >to be used as meta keyword data.
 > 
 > Is this possible?
Zope does not manage vocabulary words on a page basis.
Therefore, you cannot simply ask: "give me the words for this given
page".

With some effort, you can emulate ZCatalogs word splitting:

  given an object, "o", and an attribute, "a", to be indexed,
  ZCatalog first determines "o"s "a" value:

val= getattr(o,a)
if callable(val): val= val()

  The resulting string is then fed to a C implemented module
  called "Splitter" which splits the text into a sequence
  of words.

  It is this sequence, you are interested in.


You will probably need to write an external method.
You will find the relevant code in "SearchIndex.UnTextIndex".



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] How does one rename document ids?

2000-09-04 Thread Sean Kelley

Hi,
I have a number of dtml documents without the form "name_html".  I would like to 
rename everything in a particular folder
to name_html from name.  Is there a way to do this?

Thanks



___
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] Not like ASP complaint - any good answers

2000-09-04 Thread Bill Anderson

Sean McGrath wrote:
> 
> All,
> 
> I have had a number of e-mails from developers
> using Microsoft ASP in recent days. The paraphrased consensus
> in the e-mails is that the external
> methods/python methods approach to mixing markup
> with code in Zope is more clunky than in ASP where
> you can intermingle the two at will.
> 
> Has anyone written anything on this topic I could
> point them to?

asp+ (the next version of asp) will be following Zope's lead of template style setups, 
seperating code from content. I
don't have the release handy, but I saw it last week or so.

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
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] domains (acl_users) and access via proxy

2000-09-04 Thread Didier Georgieff

Hello,

Our users are acessing to the Zope server thru corporate 
(ministers) proxys.

I can't get the "domains" working, while trying (agriculture.gouv.fr, 
gouv.fr, fr) even with simple one.
I'm suspecting some changes in the REQUEST made by the 
corporate proxys.

Is there any doc about what REQUEST variable is used in the 
"domains" restriction ? (I have a HTTP_FORWARDED with the 
*proxy* name (unfortunately without the .gouv.fr). I can't find 
anything on the site and the list either.

Thanks in advance.


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




[Zope] Squishdot/Swishdot RFCs

2000-09-04 Thread Chris Withers

Hi,

I've just posted a set of articles relating to the future of Squishdot
and Swishdot on http://www.squishdot.org which I'd really like to get
lots of feedback on.

Could anyone interested please pop along and comment?

cheers,

Chris

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




Re: [Zope] doesn't? Please fix... ;-)

2000-09-04 Thread Kip Rugger

In article <[EMAIL PROTECTED]>,
Andrew Kenneth Milton  <[EMAIL PROTECTED]> wrote:
[snip]
>It's wrong :-)
>
>
>crap
>more crap
>
>Lots of crap
>
>
>
>In order to parse that fragment, you need to parse the blocks in case you
>find another opening block, so that you can recursively process comments.
>
[snip]


crap
more crap

Lots of crap



by analogy with the common practice of #if 0 in C

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




Re: [Zope] Non-blocking MailHost

2000-09-04 Thread Loren Stafford

One way to start an asynchronous job in Zope is with the Xron product.
Instead of sending the email, you create a Xron scheduled method to perform
that task. If you specify a trigger time of "now" (or any time in the past),
the scheduled method will execute (almost) immediately in a separate Zope
thread. Or you could specify a later time for all emails, thereby
effectively batching them. You can store as much context as you need in the
acquisition path or properties of  the scheduled method. Anything written to
STDOUT by the scheduled method will be stored in the log file, so you can
easily log any problems with sendmail.

http://www.zope.org/Members/lstaffor/Xron

-- HTH
-- Loren



- Original Message -
From: "Richard Taylor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: September 04, 2000 08:11 AM
Subject: Re: [Zope] Non-blocking MailHost


> I think what people have in mind (correct me if I am wrong) is
> something that will accept messages (for posting to the mailhost at
> some time in the future) and then immediately return. I guess it would
spawn
> another process/thread to do the posting asynchronously.
>
> The problem, as I see it is how to handle an error with the
> posting. The user who submitted the mail is now long gone so it must
> be left to an administrator to pick up the pieces.
>
> Perhaps the posting routine could accept a user (developer) provided
> exception handler that gets called if a posting fails.
>
> It maybe better to just hand this off to a completely separate program
> rather than try to handle it within a zope thread.
>
> Richard
>
> [EMAIL PROTECTED] writes:
>
> > Chris,
> >
> > Out of curiosity, what exactly is a non-blocking MailHost?
> >
> > On Mon, Sep 04, 2000 at 09:31:15AM +0100, Chris Withers wrote:
> > >
> > > What we really want is a non-blocking MailHost.
> > >
> > > Anyone know how or want to write one?
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>
>


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




Re: [Zope] Regaining lost privileges

2000-09-04 Thread Dieter Maurer

Andrew Kenneth Milton writes:
 > Is there anyway to regain 'root' privs from inside a zope product?
 > 
 > Using the -u flag to start causes the privs to be permanently gone because
 > z2.py uses setuid + setgid (and python doesn't seem to define sete[ug]id, at
 > least not on my system).
 > 
 > Other than running zope as root permanently (which I really would like to
 > avoid), does anyone have any quick ideas on how to achieve this?
The same trick could be used by any process to gain root privileges

It is easy to implement a Python wrapper for the
sete[ug]id.


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] Catalog AND Zieve

2000-09-04 Thread Steve Spicklemire


Hi Jean-Francios,

You need to give Zieve a list of objects that have the attributes that
you want to sort on defined. You can ether build a list of 'real
results' from the ZCatalog that can then be passed to your Zieve, or
you can just make sure the ZCatalog's 'meta_data_table' has all the
attributes you might want to sort on. I haven't been following all the
changes, but I think that the newer '' may now support
dynamic sorting... I'm sure I saw some patches about this... I don't
know off hand if they've been incorporated into Zope-2.2.1, but I'll
check... 

-steve

> "Menard" == Menard Jean-Francois <[EMAIL PROTECTED]> writes:

Menard> I'm trying to use the Zieve product with my Catalog to
Menard> sort the results on a variable key.  Since the Catalog do
Menard> not return the actual objects, how can I use Zieve with
Menard> it?

Menard> Maybe an external method returning the object list?
Menard> If so, how shold I do that?

Menard> Jean-François Ménard Intranet DPAS Pratiques d'affaires et
Menard> orientations * (514) 840-3000 poste 3939 * (514) 840-5585
Menard> * [EMAIL PROTECTED] * 855 Ste-Catherine
Menard> est, 6e étage Montréal, Qué. H2L 4P5


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





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




Re: [Zope] Non-blocking MailHost

2000-09-04 Thread Richard Taylor




I think what people have in mind (correct me if I am wrong) is
something that will accept messages (for posting to the mailhost at
some time in the future) and then immediately return. I guess it would spawn
another process/thread to do the posting asynchronously.

The problem, as I see it is how to handle an error with the
posting. The user who submitted the mail is now long gone so it must
be left to an administrator to pick up the pieces.

Perhaps the posting routine could accept a user (developer) provided
exception handler that gets called if a posting fails.

It maybe better to just hand this off to a completely separate program
rather than try to handle it within a zope thread.

Richard 

[EMAIL PROTECTED] writes:

> Chris,
> 
> Out of curiosity, what exactly is a non-blocking MailHost?
> 
> On Mon, Sep 04, 2000 at 09:31:15AM +0100, Chris Withers wrote:
> > 
> > What we really want is a non-blocking MailHost.
> > 
> > Anyone know how or want to write one?

___
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] Underscore Caracter

2000-09-04 Thread Marcus Mendes

Hello,

I need replace 0x20 (space caracter ) to Undescore Caracter. I need also
a function that UNDO this operation. How can I to do this in DTML
sintaxe?

Thanks.

Marcus Mendes



___
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] doesn't? Please fix... ;-)

2000-09-04 Thread Doug Hellmann

I missed the beginning of this thread, so I'm not sure if this will
help.

I've attached a patch file which will add a DTML-commentline tag.  This
is different from the standard DTML-comment in that it does not require
an end tag.  Here's an example of its use:







This segment prints the 'title_or_id' for the current method, and does
not execute the loop.  Obviously the DTML-in syntax isn't correct, but
that's part of how the commentline tag works.  It eats up everything in
its own <> markers, and allows the DTML parser to ignore it.  It *does
not* go all the way to the end of the input line, as the name might
imply.

Doug


Chris Withers wrote:
> 
> Andrew Kenneth Milton wrote:
> > | What's wrong with that?
> >
> > It's wrong :-)
> >
> > 
> > crap
> > more crap
> > 
> > Lots of crap
> > 
> > 
> >
> > In order to parse that fragment, you need to parse the blocks in case you
> > find another opening block, so that you can recursively process comments.
> 
> Yeah, fair point...
> 
> > | > It doesn't look difficult to provide what you want, but, I'm not motivated
> > | > enough to fix it either at this stage. d8)
> > |
> > | Aww... go on, you know you want to really ;-)
> >
> > Now you know the problem domain, it shouldn't be hard for you to create
> > a cut-down equivalent of the DT_String parser that only parses comment blocks.
> 
> You obviously have a better understanding of DT_String than me and so
> would be much better suited to the task ;-)
> 
> Good luck, we're all rootin' for ya :P
> 
> Chris
> 
> PS:
> > Take you less time than writing these emails I'm sure d;)
> Er... no!
> 
> ___
> 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 )

Index: DT_String.py
===
RCS file: /cvs-repository/Zope2/lib/python/DocumentTemplate/DT_String.py,v
retrieving revision 1.38
diff -r1.38 DT_String.py
91c91
< from DT_Var import Var, Call, Comment
---
> from DT_Var import Var, Call, CommentLine, Comment
143a144
> 'commentline': CommentLine,
Index: DT_Var.py
===
RCS file: /cvs-repository/Zope2/lib/python/DocumentTemplate/DT_Var.py,v
retrieving revision 1.36
diff -r1.36 DT_Var.py
448c448
< class Comment:
---
> class CommentLine:
462,463c462
< name='comment'
< blockContinuations=()
---
> name='commentline'
470a470,473
> 
> class Comment(CommentLine):
> name='comment'
> blockContinuations=()



[Zope] (no subject)

2000-09-04 Thread neeloy_saha

Hi all,

I am getting the following error when i try to install the portal toolkit
with the ' experimental login manager support'.
I am using the zpatterns version : ZPatterns-0-4-1snap1and demo portal :
0.8.2 and other products. If I create the portal with no initail member then
i am able to have a portal with login manager support. But then after I have
installed the portal I am unable to add a member. ??

Can i have a working snapshot of the portal toolkit with the login manager
for  a windows version or probably a direction as to how to go abt fixing
the above problem??

-neeloy


=
Error Type: NameError
Error Value: client
File C:\Program Files\WebSite\lib\python\Products\ZPatterns\DataSkins.py,
line 377, in _v_currentSheets (Object: wqeqw) NameError: (see above) 

=
Traceback (innermost last): File
C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 222, in
publish_module 
File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 187, in
publish 
File C:\PROGRA~1\WebSite\lib\python\Zope\__init__.py, line 221, in
zpublisher_exception_hook (Object: RoleManager) 
File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 171, in
publish File 
C:\PROGRA~1\WebSite\lib\python\ZPublisher\mapply.py, line 160, in mapply
(Object: Portal_add) File 
C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 112, in
call_object (Object: Portal_add) 
File C:\PROGRA~1\WebSite\lib\python\OFS\DTMLMethod.py, line 167, in __call__
(Object: Portal_add) 
File C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_String.py, line 502,
in __call__ (Object: Portal_add) 
File C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_With.py, line 146,
in render (Object: Portal.createInObjectManager(REQUEST['id'], REQUEST))
File C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_Util.py, line 337,
in eval (Object: apply_wizard(REQUEST)) (Info: REQUEST) File , line
0, in ? 
File C:\Program Files\WebSite\lib\python\Products\PTKDemo\Portal.py, line
261, in apply_wizard (Object: DemoPortalBase) 
File C:\Program
Files\WebSite\lib\python\Products\Membership\PersistentUserSource.py, line
63, in setMemberProperties (Object: wqeqw) File
C:\PROGRA~1\WebSite\lib\python\OFS\PropertySheets.py, line 607, in
__getitem__ (Object: Traversable) 
File C:\Program
Files\WebSite\lib\python\Products\ZPatterns\PropertySheets.py, line 11, in
__propsets__ (Object: Traversable) 
File C:\Program Files\WebSite\lib\python\Products\ZPatterns\DataSkins.py,
line 377, in _v_currentSheets (Object: wqeqw) NameError: (see above) 


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




Re: [Zope] Non-blocking MailHost

2000-09-04 Thread Chris Withers

[EMAIL PROTECTED] wrote:
> Out of curiosity, what exactly is a non-blocking MailHost?

One that doesn't hold up the process that is rendering the page...

cheers,

Chris

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




Re: [Zope] Non-blocking MailHost

2000-09-04 Thread andres

Chris,

Out of curiosity, what exactly is a non-blocking MailHost?

On Mon, Sep 04, 2000 at 09:31:15AM +0100, Chris Withers wrote:
> 
> What we really want is a non-blocking MailHost.
> 
> Anyone know how or want to write one?

--
Andres Corrada-Emmanuel   Email: [EMAIL PROTECTED]
--

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




Re: [Zope] Images slow rendering problem

2000-09-04 Thread andres

What IE browser are you using? What version of Zope? A similar sort of problem
was once traced to a Y2K problem with IE but the new versions of Zope
(>2.1.6) should be able to handle the problem gracefully now.

On Mon, Sep 04, 2000 at 10:13:33AM +0200, Pierre-Julien Grizel wrote:
> Hi,
> 
> I already posted this message several monthes ago, expecting a new Zope
> version would fix the problem, but...
> 
> 
> I have some images on my pages (let's say 10 - not a lot), rendered
> either by dtml-var or a manual  tag.
> When I render the page on some of my LAN boxes (especially with IE),
> some images doesn't load at the first time. I need to reload the page to
> make them appear. When I monkeyly hit the 'F5' key, some images do not
> show again. Argl. Anoying
> 
> The problem is worst ever through Internet.
> 
> 
> 
> 
> Any clues ? Is it a Zope images rendering problem ?
> 

--
Andres Corrada-Emmanuel   Email: [EMAIL PROTECTED]
--

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




[Zope] Maybe 2.1.6 problem?

2000-09-04 Thread Chris Withers

Pierre-Julien Grizel wrote:
> I've got the problem with Zope 2.1.6 on a FreeBSD box.
> In fact, IE AND NS are affected (all versions, 3, 4, 5...), while NS
> less frequently than IE (???).

Can you try Zope 2.2?
 
Also, I posted a few times about this recently, there are some patches
mentioned in there which you could try, although if they help, I'd be a
bit worried about the processing of the 'if-modified-since' header that
Zope is doing :-(

Anyway, let us know if either of the above helps,

Chris

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




Re: [Zope] Images slow nor not rendering?

2000-09-04 Thread Pierre-Julien Grizel

Chris Withers wrote:
> 
> Pierre-Julien Grizel wrote:
> > I have some images on my pages (let's say 10 - not a lot), rendered
> > either by dtml-var or a manual  tag.
> > When I render the page on some of my LAN boxes (especially with IE),
> > some images doesn't load at the first time. I need to reload the page to
> > make them appear. When I monkeyly hit the 'F5' key, some images do not
> > show again. Argl. Anoying
> 
> What version of Zope are you using?
> What version(s) of what browser(s) are you using?
> 
> cheers,
> 
> Chris


Hi,

I've got the problem with Zope 2.1.6 on a FreeBSD box.
In fact, IE AND NS are affected (all versions, 3, 4, 5...), while NS
less frequently than IE (???).


Many thanks,


P.-J.

___
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] doesn't? Please fix... ;-)

2000-09-04 Thread Chris Withers

Andrew Kenneth Milton wrote:
> | What's wrong with that?
> 
> It's wrong :-)
> 
> 
> crap
> more crap
> 
> Lots of crap
> 
> 
> 
> In order to parse that fragment, you need to parse the blocks in case you
> find another opening block, so that you can recursively process comments.

Yeah, fair point...

> | > It doesn't look difficult to provide what you want, but, I'm not motivated
> | > enough to fix it either at this stage. d8)
> |
> | Aww... go on, you know you want to really ;-)
> 
> Now you know the problem domain, it shouldn't be hard for you to create
> a cut-down equivalent of the DT_String parser that only parses comment blocks.

You obviously have a better understanding of DT_String than me and so
would be much better suited to the task ;-)

Good luck, we're all rootin' for ya :P

Chris

PS:
> Take you less time than writing these emails I'm sure d;)
Er... no!

___
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] doesn't? Please fix... ;-)

2000-09-04 Thread Andrew Kenneth Milton

+---[ Chris Withers ]--
| Andrew Kenneth Milton wrote:
| > But then you'd have to parse the contents to find out if the comments are
| > properly nested...
| 
| Well, the parsing should be pretty simple:
| 1. find 
| 2. search for 

Or 

| 3. if found:
|   ignore that block of text
|else if end of text reached:
|   bitch like hell ;-)
| 
| What's wrong with that?

It's wrong :-)


crap
more crap

Lots of crap



In order to parse that fragment, you need to parse the blocks in case you
find another opening block, so that you can recursively process comments.

| > I've looked at this briefly today, and the code inside DT_String.py is
| > recursively ugly... d;)
| 
| You do surprise me ;-)
| 
| > It doesn't look difficult to provide what you want, but, I'm not motivated
| > enough to fix it either at this stage. d8)
| 
| Aww... go on, you know you want to really ;-)

Now you know the problem domain, it shouldn't be hard for you to create
a cut-down equivalent of the DT_String parser that only parses comment blocks.

Take you less time than writing these emails I'm sure d;)

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

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




Re: [Zope] Images slow nor not rendering?

2000-09-04 Thread Chris Withers

Pierre-Julien Grizel wrote:
> I have some images on my pages (let's say 10 - not a lot), rendered
> either by dtml-var or a manual  tag.
> When I render the page on some of my LAN boxes (especially with IE),
> some images doesn't load at the first time. I need to reload the page to
> make them appear. When I monkeyly hit the 'F5' key, some images do not
> show again. Argl. Anoying

What version of Zope are you using?
What version(s) of what browser(s) are you using?

cheers,

Chris

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




Re: [Zope] Zope.org Mirroring

2000-09-04 Thread Chris Withers

Erik Enge wrote:
> It might not be interesting, but what I would really like is a
> complete mirror of documentation and products up and running all the
> time.  That could be done statically, even without Zope if it sucks
> that much.  (Although, I can't see why it would in such a situation.)

You misunderstand how Zoep sucks ;-)

The problem is making the mirror. I've seen quite a few postings
describing how the common mirroring tools don't do a very good job of
mirroring Zope sites, because of things like that BASE tag abomination
and the confusion about what objects a file-system like 'folders' and
what objects aren't.

Anyone knwo of a tool that _does_ mirror Zope well?

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] 2.1.6 Image problem again?

2000-09-04 Thread Chris Withers

"Felipe E. Barousse Boué" wrote:
> 
> Has anyone seen the following behavior:
> 
> I am using PCGI with Zope 2.1.6 and Apache 1.3.9. Everything works fine
> except when reloading the same page, the graphics in it are not
> "painted" by the client browser.

Try the patch in the following:
http://classic.zope.org:8080/Collector/1388/view

> Nevertheless, the graphic is never rendered.  Weirdly this happens on IE
> 5.0, Netscape 4.75 and StarOffice 5.2. All browsers do have at least 5
> MB of disk cache and 3 MB of memory cache. This confirms the problem
> lies on Apache itself. Am I right?

That said, if that patch stops this happening for these browsers, then I
think Zope has a problem that needs fixing.
Can you try Zope 2.2.1 in the same situation and see if you still get
the same problems?

cheers,

Chris

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




Re: [Zope] Fourth Posting, is this really that difficult or have I been blackballed :)balled :)

2000-09-04 Thread Kapil Thangavelu

Daniel Rusch wrote:
> 
> not sure what you mean by "subobject adding in your __init__ method"


python prod

def manage_addfooclass():

x= fooclass()
id = 1
self._setObject(id, x)


def fooclass:

def __init__():

>>> add subobjects here


seems like you were adding subobjects to your class in your
manage_addfoo when it probably would have been better to add them in
your __init__ method



> Dan
> 
> Kapil Thangavelu wrote:
> 
> > btw daniel,
> >
> > i've looked at some your postings for the day and i thought i should
> > tell you that most of your problems would go away if you did subobject
> > adding in your __init__ method within your class or in the hook method
> > manage_afterAdd within your class. for future reference. You'd get all
> > the benefits of inheritance. Let manage_add to do just that, instantiate
> > and set a instance of your class.
> >
> > Kapil
> >
> > Kapil Thangavelu wrote:
> > >
> > > Daniel wrote
> > >
> > > > I've created a folderish product. When I select that product from the
> > > > available objects list, thus creating an instance of that product, I can
> > > >
> > > > create objects like dtml document and dtml method in the new folderish
> > > > object (very similar to what happens when you instantiate a folder
> > > > object, you can have a dtml method created in the new folder).
> > > >
> > > > The question is why can't I create objects from the Products directory,
> > > > such as Local File System?
> > > >
> > > > The code below works great, I get a dtml document, two folders each with
> > > >
> > > > a dtml method in them
> > > > HOW CAN I CREATE A LOCAL FILE SYSTEM OR ANY OTHER OBJECT FROM THE
> > > > PRODUCTS DIRECTORY IN THIS MANAGE_ADD FUNCTION???
> > > >
> > > > def manage_addSimpleSite(self, id, title='',
> > > >  createNewFolder=0,
> > > >  createEditFolder=0,
> > > >  REQUEST=None):
> > > > """Add a new SimpleSite object with id *id*.
> > > >
> > > > If the 'createNewFolder' and 'createEditFolder' parameters are set
> > > > to any true
> > > > value, an 'New sub Folder' and an 'edit sub Folder' objects are
> > > > created respectively
> > > > in the new SimpleSite.
> > > > """
> > > > ob=SimpleSite()
> > > > ob.id=id
> > > > ob.title=title
> > > > self._setObject(id, ob)
> > > > try: user=REQUEST['AUTHENTICATED_USER']
> > > > except: user=None
> > > > ob.manage_addDTMLDocument(id='index_html', title='')
> > > > if createNewFolder:
> > > > if (user is not None) and not (
> > > > user.has_permission('Add User SimpleSites', self)):
> > > > raise 'Unauthorized', (
> > > >   'You are not authorized to add User SimpleSites.'
> > > >   )
> > > > ob.manage_addFolder(id='New'+id, title='', createPublic=1)
> > > > if createEditFolder:
> > > > if (user is not None) and not (
> > > > user.has_permission('Add Documents, Images, and Files',
> > > > self)):
> > > > raise 'Unauthorized', (
> > > >   'You are not authorized to add DTML Documents.'
> > > >   )
> > > > ob.manage_addFolder(id='Edit'+id, title='', createPublic=1)
> > > > if REQUEST is not None:
> > > > return self.manage_main(self, REQUEST, update_menu=1)
> > > >
> > >
> > > a couple of things.
> > >
> > > A. you're not being blackballed. when you're posting to the list its
> > > hard to help without specifics. you're posting above, would be better
> > > with a traceback of code that does attempt to instantiate a product.
> > > which leads to
> > >
> > > B. how are you attempting to instantiate your other products. example
> > > code of what you're trying to do would be helpful. are you doing it the
> > > same as adding folders like above... i have no idea...
> > >
> > > C. seems like you're doing this in python. the code below should work
> > > fine.
> > >
> > > from Products import LocalFS
> > >
> > > in manage_add:
> > >
> > > id = 'foo'
> > > ob2 = LocalFS.LocalFS(id) # check the exact calls to __init__ in
> > > LocalFS
> > > id2 = 'foo2'
> > >
> > > ob = yourproduct(id2)
> > > ob._setObject(id , ob2)
> > >
> > > in  __init__ or manage_afterAdd
> > >
> > > id ='foo'
> > > ob = LocalFS.LocalFS(id)
> > > self._setObject(id, ob)
> > >
> > > ___
> > > 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 p

[Zope] Tree problems in standard_html_header?

2000-09-04 Thread Chris Withers

Marcus Schopen wrote:
> I would also like to put my global navigation method in the standard header, so each 
>document can use it.
> But I get a strange behaviour (see http://marcus.localguru.de:8080/b3/ )

That wasn't responding...

Could you describe the behaviour or any errors you're getting?

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] ZSQL, crashing & reliability...

2000-09-04 Thread Chris Withers

"Leichtman, David J" wrote:
> We are running Zope 2.2.0 on Solaris, and we're running it through Apache +
> SSL. We're using a PostgreSQL DB with the ZPoPyDA. We are also using

> Previously, when we were accessing ZServer directly, Zope would
> spontaneously quit. No reason, it would just die. Restarting it would bring
> it back up, but minutes, sometimes hours, sometimes days later, it would
> spontaneously die again. I asked the list, but no one had had such problems
> (except Dieter, but that was an Oracle problem).

I'd guess something ZSQL-related is the problem. IMHO, Zope's working
with SQL are/were significantly less reliable than any other part of
Zope. I'm just hoping someone wil tell me I'm talkign crap, and back it
up with evidence ;-)

> So now that we're running it through Apache, we're still, apparently, having
> the same problem. What will happen is that every once in a while (more
> frequently with more traffic), Zope will hang indefinitely. The only way to
> get over it is to restart Zope. So apparently, the ZServer (which I guess
> takes requests from the pcgi process), is still going down as before.

That soudns about right...

> The question is, why is this happeneing? Or, more to the point, how can I
> figure out why it is happeneing?

Does anyone know of a how-to or two that answers this problem?
I'd love to read them...

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] Missing pictures: what's the error?

2000-09-04 Thread Chris Withers

William JOYE wrote:
> I use Apache and Zope 2.1.6 under Linux. In the Apache log, I have notified
> that http code is always 304 but when pictures are missing in web page the
> transferred size is '-' and no '0'.

If possible, try the system with Zope 2.2.

Otherwise, checkout my recent reply to Dieter and also:
http://classic.zope.org:8080/Collector/1388/view

Hope they help,

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] 2.1.6 will be your problem...

2000-09-04 Thread Chris Withers

"T.J. Mannos" wrote:
> Yes, I have, and I spent hours tearing apart my site thinking I'd seriously
> screwed-up when suddenly all my images refused to load.  But that was just
> on my Solaris 2.6 server.  PCs and even Macs render my pages beautifully.
> It's just Netscape Communicator for Solaris that causes a problem.  I don't
> have a clue.

Yup, this is 'the Netscape with Images problem' :-(

> At work: Zope 2.1.6, Sparc Solaris 2.7, Linux Netscape 4.51
> 
>   Sometimes, images are not shown by Netscape (broken image).
>   No "simple" reload is able to change this, however a "forced" reload
>   lets Netscape show the image correctly.
>   From then on, the image is always shown correctly: by "simple" reload,
>   "forced" reload or directly (served from cache).
> 
>   The strange thing, inside "Image.index_html" the failing
>   "simple" reload and the succeeding "forced" reload look
>   completely identical.
> 
> At home: Zope 2.1.6, Intel Linux 2, Linux Netscape 4.5
> 
>   All images are always shown correctly.
>   However, there is no log entry in "var/Z2.log" for
>   about 50 % of the requests that are answered by
>   a 304 response. It is non-deterministic whether
>   a log entry is written or not.

This does seem a lot like the "If-Modified-Since problem" in 2.1.6
caused by certain versions of Netscape sending crap header information
back to Zope, and zope throwing an exception.

IIRC, 2.2 handles this much better...

Check these bugs and see if any help:
http://classic.zope.org:8080/Collector/1014/view
http://classic.zope.org:8080/Collector/1388/view

And try it with 2.2 to see if it's still broken...

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] Overdue comments on 6-1-Security.stx

2000-09-04 Thread Chris Withers

Chris McDonough wrote:
> 
> > > See (sneak peek) http://www.zope.org/Members/mcdonc/PDG/6-1-Security.stx,
> > > section named "The Superuser".
> >
> > No offence meant, but it doesn't do a very good job of explaining _why_
> > the superuser can't own anything.
> 
> Well, I think the real problem is that the account that you use to
> "bootstrap" Zope is named "superuser".  If it was named something else
> like "bootstrapuser" or "fixupuser" or something, I doubt you'd wonder why
> it couldn't own anything.

Well, okay, let me rephrase the question:
Why is it bad for the bootstrap user to own anything?
It used to be considered okay before Zope 2.2, so was has been
changed/discovered that makes this now such a bad idea that despite
loads of newbie pain and confusion, it's still worth while/necessary?

> > Come to thing of it, is there a concise description anywhere of what the
> > new rules are WRT to ownership, the logged in user and how 'code' of all
> > the various types is executed?
> 
> What isn't covered in that document that you'd like to know?

Urm, again, no offence ('cos I think the book is aimed at a different
audience) but the keyword for me was 'concise'. I did have a look at the
document above, but didn't read it 'cos it looked about 10 pages long
:-(

I'm looking for something closer to 10 _lines_ long, but that may not be
possible ;-)

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] If-Modified-Since problem again?!

2000-09-04 Thread Chris Withers

Dieter Maurer wrote:
> 
> [EMAIL PROTECTED] writes:
>  > To your image in properites add a string property called
>  >
>  > Last-Modified
>  >
>  > with value
>  >
>  > Wed, 15 Mar 2002 19:02:17 GMT
>  >
>  > And your broken image problem will disappear.

What version of Zope is this with?

> However, this avoids browser caching of the images (at
> least until 2002-3-15). I think, disabling the caching
> is not a good thing.

Definitely!

> By the way, Zope should cope with rounding problems
> for the "If-Modified-Since" headers.

AFAIK, Brian Lloyd fixed this with a pretty generalised try...except in
Image.py
If stuff is still getting through, we should narrow it down further...

A traceback for this would go a long way

cheers,

Chris

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




Re: [Zope] Zope + Apache + fastcgi + unix socket ..

2000-09-04 Thread Joachim Schmitz

I tried this on a Redhat 6.1 as far as I remember some time ago, and didn't
succeed. It only worked with a tcp-socket.

On Mon, 4 Sep 2000, Jørgen Skogstad wrote:

> Hi there.. 
> 
> Have any1 of you gotten local unix domain socket style access
> of Zope behind Apache to work? I have not .. and I am running
> this on Solaris. 
> 
> I see that Apache is trying to access the "file" .. and I presume
> the request is passed to fastcgi .. but I never see the request 
> in Z2.log.
> 
> I have fired Zope with socket access .. and configured Fast-
> CgiExternalServer .. etc. for apache.
> 
> Anyone have any information about this? Would apriciate any!
> I have browsed www.zope.org too .. without any success .. ;)
> 
Look in the jun-2000 zope-dev mailinglist archives for zope, apache and
fastcgi.


Mit freundlichen Grüßen

Joachim Schmitz  

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




___
Zope 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: Non-blocking MailHost

2000-09-04 Thread Kapil Thangavelu

Chris Withers wrote:
> 
> Kapil Thangavelu wrote:
> > i was think about this in regard to doing bulk email, the best i could
> > think of was to response.write and than send the email. no real
> > confirmation but the user gets the page and the mail hopefully gets
> > sent. i was planning on doing this from python with either calls to the
> > mailhost or smtplib.
> 
> What we really want is a non-blocking MailHost.
> 
> Anyone know how or want to write one?

first, lets gather some requirements...

probably best done on a fishbowl wikis... any volunteers?:)

what do you mean by non-blocking MailHost, the smtplib.py waits for a
reply to see if it should raise an error, but thats it as far as block
that i see, i pretty much regard that as nonblocking and proper. if
you're looking for send which doesn't check for reply than you could
just hack smtplib but i doubt you'd see any performance benefit.

assuming that smtplib and Mailhost are nonblocking... then the question
becomes how to make it suitable for bulk emails and what are the
requirements?

do you want a mailhost that isn't connected to via a publishing thread?
ie is it a requirement that processing won't affect a zope site and no
response will be sent back to zope for messages processed (although an
xml-rpc callback is possible).

do you want to get respones back for messages you've sent?

if this going to be added as a general zope feature its probably best to
add some sort of mail queue, that can be added to by other zope objects.
this would also avoid the overhead of connecting to the mailserver on
every mail send.

does it need to be multi=platform? (ie no cron, no popen2) if its for
squishdot i guess i can assume the answer to this and my next question
are yes.

are zope/python solutions preferred? i ask because i've been considering
a zope bridge into JServ which has an enterprise capable email system in
James (http://java.apache.org/james/)

a quick stab at portable implementation outside of zope would bundle a
python script to be called by popen2 on Unix or spawnv on Windows that
would read a pickle of email data and send it. course its ugly but it
would work, could even get fancy and do it with an asyncore.

another quick stab, if you assume the existence of xron, you could store
email messages to be sent and a list of addrs to which they should be
sent and xron it to be sent some other time. 

one possible (minor) speed improvement depending on the protocol def and
the various server implementation is to mantain an open socket to the
server as part of the MailHost, or at least maintain for as long as
possible before getting a new connection.

i need to sleep, i'll brainstorm some more in the morning

night

Kapil







> cheers,
> 
> Chris

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




Re: [Zope] Pages Half Rendering, probably fixed in 2.2?

2000-09-04 Thread Chris Withers

Dieter Maurer wrote:
> When I reported the problem, DC immediatedly answered that
> the problem was already fixed in CVS: the threads
> were now synchronized.

That sounds like it...

> Maybe, you should take a 2.2 ZServer and use it with your Zope 2.1.6.
> I do not know, however, whether this will bring up other problems.

Guess I'll just have to wait and see if 2.2 makes it go away...

cheers,

Chris

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




Re: [Zope] yuk...

2000-09-04 Thread Chris Withers

Dieter Maurer wrote:
> Chris Withers writes:
>  > Is is just me or does stuff inside a  get parsed?
> "" must do a bit of parsing:
> 
>   It must at least recognized "".

well, yeah, but that's not what I meant...

>   Maybe, it wants to recognize nested "" (probably not),
>   then it must look at all tags.

that wouldn't be nice ;-(

> Probably, however,  just uses the same parser
> as every other tag and simply discards its content.
> Then, naturally, the content of ""
> must be as syntactically correct as the content of
> e.g. "".

Surely that's a bit inefficient?
I hope the contents don't actually get _executed_ and then discarded
each time as well...

> I would expect: patches welcome.

Yes, indeed :-)

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] doesn't? Please fix... ;-)

2000-09-04 Thread Chris Withers

Andrew Kenneth Milton wrote:
> But then you'd have to parse the contents to find out if the comments are
> properly nested...

Well, the parsing should be pretty simple:
1. find 
2. search for 
3. if found:
ignore that block of text
   else if end of text reached:
bitch like hell ;-)

What's wrong with that?

> I've looked at this briefly today, and the code inside DT_String.py is
> recursively ugly... d;)

You do surprise me ;-)

> It doesn't look difficult to provide what you want, but, I'm not motivated
> enough to fix it either at this stage. d8)

Aww... go on, you know you want to really ;-)

cheers,

Chris

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




Re: [Zope] doesn't but should!

2000-09-04 Thread Chris Withers

Jerry wrote:
> Sure,  is meant for "comments", but every
> programmer needs to disable blocks of code to eliminate
> factors while debugging. We all abuse comment characters for
> this purpose, and it works well enough to get the job done.

Gotta agree with that!!

> But in Zope it goes like so: cut the suspect block, paste it
> into another window (text editor), save the DTML object, test,
> paste back into DTML, etc. This was the last thing a colleague
> saw before he refused to have any more to do with Zope.

Yeah, it is a pain in the arse...

:-(

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] DTML Entity Syntax

2000-09-04 Thread Chris Withers

Stuart Foster wrote:
> 
> Where can I find more information on how this is done. I'm not familiar with
> the dtml. notation?

http://www.zope.org/Members/AlexR/EntitySyntax

cheers,

Chris

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




Re: [Zope] Help with calcualtions in DTML

2000-09-04 Thread Kapil Thangavelu

"Dario Lopez-Kästen" wrote:
> 
> Hello!
> 
> I have the following listing of objects in my folder:
> 
> 
>   
> Name
> Size
> date
>   
> 
>   
> 
>   
> 
> 
>bytes
> 
> 
>   
> 
>   
> 
> 




you might want to grab a copy of the ZQR which goes through most of the
zope's methods and syntax.

http://www.zope.org/Members/ZQR


get size in kbs assuming its an int



this should do the formatting (tested)


3">








the time stuff


  


> It gives me the name of the object, the size in bytes and the modification
> time in GMT.

there is also a way to set this to be local time(your zope that is)
to sleepy to remember or look it up...

try searching the mailing lists... although i'm sure someone will chime
in.

> I need to do the following: express the size in kb, format the output with
> spaces for thousands.

> I also need the date displayed according to my locale (+2 GMT in Sweden) so
> if bobobase_modification_time is 10:48, I need to show it as 8:48, and on
> top of that I also need to take dayligth savings into account.
> 
> How do I do it? The fmt strings are abviously adjusted to US standards, so
> us ISO-people need to hack our own format strings :-).
> 
> I know i could calculate the size in KB myself IF I only knew how to get the
> get_size attribute into a calculation expression (that goes for
> bobobase_modification_time as well, however this returns as string. How do I
> get the date as a date?)

you might want to check out some of the howtos on DTML stuff, although
generally its easier to do complex calculations in a python method.

bobobase_modification_time is a method that returns a date time object,
its just formatted as a string on the page when you render it.

> Any help is appreciated and needed. Thank you.
> 
> /dario
> 
> PS: has anyone been thinking of renaming bobobase_modification_time to
> something shorter and more intuitive, like, say, modification_time?

it gets my vote. 

Cheers

Kapil

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




[Zope] Repost: zzLocale problems

2000-09-04 Thread Danny William Adair

After installing zzLocale I get an "AttributeError" every time I try to add
a ZGadfly Connection:

--
Traceback (innermost last):
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 222, in
publish_module
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 187, in
publish
  File C:\PROGRA~1\WebSite\lib\python\Zope\__init__.py, line 221, in
zpublisher_exception_hook
(Object: Traversable)
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 171, in
publish
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\mapply.py, line 160, in
mapply
(Object: manage_addZGadflyConnectionForm)
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 112, in
call_object
(Object: manage_addZGadflyConnectionForm)
  File C:\PROGRA~1\WebSite\lib\python\Products\ZGadflyDA\__init__.py, line
131, in manage_addZGadflyConnectionForm
(Object: Traversable)
  File C:\Programme\WebSite\lib\python\Products\zzLocale\zzLocale.py, line
119, in __call__
(Object: addConnectionForm)
AttributeError: dft_addConnectionForm
--


Right now I don't have the time to go take a deeper look at this (or isn't
it that deep?), so I tried to DE-install zzLocale, just for now. Well:
Zope(Win2k :-() won't work without it anymore!!!

What I did was remove the product through the product management screen,
then deleting the folder "Locales" in lib/python and the folder "zzLocale"
in lib/python/Products and then restart Zope. Actually just vice versa of
what I did when installing it...


--
2000-08-31T13:35:20 ERROR(200) ZODB Couldn't load state for
'\000\000\000\000\00
0\000\000\006'
Traceback (innermost last):
  File C:\PROGRA~1\WebSite\lib\python\ZODB\Connection.py, line 447, in
setstate
ImportError: No module named zzLocale.zzLocale


Traceback (innermost last):
  File "C:\Programme\WebSite\z2.py", line 554, in ?
exec "import "+MODULE in {}
  File "", line 1, in ?
  File "C:\PROGRA~1\WebSite\lib\python\Zope\__init__.py", line 144, in ?
OFS.Application.initialize(c)
  File "C:\PROGRA~1\WebSite\lib\python\OFS\Application.py", line 317, in
initial
ize
app.Control_Panel.initialize_cache()
  File "C:\PROGRA~1\WebSite\lib\python\ZODB\Connection.py", line 447, in
setstat
e
state = unpickler.load()
ImportError: No module named zzLocale.zzLocale
--

Who can help me with either one of the problems?
(let me deinstall zzLocale or fix the gadfly creation error)

TYVMIA,
Danny


___
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] Announce: Squishdot 0.7.1 now available!

2000-09-04 Thread Chris Withers

Squishdot 0.7.1 is now available from 
http://www.zope.org/Members/chrisw/Squishdot/
http://www.squishdot.org/Download/Squishdot

The following changes were made:

   - Slightly updated roadmap.

   - Fixed bug that prevented deleting postings.

If you run into problems, remember Squishdot has a mailing list at 
eGroups and a bug collector on SourceForge.

The URL for the bug collector is:
https://sourceforge.net/bugs/?group_id=1083

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] Migrating passwords from Apache to Zope?

2000-09-04 Thread Marcin Kasperski

Is it possible to smoothly migrate accounts and passwords from Apache to
Zope? 

More details: I keep Apache accounts in some file of the format

username:encoded_password

where username is plaintext username and encoded_password is the
password encoded in the normal Unix way (via crypt function). I would
like to migrate those accounts to Zope. I do not know the passwords and
I would not like to ask users for them or force them to change the
password.

Is it possible? 

-- Serwis dla programistów, kącik mieszkaniowy: http://www.mk.w.pl
|
| Working overtime sucks the spirit and motivation out of a team.   
| Projects that require overtime to be finished on time will be late no 
| matter what you do.  (Wells)

___
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] PyWinTypes15.dll not found

2000-09-04 Thread tom smith

I had this problem...and the paths reported are a bit spurious if I remember
rightly.

I think I got complaints about Tk/Tcl, then MTS, then something else. The
dialog that popped up is on a remote server, so I had to fix this quickly.

To fix it. I reinstalled python (Don't know if I needed to do this) and
Tcl/TK (part of the same installer). I don't think you need to do this.

Then I copied and pasted the PyWinTypes.dll. Tk80.dll. (Maybe the Msvcrt.dll
too) into to the Zope/lib/Python/ folder. If they're already there, copy
them into your python DLL folder. OK, I admit it, I sprayed them all over
the place, restarted and I've not had any bother since.

This problem *may* be caused by the Tcl install, making a mess of the
registry. I don't think you need Tcl for zope, so next time I won't install
it and see if the same problem happens

hope this helps

tom



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




[Zope] Non-blocking MailHost

2000-09-04 Thread Chris Withers

Kapil Thangavelu wrote:
> i was think about this in regard to doing bulk email, the best i could
> think of was to response.write and than send the email. no real
> confirmation but the user gets the page and the mail hopefully gets
> sent. i was planning on doing this from python with either calls to the
> mailhost or smtplib.

What we really want is a non-blocking MailHost.

Anyone know how or want to write one?

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] Zope + Apache + fastcgi + unix socket ..

2000-09-04 Thread Jørgen Skogstad

Hi there.. 

Have any1 of you gotten local unix domain socket style access
of Zope behind Apache to work? I have not .. and I am running
this on Solaris. 

I see that Apache is trying to access the "file" .. and I presume
the request is passed to fastcgi .. but I never see the request 
in Z2.log.

I have fired Zope with socket access .. and configured Fast-
CgiExternalServer .. etc. for apache.

Anyone have any information about this? Would apriciate any!
I have browsed www.zope.org too .. without any success .. ;)

-- 


Med vennlig hilsen,
Jørgen Skogstad


  /\System Specialist
 \\ \   
\ \\ /  Sun Microsystems AS
   / \/ / / Gjerdrums vei 12  
  / /   \//\N-0486 Oslo, NORWAY  
  \//\   / /  
   / / /\ / Phone:+ 47 22 02 39 00 
/ \\ \  Cellular: + 47 92 41 30 23
 \ \\   Fax:  + 47 22 02 39 99  
  \/EMail:[EMAIL PROTECTED]
Web:  www.sun.no  

BTW; Opinions formed by myself in informal mailings are 
 mine and not of my employer.

___
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] Images slow rendering problem

2000-09-04 Thread Pierre-Julien Grizel

Hi,

I already posted this message several monthes ago, expecting a new Zope
version would fix the problem, but...


I have some images on my pages (let's say 10 - not a lot), rendered
either by dtml-var or a manual  tag.
When I render the page on some of my LAN boxes (especially with IE),
some images doesn't load at the first time. I need to reload the page to
make them appear. When I monkeyly hit the 'F5' key, some images do not
show again. Argl. Anoying

The problem is worst ever through Internet.




Any clues ? Is it a Zope images rendering problem ?



Many thanks,

P.-J.

___
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: File Attachments with Sendmail

2000-09-04 Thread Brendon Grunewald

Dear Luis,

Dieter Mauer was kind enough to assist me with the answer to this question.
The normal Sendmail tag does not accept variables.

You need to install the MIME.py.patch. Once that is done you can include
variables.

Brendon

- Original Message -
From: "Luis Cortes" <[EMAIL PROTECTED]>
To: "Brendon Grunewald" <[EMAIL PROTECTED]>
Cc: "Zope mailing list" <[EMAIL PROTECTED]>
Sent: Monday, 04 September, 2000 10:03
Subject: Re: [Zope] Re: File Attachments with Sendmail


> Great answer, but I have one question:
>
>  disposition=attachment encode=base64>
>
> does not expand the Required_Doc name, do anyone know why??
>
>
>
>
> - Original Message -
> From: "Brendon Grunewald" <[EMAIL PROTECTED]>
> To: "Chris Withers" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Thursday, August 31, 2000 5:12 AM
> Subject: [Zope] Re: File Attachments with Sendmail
>
>
> > Hi Chris,
> >
> > This is what I have in total. I know I am being stupid, but this is
> > frustrating me to hell. Perhaps I should not be doing this at 1AM.
> >
> > The form looks like this:
> > 
> > 
> > 
> > Please provide the following information: 
> > 
> > Email address:
> > 
> > 
> > Document:
> > 
> > Brochure.doc
> > Pricelist.xls
> > Map.pdf
> > 
> > 
> >   VALUE="Reset
> > Form"> 
> > 
> > 
> > -
> >
> > send_webdoc looks like this...
> > ---
> > 
> > 
> > 
> > 
> > 
> > >
> >
> > 
> > To: 
> > From: WebForm <[EMAIL PROTECTED]>
> > Subject: Web Doc Request
> > 
> > Attached is the document you requested: 
> >  > disposition=attachment encode=base64>
> > 
> > 
> > 
> >
> > Form Information Confirmation
> > Thank you the document should be email to you immediately.
> > You should be automatically redirected in a few seconds.
> > 
> > If not
> > Click here.
> > 
> > 
> > --
> >
> > Thanks
> > 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 )
> >
>
>


___
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] PyWinTypes15.dll not found

2000-09-04 Thread Philipp Auersperg


This dll exists in  in the Zope tree in the directories bin and bin\lib\win32.
unfortunately none of these is in the PYTHONPATH.

Remedy:

copy PyWinTypes15.dll into one of the directories where it
searches for ( e.g. in your case C:\programs\ZopeDev\lib\python\Products\LocalFS)

or

change the start.bat so that PythonPath also points to these directories

phil



*** REPLY SEPARATOR  ***

On 04.09.2000 at 08:58 Jean Jordaan wrote:

>Hi Zopers ..
>
>I've installed Zope to start as a service. It seems to work perfectly
>fine, but I notice messages like the following in the eventlog::
>
>2000/09/02 10:25:36Application Popup   Information None
>26 N/A
>JEAN   Application popup: python.exe - Unable To Locate DLL : The
>dynamic
>link library PyWinTypes15.dll could not be found in the specified path
>C:\programs\ZopeDev\lib\python\Products\LocalFS;
>.;
>C:\WINNT\System32; 
>C:\WINNT\system;
>C:\WINNT;
>C:\Perl\bin\;
>C:\WINNT\system32;
>C:\WINNT; 
>C:\WINNT\System32\Wbem;
>C:\Program Files\Network Associates\PGPNT;
>C:\Program Files\Resource Pro Kit\;
>c:\programs\vim\vim57;
>C:\programs\NcFTP;
>c:\cygwin\bin;
>c:\cygwin\usr\bin.  
>
>(I broke the path into separate lines for clarity.) Now, when I
>examine the environment variables thru 
>'Control Panel|System|Advanced|Environment Variables', Zope does not
>feature. I also don't notice anything untoward when I examine the
>registry. The registry entry that starts Zope seems to be::
>
>REGEDIT4
>
>[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\ZopeDev]
>"Type"=dword:0010
>"Start"=dword:0002
>"ErrorControl"=dword:0001
>"ImagePath"="C:\\Programs\\ZopeDev\\bin\\lib\\win32\\PythonService.exe"
>"DisplayName"="Zope (ZopeDev)"
>"ObjectName"="LocalSystem"
>@=""
>
>[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\ZopeDev\Parameters]
>"start"="\"C:\\programs\\ZopeDev\\bin\\python.exe\"
>\"C:\\programs\\ZopeDev\\z2.py\" -S"
>
>[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\ZopeDev\PythonClass]
>@="C:\\programs\\ZopeDev\\ZServer\\ZService.ZServerService"
>
>[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\ZopeDev\Security]
> 
>"Security"=hex:01,00,14,80,a0,00,00,00,ac,00,00,00,14,00,00,00,30,00,00,00,0
>2,\
> 
>00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\
> 
>00,00,02,00,70,00,04,00,00,00,00,00,18,00,fd,01,02,00,01,01,00,00,00,00,00,\
> 
>05,12,00,00,00,4f,00,47,00,00,00,1c,00,ff,01,0f,00,01,02,00,00,00,00,00,05,\
> 
>20,00,00,00,20,02,00,00,4f,00,4e,00,00,00,18,00,8d,01,02,00,01,01,00,00,00,\
> 
>00,00,05,0b,00,00,00,20,02,00,00,00,00,1c,00,fd,01,02,00,01,02,00,00,00,00,\
> 
>00,05,20,00,00,00,23,02,00,00,4f,00,4e,00,01,01,00,00,00,00,00,05,12,00,00,\
>00,01,01,00,00,00,00,00,05,12,00,00,00
>
>(This also occurs as
>[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ZopeDev]
>except that the 'ControlSet001' version has an additional key, 'Enum'::
>
>[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ZopeDev\Enum]
>"0"="Root\\LEGACY_ZOPEDEV\\"
>"Count"=dword:0001
>"NextInstance"=dword:0001
>
>Now for the questions:
>
> - What is the difference between the 'ControlSet002' version and the
>   'ControlSet001' version? 
>
> - How and where does 'LocalFS' get into the path? 
>
> - Why isn't 'C:\programs\ZopeDev\bin\lib\win32\PyWinTypes15.dll'
>   found? 
>
> - What, for that matter, is the difference between *that*
>   PyWinTypes15 and this one:
>   'C:\programs\ZopeDev\bin\PyWinTypes15.dll'?
>
>Any answers sorely appreciated!
>
>Regards, 
>-- 
>Jean Jordaan   --technical writer--
>Mosaic Software--Zope 2.1.6 on WinNT and W2K
>
>___
>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] Help with calcualtions in DTML

2000-09-04 Thread Dario Lopez-Kästen

Hello!

I have the following listing of objects in my folder:


  
Name
Size
date
  

  

  


   bytes


  

  



It gives me the name of the object, the size in bytes and the modification
time in GMT.

I need to do the following: express the size in kb, format the output with
spaces for thousands.

I also need the date displayed according to my locale (+2 GMT in Sweden) so
if bobobase_modification_time is 10:48, I need to show it as 8:48, and on
top of that I also need to take dayligth savings into account.

How do I do it? The fmt strings are abviously adjusted to US standards, so
us ISO-people need to hack our own format strings :-).

I know i could calculate the size in KB myself IF I only knew how to get the
get_size attribute into a calculation expression (that goes for
bobobase_modification_time as well, however this returns as string. How do I
get the date as a date?)

Any help is appreciated and needed. Thank you.

/dario

PS: has anyone been thinking of renaming bobobase_modification_time to
something shorter and more intuitive, like, say, modification_time?

:-))


- 
Dario Lopez-Kästen Systems Developer  Chalmers Univ. of Technology
[EMAIL PROTECTED]  ICQ will yield no hitsIT Systems & Services



___
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: File Attachments with Sendmail

2000-09-04 Thread Chris Withers

Luis Cortes wrote:
> 
> Great answer, but I have one question:
> 
>  disposition=attachment encode=base64>
> 
> does not expand the Required_Doc name, do anyone know why??

Urm... read me previous post in this thread?!

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] Re: File Attachments with Sendmail

2000-09-04 Thread Luis Cortes

Great answer, but I have one question:



does not expand the Required_Doc name, do anyone know why??




- Original Message -
From: "Brendon Grunewald" <[EMAIL PROTECTED]>
To: "Chris Withers" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, August 31, 2000 5:12 AM
Subject: [Zope] Re: File Attachments with Sendmail


> Hi Chris,
>
> This is what I have in total. I know I am being stupid, but this is
> frustrating me to hell. Perhaps I should not be doing this at 1AM.
>
> The form looks like this:
> 
> 
> 
> Please provide the following information: 
> 
> Email address:
> 
> 
> Document:
> 
> Brochure.doc
> Pricelist.xls
> Map.pdf
> 
> 
>   
> 
> 
> -
>
> send_webdoc looks like this...
> ---
> 
> 
> 
> 
> 
> >
>
> 
> To: 
> From: WebForm <[EMAIL PROTECTED]>
> Subject: Web Doc Request
> 
> Attached is the document you requested: 
>  disposition=attachment encode=base64>
> 
> 
> 
>
> Form Information Confirmation
> Thank you the document should be email to you immediately.
> You should be automatically redirected in a few seconds.
> 
> If not
> Click here.
> 
> 
> --
>
> Thanks
> 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 )
>


___
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] The difference between ControlSet 001 and 002 ..

2000-09-04 Thread Jean Jordaan

Answering myself, from the Resource Pro Kit:

..
The  subkeys represent a control set for the system.

The numbered ControlSet00n subkeys, such as ControlSet001 and ControlSet002,
contain control sets that can be used to start and run Windows 2000. Most
systems have two numbered control sets, an original and a backup copy of a
control set that has been used to start the system successfully, but the
system can maintain as many as four control sets. Windows 2000 maintains
backup copies so that you can undo configuration changes that might
otherwise prevent you from starting the system.
..

So that's that, anyway. For the record, the current one in my case
was number 1.

-- 
Jean Jordaan   --technical writer--
Mosaic Software--Zope 2.1.6 on WinNT and W2K

___
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] PyWinTypes15.dll not found

2000-09-04 Thread Jean Jordaan

Hi Zopers ..

I've installed Zope to start as a service. It seems to work perfectly
fine, but I notice messages like the following in the eventlog::

2000/09/02  10:25:36Application Popup   Information None
26  N/A
JEANApplication popup: python.exe - Unable To Locate DLL : The
dynamic
link library PyWinTypes15.dll could not be found in the specified path
C:\programs\ZopeDev\lib\python\Products\LocalFS;
.;
C:\WINNT\System32; 
C:\WINNT\system;
C:\WINNT;
C:\Perl\bin\;
C:\WINNT\system32;
C:\WINNT; 
C:\WINNT\System32\Wbem;
C:\Program Files\Network Associates\PGPNT;
C:\Program Files\Resource Pro Kit\;
c:\programs\vim\vim57;
C:\programs\NcFTP;
c:\cygwin\bin;
c:\cygwin\usr\bin.  

(I broke the path into separate lines for clarity.) Now, when I
examine the environment variables thru 
'Control Panel|System|Advanced|Environment Variables', Zope does not
feature. I also don't notice anything untoward when I examine the
registry. The registry entry that starts Zope seems to be::

REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\ZopeDev]
"Type"=dword:0010
"Start"=dword:0002
"ErrorControl"=dword:0001
"ImagePath"="C:\\Programs\\ZopeDev\\bin\\lib\\win32\\PythonService.exe"
"DisplayName"="Zope (ZopeDev)"
"ObjectName"="LocalSystem"
@=""

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\ZopeDev\Parameters]
"start"="\"C:\\programs\\ZopeDev\\bin\\python.exe\"
\"C:\\programs\\ZopeDev\\z2.py\" -S"

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\ZopeDev\PythonClass]
@="C:\\programs\\ZopeDev\\ZServer\\ZService.ZServerService"

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\ZopeDev\Security]
 
"Security"=hex:01,00,14,80,a0,00,00,00,ac,00,00,00,14,00,00,00,30,00,00,00,0
2,\
 
00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\
 
00,00,02,00,70,00,04,00,00,00,00,00,18,00,fd,01,02,00,01,01,00,00,00,00,00,\
 
05,12,00,00,00,4f,00,47,00,00,00,1c,00,ff,01,0f,00,01,02,00,00,00,00,00,05,\
 
20,00,00,00,20,02,00,00,4f,00,4e,00,00,00,18,00,8d,01,02,00,01,01,00,00,00,\
 
00,00,05,0b,00,00,00,20,02,00,00,00,00,1c,00,fd,01,02,00,01,02,00,00,00,00,\
 
00,05,20,00,00,00,23,02,00,00,4f,00,4e,00,01,01,00,00,00,00,00,05,12,00,00,\
00,01,01,00,00,00,00,00,05,12,00,00,00

(This also occurs as
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ZopeDev]
except that the 'ControlSet001' version has an additional key, 'Enum'::

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ZopeDev\Enum]
"0"="Root\\LEGACY_ZOPEDEV\\"
"Count"=dword:0001
"NextInstance"=dword:0001

Now for the questions:

 - What is the difference between the 'ControlSet002' version and the
   'ControlSet001' version? 

 - How and where does 'LocalFS' get into the path? 

 - Why isn't 'C:\programs\ZopeDev\bin\lib\win32\PyWinTypes15.dll'
   found? 

 - What, for that matter, is the difference between *that*
   PyWinTypes15 and this one:
   'C:\programs\ZopeDev\bin\PyWinTypes15.dll'?

Any answers sorely appreciated!

Regards, 
-- 
Jean Jordaan   --technical writer--
Mosaic Software--Zope 2.1.6 on WinNT and W2K

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