Re: [Zope-dev] New Help System in 2.2

2000-06-07 Thread Itamar Shtull-Trauring

"Dan L. Pierson" wrote:

 You might want to take a look at the bottom of http://www.lfw.org/python/...

He finally released it!  I've been waiting for this since IPC8.

-- 
Itamar S.T.  [EMAIL PROTECTED]   
"It don't get thingier than that!"

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




[Zope-dev] Containers in ZODB

2000-06-07 Thread Petr Knapek

Hi Zopists,
I would like to use ZODB3 as an object DB to store my own objects. At
the beginning, I will make any text UI but later I want to put my
objects into a ZOPE Folder and store them inside ZOPE ZODB (Zope will
serve as GUI). Generaly I have 2 types of objects:

Container - object with some attributes and methods which can collect
other objects (also Containers)
Item - an object with some attributes and methods which can not collect
any other objects but can be contained in Container

My questions are:

1. Does anybody know what the essential Zope classes from which I have
to inherit are? Of course I know the Persistent is essential for both of
them but don't know whether it is sufficient for future import of my own
ZODB as a part of Zope ZODB.

2. Does anybody know how to import my own ZODB (*.fs file) into Zope
   ZODB?

I don't need to have any tabs in the web browser connected with my
objects I only need possibility to store these objects inside Zope and
call their methods. 
Please can anybody react on this it is very important to me, it is my
project and I want to use ZODB. 

WBR, Petr
-- 
Petr Knpek
NEXTRA Czech Republic, s.r.o., Veve 102, 659 10 Brno, Czech Republic
e-mail: mailto:[EMAIL PROTECTED]
tel:+420-5-41 558 394
FAX:+420-5-41 558 390

"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998

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




Re: [Zope-dev] Containers in ZODB

2000-06-07 Thread Itamar Shtull-Trauring

Petr Knapek wrote:

 Container - object with some attributes and methods which can collect
 other objects (also Containers)

For these you should inherit from OFS.ObjectManager.ObjectManager.

 Item - an object with some attributes and methods which can not collect
 any other objects but can be contained in Container

For these you should inherit from OFS.SimpleItem.Item.

All you really need is to inherit from Persistent, if you're making your own
objects, but inheriting from the above will allow you to use them later in
an easier fashion.

-- 
Itamar S.T.  [EMAIL PROTECTED]   
"It don't get thingier than that!"

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




Re: [Zope-dev] LM and user objects

2000-06-07 Thread Dan L. Pierson

Bill Anderson writes:
  "Phillip J. Eby" wrote:
   
   At 04:03 PM 6/6/00 -0600, Bill Anderson wrote:
   
   I am using the deafult UserSource that comes with LM for the moment (one
   step at a time ;)
   
   LM or PTK?
  
  LM
  
  (Waiting for Dan's changes before trying _any_ LM with PTK ;)

I posted the patch about two weeks ago, have you tried it?  I just got 
back from vacation yesterday afternoon.  It looks like Steve Alexander 
tried it and it worked OK (once he tracked down a bug in his manual
patch application that took me about a day to find when I created the
patch -- missing imports whose only references are wrapped in a
try/except can be hard to find :-().

I plan to check this in later today, either directly or on a branch.
Any preferences?

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




[Zope-dev] Request for comments: Directory storage

2000-06-07 Thread Petru Paler

  Hello all,

   You probably saw my yesterday post with the first alpha of
ReiserStorage. One of the questions that people tend to ask about it is
wheter they can use it without reiserfs.
   There are two problems with not using reiserfs:

1. ReiserStorage (now renamed to DirectoryStorage) stores each object in a
separate file and *all* the files in a single directory. This was done in
order to let the filesystem what it was meant to do: store and retrieve
files quickly. While reiserfs is *extremely* good at this (it uses a btree
to store directory entries), most other filesystems do linear searches
when finding a file so performance is very bad when you have many files in
a single directory.
   This problem can be solved by splitting files into multiple directories
when not using reiserfs. This would add a little overhead but it is
tolerable.

2. Waste of space. Typical block-allocation filesystems like ext2 and FAT
will waste alot of space in the usage pattern of DirectoryStorage.
ReiserFS packs small files together in the btree, so it solves the
problem, but I have no ideea how this could be fixed easyly on the other
fs's.

Comments ? Suggestions ?

PS: a new DirectoryStorage release will be done today, with bugfixes and
new features.

-Petru



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




Re: [Zope-dev] Getting to container from a method called by the factory

2000-06-07 Thread Kevin Dangoor

- Original Message -
From: "Itamar Shtull-Trauring" [EMAIL PROTECTED]
To: "Kevin Dangoor" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, June 07, 2000 3:44 AM
Subject: Re: [Zope-dev] Getting to container from a method called by the
factory


 Kevin Dangoor wrote:
  I'm trying to check if the container from which the user selected a
  product from the add menu has an "acl_users" folder. When the user
selects
  the option from the add menu, they get a form. When they submit the
form,
  the method (a PythonMethod) does this:
 
  folder=self.Destination()
  if hasattr(folder, 'acl_users'):
...do something...
  else:
...complain...
 
  Even though I know the folder has an acl_users (and having this function
  return folder.objectIds() proves it), the above code will always
complain.
  Is there a problem with using hasattr in this context?

 Well, first of all, because of acquisition, if there's a acl_users at the
 top level this will always return true.

I didn't think hasattr() used acquisition... I thought hasattr would tell
you if something is within that object itself.

  Next, PythonMethods have trouble
 with hasattr AFAIK - so instead do:

I didn't realize this.


 folder=self.Destination()
 if 'acl_users' in folder.objectIds():
...do something...
 else:
...complain...

Yep. I thought of that one, too. I figured hasattr might be more efficient
in large folders. In this particular context, that little bit of efficiency
is not important and your example would work fine.

Thanks for the tip.

Kevin


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




Re: [Zope-dev] Recursively adding ZClasses (continued)

2000-06-07 Thread Kevin Dangoor

- Original Message -
From: "Rik Hoekstra" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 07, 2000 4:28 AM
Subject: [Zope-dev] Recursively adding ZClasses (continued)


 First I had a problem with nested ZClasses, which got me into trouble
 when I wanted to add ZClasses to each other. So I followed the 'common
 wisdom' of adding all ZClasses at the top level of the product. THis
 generally works OK, and you can add ZClass instances to each other from
 the management interface. So far so good. WHere things go wrong is by
 recursively adding ZClasses, as in:

 the following pseudo code for ParticularZClass with some NestedZClasses
 inside:

 (Particular ZClass constructor has the following action sequence):
 create ParticularZClass instance
 set some properties
 in somelist
set some other properties into REQUEST
create NestedZClass instances
 whatever

 reading and following every piece of documentation I could get on this
 (not much), I never got any further than adding the NestedZClasses
 instances on the _same_ level as the ParticularZClass. No dtml-with
 "manage_addProduct['whatever']" (which contrary to documentation should
 have the containing product and not the ZClass as the 'whatever'
 argument) could help me out.

I'm using nested ZClasses in KM|Net News. Take a look at the AddArticle
method. In KMNN, these ZClasses are set up as nested ZClasses, so that may
change things somewhat. However, it may still work. Rather than doing
manage_addProduct[], you *might* be able to just directly call
ZClass_add(_.None, _), because it could be in your acquisition path at the
top of the product. In KMNN, that's all I had to do, but in that case the
ZClass_add method was located within the ZClass that was to contain it.

That sounded kind of rambling, so I hope it makes sense...

Kevin


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




Re: [Zope-dev] Request for comments: Directory storage

2000-06-07 Thread Jason Spisak

Petru Paler:

This is the embodiment of my MutliFileStorage thingy on Jim's ZODB Wiki.  I
droped it (Never picked it up) when Mountable Storage was announced.  I'll
create a ReierFS partition some time this week and try it out.  Excellent!

   Hello all,
 
You probably saw my yesterday post with the first alpha of
 ReiserStorage. One of the questions that people tend to ask about it is
 wheter they can use it without reiserfs.
There are two problems with not using reiserfs:
 
 1. ReiserStorage (now renamed to DirectoryStorage) stores each object in a
 separate file and *all* the files in a single directory. This was done in
 order to let the filesystem what it was meant to do: store and retrieve
 files quickly. While reiserfs is *extremely* good at this (it uses a btree
 to store directory entries), most other filesystems do linear searches
 when finding a file so performance is very bad when you have many files in
 a single directory.
This problem can be solved by splitting files into multiple directories
 when not using reiserfs. This would add a little overhead but it is
 tolerable.
 
 2. Waste of space. Typical block-allocation filesystems like ext2 and FAT
 will waste alot of space in the usage pattern of DirectoryStorage.
 ReiserFS packs small files together in the btree, so it solves the
 problem, but I have no ideea how this could be fixed easyly on the other
 fs's.
 
 Comments ? Suggestions ?
 
 PS: a new DirectoryStorage release will be done today, with bugfixes and
 new features.
 
 -Petru
 
 
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 


Jason Spisak
CIO
HireTechs.com
6151 West Century Boulevard
Suite 900
Los Angeles, CA 90045
P. 310.665.3444
F. 310.665.3544

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.

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




Re: [Zope-dev] Recursively adding ZClasses (continued)

2000-06-07 Thread Rik Hoekstra

snip

Thanks for replying Kevin, but it won't work ;-( I tried it ALL, and it
_will_not_work_. The nested ZClasses will apparently solve it (I used it
elsewhere), but it will get you into trouble in other situations - if
you want to add an instance of the nested zclass to an existing instance
of that same nested zclass. I had to change my product before because of
that.

 
 I'm using nested ZClasses in KM|Net News. Take a look at the AddArticle
 method. In KMNN, these ZClasses are set up as nested ZClasses, so that may
 change things somewhat. However, it may still work. Rather than doing
 manage_addProduct[], you *might* be able to just directly call
 ZClass_add(_.None, _), because it could be in your acquisition path at the
 top of the product. In KMNN, that's all I had to do, but in that case the
 ZClass_add method was located within the ZClass that was to contain it.
 
 That sounded kind of rambling, so I hope it makes sense...

No matter if you use ZClass_add directly or in  dtml-with. No matter if
you close the first dtml-with and open another. No matter if you
redirect to get out of namespace problems (that will _really_ give
strange errors). Believe me, it was a _very_ frustrating experience (and
I really wanted to refrain from ranting -just couldn't help myself)

thanks again for replying

Rik

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




RE: [Zope-dev] LM and user objects

2000-06-07 Thread Dan L. Pierson

Chip Vanek writes:
  Hi,
  
  I also tried to get the patch working with 2.2CVS PTK CVS and had little luck.
  I also needed to manually apply the patch and worked through the errors until
  I got a security violation with the PTK.  I was no longer in any way able to
  access any of my test portals using the management interface.  I needed to
  back the patch out and get to plain 2.21a and PTK cvs to even get a ZODB
  portal working.

Interesting.  I've been avoiding 2.2 until the new security model gets 
some more bugs worked out.  Unfortunately, this means I'm not
surprised that you had problems...

  With all the problems with the standard PTK way of handling users access, I
  think that the best long term solution is to fully make the leap into the use
  of LoginManager and Racks as the standard mechenism for the PTK.  

We seem to have consensus on this.  Looks like Kevin's taken over the
lead on getting to the next step which is a coherent interface for PTK 
Membership to use to specify how to set up its LoginManager (e.g. how
do I create a Membership instance using a Postgressql based UserSource 
here, and another Membership instance using NT domain logins there).

  I also think
  that the standard authentication algorithm should support user login screens
  before basic auth for those folders that have a login_form in the aquisition
  path.

That would certainly help.

  So my vote is to check your patch into the main stream and harden
  it.

That's three in favor and none opposed so far.  I'll do it after
fighting a higher priority fire this afternoon.

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




Re: [Zope-dev] Recursively adding ZClasses (continued)

2000-06-07 Thread Jason Spisak

Rik Hoekstra writes:

This currently adds recursive ZClasses for me.  All ZClasses are on the top
level of the Product, no nesting:

cut out untested

dtml-with "PermanentJobClass.createInObjectManager(REQUEST['id'],
REQUEST)"
 dtml-call "propertysheets.PermanentJob.manage_editProperties(REQUEST)"
 dtml-call "propertysheets.Job.manage_editProperties(REQUEST)"
 dtml-call "propertysheets.Searchable.manage_editProperties(REQUEST)"
 dtml-with "manage_addProduct['ZGL']"
  dtml-with "ServiceClass.createInObjectManager(_.getitem('unique_id', 1),
REQUEST)"
   dtml-call "propertysheets.Service.manage_changeProperties(REQUEST)"
   dtml-with "manage_addProduct['ZGL']"
dtml-with "ItemClass.createInObjectManager(_.getitem('unique_id', 1),
REQUEST)"
 dtml-call "propertysheets.Item.manage_changeProperties(
price=REQUEST['price'],
description='Placement Fee',
)"
 dtml-with "manage_addProduct['ZGL']"
  dtml-with
"ComponentClass.createInObjectManager(_.getitem('unique_id', 1), REQUEST)"
/dtml-in default_overrides
   /dtml-with
  dtml-call reindex_object
  /dtml-with
 /dtml-with
 dtml-call reindex_object
/dtml-with
   /dtml-with
   dtml-call reindex_object
  /dtml-with
 /dtml-with
 dtml-call reindex_object
/dtml-with
/dtml-with
dtml-call "RESPONSE.redirect(URL1 + '/' + REQUEST['id'])"

/cut out untsted
I cut a few things out that didn't have to do with the recursing, but you
bet the general picture.

All my best,


 snip
 
 Thanks for replying Kevin, but it won't work ;-( I tried it ALL, and it
 _will_not_work_. The nested ZClasses will apparently solve it (I used it
 elsewhere), but it will get you into trouble in other situations - if
 you want to add an instance of the nested zclass to an existing instance
 of that same nested zclass. I had to change my product before because of
 that.
 
  
  I'm using nested ZClasses in KM|Net News. Take a look at the AddArticle
  method. In KMNN, these ZClasses are set up as nested ZClasses, so that may
  change things somewhat. However, it may still work. Rather than doing
  manage_addProduct[], you *might* be able to just directly call
  ZClass_add(_.None, _), because it could be in your acquisition path at the
  top of the product. In KMNN, that's all I had to do, but in that case the
  ZClass_add method was located within the ZClass that was to contain it.
  
  That sounded kind of rambling, so I hope it makes sense...
 
 No matter if you use ZClass_add directly or in  dtml-with. No matter if
 you close the first dtml-with and open another. No matter if you
 redirect to get out of namespace problems (that will _really_ give
 strange errors). Believe me, it was a _very_ frustrating experience (and
 I really wanted to refrain from ranting -just couldn't help myself)
 
 thanks again for replying
 
 Rik
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 


Jason Spisak
CIO
HireTechs.com
6151 West Century Boulevard
Suite 900
Los Angeles, CA 90045
P. 310.665.3444
F. 310.665.3544

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.

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




[Zope] Expression Evaluation Order..

2000-06-07 Thread Andrew Kenneth Milton

I have noticed a buglet in the dtml-var expression evaluation:-


dtml-var "x/y*z"

Is the same as dtml-var "x/(y*z)" this is obviously wrong :-)

so I need to expressly put dtml-var "(x/y)*z"

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

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




Re: [Zope] ZOPE, Xemacs, html-mode, indentation

2000-06-07 Thread jiva

Bob:

You are 100% correct.  I didn't want to write a DTD for dtml (though
this is probably the "right" solution) so instead I went searching for 
other options.  Here's what I found:

If you use hm--html-mode, there's a variable called:
hm--html-tag-name-alist where I added some definitions for
dtml. (basically I just added dtml-in and a multi tag and dtml-var as
a single tag).  Then, I set up xemacs to use hm--html-mode for the
dtml stuff.  To do the indentation with hm--html-mode then, you have
to hilight the area you want indented, then hit TAB.  Problem solved!
And now I have beautifully indented dtml docs!!

If anyone wants a copy of what I put in my .emacs for the
tag-name-alist.  Let me know.

On Mon, Jun 05, 2000 at 06:31:41PM -0700, Bob Finch wrote:
  "jiva" == [EMAIL PROTECTED] [EMAIL PROTECTED] writes:
 
 jiva I am using XEmacs with it's html mode to work on some dtml code.  I
 jiva can get it to switch to html mode easily for the dtml stuff even
 jiva though I'm not naming my files with .html extensions by doing: M-x
 jiva html-mode  Unfortunately, no matter what I do, I can't get it to do
 jiva it's indentation on anything unless it's actually *started* in the
 jiva html-mode (ie: I do a new file with a .html extension)
 
 I just ran into the same problem.  It appears that XEmacs html-mode
 parses the html in the buffer.  If it doesn't parse correctly, the
 indentation stuff doesn't work.  To see this, try editing something
 without any dtml in it -- indentation should work fine.  As soon as
 you add dtml-var standard_html_header at the top, indentation stops
 working. 
 
 I guess the fix is to write a dtml DTD for XEmacs html-mode.  Has
 anyone already done this?
 

-- 
The trouble with a kitten is that
When it grows up, it's always a cat
-- Ogden Nash.

___
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: import-export

2000-06-07 Thread gresham

Ok, after poking around in the code and debug (!) I finally realized that
the ID being passed to manage_exportObject is not the filename, but the id
of the object to export.

So a couple of examples to clarify:
to export a folder from the top level (root), you can do two things:
1. Check the checkbox and click the Export... button near the bottom of the
screen. This will open the import/export form with the id already filled
in. Simply click Export.
2. Click import/export at the top of the screen and type the name of the
Folder (or other object) you wish to export, then click Export.

You should recieve some positive confirmation telling you the filename.
This will create a file called var/ObjectName.zexp (ObjectName being the
name of the folder or object you chose)

So how do I export everything from root? Ok .. this is a real bugger, I
can't believe it's taken me so long to figure it out (I was first checking
file permissions etc).

Answer:
Make sure you are in the root folder and then click the Export... button
near the bottom of the screen. LEAVE THE ID BLANK and click Export.

Again a positive confirmation will appear telling you have just created a
file var/.zexp - of course I don't need to remind you (but I will) that the
.zexp file will be hidden on Unix machines as are all . prefixed files.

I think that is hardly intuitive but doesn't seem to cause too many
problems as I couldn't find any posts about it .. Has this just happened in
a recent release, I know some workings to do with XML Exports were added?? 
The help text on the import/export form reads

"You can export Zope objects to a file in order to transfer them to a
different Zope installation. You can either choose to download the export
file to your local machine, or save it in the "var" directory of your Zope
installation on the server."

I think this is very misleading and recommend changing it.

Regards
Gresh

[EMAIL PROTECTED] writes:

 
 Hi,
 I'm also getting similar problems, that I can no longer export and it is
 giving me AttributeErrors. I think I've scanned every Zope document but
 cannot find any info. I am running Zope from my own user and not from a
 root account and I have also installed WorldPilot (perhaps related to
 this)?
 
 Any ideas ... I'll post more details if I find anything, as this is
 delaying a release
 
 Regards
 Gresh
 
 
 !-
Hi,
 
My Little Problem :
 
I have zope version 2.1.6 running on two servers.
 
I have a folder containing dtml methods and zsqlmethods
 which I want to
import from server A to server B
It doesn't work. It used to work, but not any more. this
 is the error it
throws...
 
 
File
 /usr/local/Zope-2.1.6-linux2-x86/lib/python/OFS/ObjectManager.py, line
484, in manage_importObject
(Object: ElementWithAttributes)
File
 /usr/local/Zope-2.1.6-linux2-x86/lib/python/ZODB/ExportImport.py, line
266, in importFile
ExportError: (see above)
 
Help
 
Regards
Ronnie
 
 

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




Re: [Zope] Passing all POST variables?

2000-06-07 Thread Toby Dickenson

On Fri, 26 May 2000 15:14:56 +0200, Martijn Pieters [EMAIL PROTECTED]
wrote:

 Shame there's no "safe pickle option" that allows only numbers, strings,
 lists, tuples and dictionaries.

There is actually. It's called marshal:

  http://www.python.org/doc/current/lib/module-marshal.html

which supports just that list of types, plus code objects.

Or look at http://www.zope.org/Members/htrd/howto/MiniPickle if you
need:
* Recusive data structures
* Compatability with the next version of python

Toby Dickenson
[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] News tickers

2000-06-07 Thread Timothy Wilson

On Wed, 7 Jun 2000, Oleg Broytmann wrote:

Also I'm looking a Product to import RDF/RSS files - I rememeber seeing
 it somewhere.

Check out RSS Channel and XML Document. You'll find them at zope.org.

-Tim

--
Tim Wilson  | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
W. St. Paul, MN |  | http://slashdot.org/
[EMAIL PROTECTED] |   dtml-var pithy_quote | http://linux.com/


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




Re: [Zope] News tickers

2000-06-07 Thread Olivier Deckmyn

about RSS, the url is :

http://www.xml.com/pub/2000/02/23/zope/index.html

0,02$

- Original Message -
From: "Oleg Broytmann" [EMAIL PROTECTED]
To: "Zope Mailing List" [EMAIL PROTECTED]
Sent: Wednesday, June 07, 2000 10:22 AM
Subject: [Zope] News tickers


 Hello!

I'm looking for News Products (yes, I know KM News :). I need a news
 ticker with the followin features:
-- rubrics in news item - one item can belong to few rubrics (it is
news
   item about both Zope and Python, e.g)
-- one customizeable interface for entering news items in different
   rubrics
-- few different customizeable interfaces for viewing every rubric
-- SQL storage (SQL seems much more natural storage for news items than
   ZODB)
-- export to RDF/RSS

I am not in hurry, I'll write such Product myself if I couldn't find
one
 ready.

Also I'm looking a Product to import RDF/RSS files - I rememeber seeing
 it somewhere.

 Oleg.(All opinions are mine and not of my employer)
 
 Oleg Broytmann  Foundation for Effective Policies
[EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.


 ___
 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] News tickers

2000-06-07 Thread Oleg Broytmann

On Wed, 7 Jun 2000, Olivier Deckmyn wrote:
 about RSS, the url is :
 http://www.xml.com/pub/2000/02/23/zope/index.html

   Thanks! Sure, good article. (Thanks, Amos.)

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
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] Combining a search and uniqueValues..

2000-06-07 Thread Anders Holmbech Nielsen

Hi,

I want to find the unique values from a search.

This first search return (among others) som keywords (emneord) which 
unique values I want get(second search).

dtml-in "artikler.artikel_catalog(artikel_dato=[artikel_dato_fra, 
artikel_dato_til], artikel_dato_usage='range:min:max', raw=fritekst, 
kategorier=kategori_valg, emneord=emneord_valg, 
publikation=publikation_valg)" size=10 start=query_start 
sort=artikel_dato reverse


dtml-in "artikler.artikel_catalog.uniqueValuesFor('emneord')" sort

Is it possible to do this with standard dtml and catalog or should 
dive into some python coding ?
-- 

Regards

-
Anders Holmbech Nielsen | Tlf:  (+45) 70 22 56 00
Software Engineer   | Fax:  (+45) 70 22 57 00
Integrator Uniware A/S  | http:/www.integrator.dk

___
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] manage primitives documentation

2000-06-07 Thread Pierre Rougier

Hi all!

I just have a problem of documentation does anyone know where I can
find the doc about all the manage_something primitives (like
manage_upload(), manage_clone()...)
My problem is that I want to insiantiate an abject from a method, but I
can't find the good primitive.

Thanks for your attention... :^)

Pio.


___
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] stupid question I guess

2000-06-07 Thread josh on

but I can't find the answer...

can I set a local variable in zope on a dtml page
eg

dtml-var variablename = 1

thanks josh on


___
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] stupid question I guess

2000-06-07 Thread Chris Withers

josh on wrote:
 can I set a local variable in zope on a dtml page
 dtml-var variablename = 1

Yup:

dtml-call "REQUEST.set('variablename',1)"

Nice syntax, huh? ;-)

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] stupid question I guess

2000-06-07 Thread Andrew Kenneth Milton

+[ Chris Withers ]-
| josh on wrote:
|  can I set a local variable in zope on a dtml page
|  dtml-var variablename = 1
| 
| Yup:
| 
| dtml-call "REQUEST.set('variablename',1)"
| 
| Nice syntax, huh? ;-)

Tsk tsk, that's global :-)

dtml-let variablename=1
...
...
/dtml-let

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

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




Re: [Zope] stupid question I guess

2000-06-07 Thread Phil Harris

Is it global to the page, or local to the page ?!?!?


- Original Message -
From: "Andrew Kenneth Milton" [EMAIL PROTECTED]
To: "Chris Withers" [EMAIL PROTECTED]
Cc: "josh on" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, June 07, 2000 3:05 PM
Subject: Re: [Zope] stupid question I guess


 +[ Chris Withers ]-
 | josh on wrote:
 |  can I set a local variable in zope on a dtml page
 |  dtml-var variablename = 1
 |
 | Yup:
 |
 | dtml-call "REQUEST.set('variablename',1)"
 |
 | Nice syntax, huh? ;-)

 Tsk tsk, that's global :-)

 dtml-let variablename=1
 ...
 ...
 /dtml-let

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

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


___
Zope 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] FSSession newbie problem

2000-06-07 Thread Marcello Lupo

Hello,
i'm trying to use the FSSession to have a little shopping cart for
e-commerce.

I can initialize the dictionary named "cart" and it is created in the
datafile.
When i try to update it with the data from my form i get the error:

Zope Error

 Zope has encountered an error while publishing this
resource. 

 Error Type: AttributeError
 Error Value: 'None' object has no attribute 'update'


For curiosity i tried the example bundled in README.txt of the FSSEssion
and macically i obtain the same error.
this is the code i used:
dtml-call FSSession
dtml-unless "FSSession.has_key('cart')"
dtml-call "FSSession.set('cart',{})"
/dtml-unless
dtml-comment
#
dtml-var "REQUEST.form"br
dtml-in "REQUEST.form.items()"
dtml-var sequence-item
/dtml-in
This is only to check that the form passes the values correctly

/dtml-comment
dtml-call "FSSession['carrello'].update(REQUEST.form)"

Can anyone help me?
Thanks
ATIS

___
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] www.zope.org cataloging server problem?

2000-06-07 Thread Hung Jung Lu


I have been trying to catalog a "News Item" and a "Product Release" inside 
www.zope.org, but I get the error

===
System Unavailable
This site is currently experiencing technical difficulties. Please contact 
the site administrator for more information. For additional technical 
information, please refer to the HTML source for this page. Thank you for 
your patience.


Error type:  NameError
Error value: getRoles
==
  H2Zope Error/H2
  PZope has encountered an error while publishing this resource.
  /P
  PSTRONGInvalid request/STRONG/P

  The parameter, emsubmit/em, was omitted from the request.pMake sure 
to specify all required parameters, and try the request again.
  HR NOSHADE

  ...

!--
Traceback (innermost last):
  File /usr/local/dc/zope-2.1.x/lib/python/ZPublisher/Publish.py, line 214, 
in publish_module
  File /usr/local/dc/zope-2.1.x/lib/python/ZPublisher/Publish.py, line 179, 
in publish
  File /usr/local/dc/zope-2.1.x/lib/python/Zope/__init__.py, line 202, in 
zpublisher_exception_hook
(Object: HappySession)
  File /usr/local/dc/zope-2.1.x/lib/python/ZPublisher/Publish.py, line 165, 
in publish
  File /disks/slab/dc/zope20-update/lib/python/ZPublisher/mapply.py, line 
155, in mapply
(Object: manageCatalog)
  File /usr/local/dc/zope-2.1.x/lib/python/ZPublisher/Publish.py, line 107, 
in missing_name
  File /disks/slab/dc/zope20-update/lib/python/ZPublisher/HTTPResponse.py, 
line 531, in badRequestError
BadRequest: (see above)

--


regards,

Hung Jung


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


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




Re: [Zope] stupid question I guess

2000-06-07 Thread Tony McDonald

At 12:05 am +1000 8/6/00, Andrew Kenneth Milton wrote:
+[ Chris Withers ]-
| josh on wrote:
|  can I set a local variable in zope on a dtml page
|  dtml-var variablename = 1
|
| Yup:
|
| dtml-call "REQUEST.set('variablename',1)"
|
| Nice syntax, huh? ;-)

Tsk tsk, that's global :-)

dtml-let variablename=1
...
...
/dtml-let

Tsk tsk tsk - it don't work ;)
dtml-let variablename="1"
...
...
/dtml-let

tone..


--
Dr Tony McDonald,  FMCC, Networked Learning Environments Project 
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5888
Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2

___
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 catch URL in DTMLDocuments/Methods

2000-06-07 Thread Evan Simpson

- Original Message -
From: Ian Sparks [EMAIL PROTECTED]
 The conceptual problem I have is that DTMLMethods/Documents don't have a
 parameters tag like SQLMethods do, so I don't see how I can "trap" parts
of
 the URL like SQLMethods do and use them internally in my Method/Document.

There isn't an automatic way to do this; SQLMethods are specially written to
be traversable.  There are three (fairly complex) ways to do this that I can
think of:

1.  Subclass DTMLDocument and mix in the class SQLMethods use for
traversability.  Probably hard.

2.  Use a PythonMethod, and make one of its parameters 'traverse_subpath'.
Then you can traverse through this PythonMethod and use the parameter to do
what you want.  Not bad, but you need to know PythonMethods.

3.  Use a SiteAccess Access Rule on the folder, having it check to see if
the next object to be traversed is your DTMLMethod.  If so (and if the next
name doesn't start with 'manage'!) remove the rest of the traversal path and
store it in a REQUEST variable.  Not too bad, but SiteAccess is fragile (it
doesn't work with Zope 2.2a).

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] FSSession newbie problem

2000-06-07 Thread Pavlos Christoforou

Hi Marcello 

On Wed, 7 Jun 2000, Marcello Lupo wrote:

 and macically i obtain the same error.
 this is the code i used:
 dtml-call FSSession
 dtml-unless "FSSession.has_key('cart')"
 dtml-call "FSSession.set('cart',{})"
 /dtml-unless

 dtml-call "FSSession['carrello'].update(REQUEST.form)"
 

Shouldn't the above be:

dtml-call "FSSession['cart'].update(REQUEST.form)"


Pavlos


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

2000-06-07 Thread CURTIS David

Newbie Question,

I wish to use use the date of a database file in my dynamic html code.  For example, 
this database was last updated on 06/06/2000.  I suppose that there must be a dynamic 
html tag that zope uses.  What could it be?  I looked at all the documentation and 
have yet to discover it.  DTML-ZOPE-FILE-DATE  Any help is apprechiated. 

   
   
   
   
   
   
 

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

2000-06-07 Thread Michael Bernstein

Luciano Ramalho wrote:
 
 [snip]
 The object-relational mapping mechanism WO uses, however, is very advanced and,
 in a basic level, easy to use too. Classes are written in Java by a case-like
 tool and automatically bound to tables. In fact, programmers rarely have any
 contact with SQL: all necessary queries are generated automatically by the IDE
 (which runs only on NT and MacOS X).
 [snip]

As I recall (from a WebObjects demonstartion I sat through a
long time ago), WO creates the most godawful mangled URLs
that I had ever seen. As a result, a WO site cannot be
spidered by search engines, or converted to a static copy
using wget.

HTH,

Michael Bernstein

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

2000-06-07 Thread R. David Murray

On Tue, 6 Jun 2000, Alexandre A. Drummond Barroso wrote:
 We are posting e-mails about it on the list for a while and nobody answered,
 so I must think that nobody on Zope universe is using Oracle 8i (neither NT
 nor Linux Oracle 8i client).

I installed DCOracle for a client using 8i.  The only thing I recall
having to do that wasn't in the instructions was getting a copy of
a Setup file that worked with 8i, which I found posted to one of
the Zope mailing lists.  Other than that the installation was pretty
simple, and the Zope part was completely trivial (install package,
create connector, create ZSQL query, and go...)

This was under Debian Linux.

--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] How to catch URL in DTMLDocuments/Methods

2000-06-07 Thread Chris Withers

Evan Simpson wrote:
 3.  Use a SiteAccess Access Rule on the folder, having it check to see if
 the next object to be traversed is your DTMLMethod.  If so (and if the next
 name doesn't start with 'manage'!) remove the rest of the traversal path and
 store it in a REQUEST variable.  Not too bad, but SiteAccess is fragile (it
 doesn't work with Zope 2.2a).

I was going to implement this as a seperate PathHandler product for Zope
2.2 when the beta comes out.

someone has already sent me their alpha code for 2.1.x but it was
apparently unstable.

cheers,

Chris

PS: Evan is SiteAccess(or its replacement) going to ship as an
'official' product for Zope 2.2?

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

2000-06-07 Thread Chris Withers

Michael Bernstein wrote:
 As I recall (from a WebObjects demonstartion I sat through a
 long time ago), WO creates the most godawful mangled URLs
 that I had ever seen. As a result, a WO site cannot be
 spidered by search engines, or converted to a static copy
 using wget.

Zope's not too hot on this either what with index_html instead of
index.html the problem of "is /something' a 'file' or a 'folder' from
wget's point of view?"

IIRC, it currently would download a zope folder object as a single file
:(

I've also been bitten by this in Wiki's since links aren't generated
with absolute_url and so I sometimes get
/MyWikiFolder/OneWikiPage/AnotherWikiPage which throws up a nasty
__getitem__ exception (particularly in Netscape, which seems to like
appending / onto the end of FrontPage in the URL box...)

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] Searching Catalog for Permissions/Roles

2000-06-07 Thread Jason Spisak

Zopists,

Does anyone know if it's possible to create a search in the ZCatalog
based on permission or role.  

Such as:

Search of the things from the ZCatalog where the current user has the
'View' permission for the text 'smith'.

I love to push the envelope. :)


-- 
Jason Spisak
[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] Newbie Question,

2000-06-07 Thread Chris Withers

CURTIS David wrote:
 I wish to use use the date of a database file in my dynamic html code.  For example, 
this database was last updated on 06/06/2000.  I suppose that there must be a dynamic 
html tag that zope uses.  What could it be?  I looked at all the documentation and 
have yet to discover it.  DTML-ZOPE-FILE-DATE  Any help is apprechiated.

dtml-var bobobase_modification_time

...obviously... :(

This will give you the time your current object was last modified.

Why has this not been renamed to something sensible?
We lost PrincipiaSearchSource a while back, I hope this goes the same
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 )




[Zope] escaping with dtml?

2000-06-07 Thread Riku Voipio

Hello, 
I'm trying to get some doubleqoutes to the final document,
but I've been unsuccesful so far:

dtml-let hack="\"app\" 
ONCHANGE=\'location.href=cookie?app=+this.options[this.selectedIndex].value\'"
/dtml-let

-- 
Riku Voipio
[EMAIL PROTECTED]
09-862 60764


___
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: graphics in subdirs

2000-06-07 Thread Randy Edwards

I'm going to rewrite my web site in dtml and am using the latest stable
Zope.  Well, I should say I'll rewrite it after I get over this infuriating
newbie problem I have. :-)
`
I'm trying to get Zope to display an image from a subdir.  I've whipped up a
simple dtml document called "test".  Test contains this:

dtml-var standard_html_header
h2dtml-var title_or_id/h2
pThis is the dtml-var id Document./p
pNow show a graphic: br
dtml-var logo.jpg
/p
dtml-var standard_html_footer

   That references an image file in the root directory called logo.jpg. 
Everything works, it displays fine.

   However, I want to keep all of my commonly used image files in a
subdirectory called /images.  So I create a folder called "images", upload
another copy of logo.jpg into it, everything's fine.  I change the dtml in
the "test" document to be "dtml-var /images/logo.jpg".  And it doesn't
work, giving me an error message of:

Error Type: KeyError
Error Value: /images/logo.jpg

   Looking through the docs and tutorials I can't find anything on this --
and I know it's mindlessly simple.  Can someone whack me with a clue-bat? 
TIA.

-- 
 Regards,| Debian GNU/ __  o  http://www.debian.org
 .   |/ / _  _  _  _  _ __  __
 Randy   |   / /__  / / / \// //_// \ \/ /
 ([EMAIL PROTECTED]) |  // /_/ /_/\/ /___/  /_/\_\
 http://www.golgotha.net | because lockups should only be for convicts.

___
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] stupid question I guess

2000-06-07 Thread josh on

wow great answer, thanks that has just peeled off another layer of zope
mystery for me.

can this be put in the dynamic faq?

josh on


- Original Message -
From: Tony McDonald [EMAIL PROTECTED]
To: Zope List [EMAIL PROTECTED]
Sent: Wednesday, June 07, 2000 3:17 PM
Subject: Re: [Zope] stupid question I guess


 At 2:55 pm +0100 7/6/00, Chris Withers wrote:
 josh on wrote:
   can I set a local variable in zope on a dtml page
   dtml-var variablename = 1
 
 Yup:
 
 dtml-call "REQUEST.set('variablename',1)"
 
 Nice syntax, huh? ;-)
 
 Chris

 now now :)

 (tested)

 dtml-let variablename="1"
 blah blah blah ... ie the scope of the variable
 dtml-var variablename
 /dtml-let

 don't fall into the trap of doing this
 dtml-let variablename="I am a string"
 blah blah blah ... ie the scope of the variable
 dtml-var variablename
 /dtml-let

 'cos Zope won't let you enter it (it thinks that the 'I' is a
 variable name). Remember that anything in " " is evaluated as a
 Python expression...

 try this instead
 dtml-let variablename="'I am a string'"
 blah blah blah ... ie the scope of the variable
 dtml-var variablename
 /dtml-let

 You can have multiple variables set too...
 dtml-let variablename="'I am a string'" bloot="1"
 blah blah blah ... ie the scope of the variable
 dtml-var variablename :: dtml-var bloot
 /dtml-let

 See lib/python/DocumentTemplate/DT_Let.py for more details...

 hth
 tone


 --
 Dr Tony McDonald,  FMCC, Networked Learning Environments Project
 http://nle.ncl.ac.uk/
 The Medical School, Newcastle University Tel: +44 191 222 5888
 Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2

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




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




Re: [Zope] Newbie question: graphics in subdirs

2000-06-07 Thread Rik Hoekstra

snip
 
However, I want to keep all of my commonly used image files in a
 subdirectory called /images.  So I create a folder called "images", upload
 another copy of logo.jpg into it, everything's fine.  I change the dtml in
 the "test" document to be "dtml-var /images/logo.jpg".  And it doesn't
 work, giving me an error message of:
 
 Error Type: KeyError
 Error Value: /images/logo.jpg
 
Looking through the docs and tutorials I can't find anything on this --
 and I know it's mindlessly simple.  Can someone whack me with a clue-bat?
 TIA.

whack 1. Don't use URL separators in dtml expressions. Use dots 2. You
shouldn't have used dots in the logo.jpg name as it confuses zope, look
below what that gets you ;-):

dtml-var "images._['logo.jpg']"

sorry 'bout that (untested, but should work)

/whack

Rik

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




[Zope] Q: Accessing ZSQL methods from Python

2000-06-07 Thread a . wacknitz

Hi all,

my question is what type or value is returned by a ZSQL method that is
invoked from Python?
Or, more precisely, how can I determine if a field contains a NULL value?
Sample code:

def myZSQLAccessFromPython(self, aParameter):
"""myZSQLAccessFromPython() returns a record set from a database
table."""
#Call the ZSQL method
rs = self.zsqlMethod(parameter=aParameter)
if len(rs) == 1:
#I expect exactly one result column
  if rs[0].field is not NULL:  - How to code this?
rs[0].field == None does not work
Do_some_interesting_work()

TIA,
Andreas

**
This email message has been swept by MIMEsweeper for the presence of
computer viruses.

Francotyp-Postalia AG  Co.


___
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: graphics in subdirs

2000-06-07 Thread Tony McDonald

At 11:35 am -0400 7/6/00, Randy Edwards wrote:
dtml-var standard_html_header
h2dtml-var title_or_id/h2
pThis is the dtml-var id Document./p
pNow show a graphic: br
dtml-var logo.jpg
/p
dtml-var standard_html_footer

That references an image file in the root directory called logo.jpg.
Everything works, it displays fine.

However, I want to keep all of my commonly used image files in a
subdirectory called /images.  So I create a folder called "images", upload
another copy of logo.jpg into it, everything's fine.  I change the dtml in
the "test" document to be "dtml-var /images/logo.jpg".  And it doesn't
work, giving me an error message of:


try
dtml-with images
dtml-var logo.jpg
/dtml-with

It can get complex quickly though - I'm sure I remember something on 
thew Zope list about this, I think it was a word of wisdom from Phil 
Harris...

hth
tone
--
Dr Tony McDonald,  FMCC, Networked Learning Environments Project 
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5888
Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2

___
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: import-export

2000-06-07 Thread R. David Murray

On Wed, 7 Jun 2000 [EMAIL PROTECTED] wrote:
 So how do I export everything from root? Ok .. this is a real bugger, I
 can't believe it's taken me so long to figure it out (I was first checking
 file permissions etc).
 
 Answer:
 Make sure you are in the root folder and then click the Export... button
 near the bottom of the screen. LEAVE THE ID BLANK and click Export.
[...]
 I think that is hardly intuitive but doesn't seem to cause too many
 problems as I couldn't find any posts about it .. Has this just happened in
 a recent release, I know some workings to do with XML Exports were added?? 

Probably because a somewhat more intuitive (but not completely intuitive!)
method for copying the whole Zope tree is to just copy the Data.fs
file.  I know I never noticed the unobvious method for exporting the root
for that reason (that is, I never thought to try to do it).

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




[Zope] R: [Zope] escaping with dtml?

2000-06-07 Thread Marcel Preda


- Original Message -
From: Riku Voipio [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 07, 2000 5:28 PM
Subject: [Zope] escaping with dtml?


 Hello,
 I'm trying to get some doubleqoutes to the final document,
 but I've been unsuccesful so far:

 dtml-let hack="\"app\"
ONCHANGE=\'location.href=cookie?app=+this.options[this.selectedIndex].value\'"
 /dtml-let


Maybe is not the best solution, but works...

dtml-let hack="'%sapp%s
ONCHANGE=\'location.href=cookie?app=+this.options[this.selectedIndex].value\''
%('\x22','\x22')"
dtml-var hack
/dtml-let

Interesting, isn't it?
:)

PM





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




[Zope] What is favicon.ico and why is it an error?

2000-06-07 Thread J. Atwood

I have a few Zope sites email me any error reports and both of the sites
(different machines) get this error about two or three times a day.

Traceback:

Traceback (innermost last):
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 151, in
publish
  File 
/usr/local/zope/lib/python/Products/SiteAccess/ChangeBehaviors.py,line 124,
in traverse
  File /usr/local/zope/lib/python/OFS/Application.py, line 249, in
__bobo_traverse__
(Object: ApplicationDefaultPermissions)
  File /usr/local/zope/lib/python/ZPublisher/HTTPResponse.py, line 511, in
notFoundError

As it looks for this "favicon.ico"

Anyone seen this? It is happening on two different instatallations (2.1.4,
2.1.6) on RH Linux 6.1

Thanks,
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] What is favicon.ico and why is it an error?

2000-06-07 Thread J. Michael Mc Kay

Internet explorer is looking for an favicon.ico or a custom icon file that
customizes your bookmark entry into a users book mark list.  If you get an
icon editor and make a custom icon 16x16, I think, icon then you can put it
in your home directory and when someone bookmarks the site they will see
your cute little icon in their bookmarks.
Now that you have done this, you have to put it in every directory
accessible to IE to prevent excessive logging of errors on your server.

- Original Message -
From: "J. Atwood" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, June 07, 2000 1:33 PM
Subject: Re: [Zope] What is "favicon.ico" and why is it an error?


 So even though there are no references to it in the HTML MIE is looking
for
 it? Is there anyway to fool it? Can I just put a blank DTML Document? Why
 would MIE be checking the server for that file?

 Add this to the many reasons that I hate MIE!

 J


  On Wed, 7 Jun 2000, J. Atwood wrote:
  As it looks for this "favicon.ico"
 
  M$ IE is looking for this file to provide some "niceness" on a page.
  Search Internet for longer explanations - there are many.
 
  Oleg.(All opinions are mine and not of my employer)
  
  Oleg Broytmann  Foundation for Effective Policies
[EMAIL PROTECTED]
  Programmers don't die, they just GOSUB without RETURN.
 
 


 ___
 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] What is favicon.ico and why is it an error?

2000-06-07 Thread Oleg Broytmann

On Wed, 7 Jun 2000, J. Atwood wrote:
 So even though there are no references to it in the HTML MIE is looking for
 it? Is there anyway to fool it? Can I just put a blank DTML Document? Why
 would MIE be checking the server for that file?

   Becasue if it finds the file in a directory it would display it - and
site admin could put different icons in different directories.
   Return error 404 should be enough, if there is no such files.

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
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: accessing lists from dtml

2000-06-07 Thread mikk

Sorry, but...

Nevermind, I got it:

dtml-var "_['sequence-item'][0]"
 ^^^
 !!!


On Wed, 07 Jun 2000 10:40:59 mikk wrote:
Hello all,

If I have a REQUEST variable that equals a list, like this:

['ITEM_NUMBER','PRICE']

How would I get ITEM_NUMBER and PRICE into separate variables?

The following code gives me a screen full of the appropriate values (using an external
method), but I can't figure out how to use the results:

dtml-in "parseCSV()"
dtml-var sequence-itemBR
/dtml-in

Displays:
['003020','149.95']
['003021','79.99']
..
..
..


TIA

-- 
Mike Mikkelsen   [EMAIL PROTECTED]
Micro Business Systems http://microbsys.com
Fresno Linux Users Group  http://linux.fresno.ca.us

 It's all GNU to me!



___
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] escaping with dtml?

2000-06-07 Thread Jim Sanford

dtml-let hack="_.chr(34)+'app'+_.chr(34)+'
ONCHANGE='+_.chr(39)+'location.href=cookie?app=+this.options[this.selectedIndex].value'+_.chr(39)"

will do what you are trying to do


- Original Message -
From: Riku Voipio [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 07, 2000 10:28 AM
Subject: [Zope] escaping with dtml?


Hello,
I'm trying to get some doubleqoutes to the final document,
but I've been unsuccesful so far:

dtml-let hack="\"app\" 
ONCHANGE=\'location.href=cookie?app=+this.options[this.selectedIndex].value\'"
/dtml-let

--
Riku Voipio
[EMAIL PROTECTED]
09-862 60764


___
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] Greetings,

2000-06-07 Thread R. David Murray

On Wed, 7 Jun 2000, ethan mindlace fremen wrote:
 CURTIS David wrote:
  I wish to use use the data of the database file in my html code.  For example,
   this database was last updated on 06/06/2000.  I suppose that there must be a 
dynamic html tag that zope uses.  What could it be?  I looked at all the 
documentation and have yet to discover it.  DTML-ZOPE-FILE-DATE  Any help is 
apprechiated.
 
 I think you're looking for bobobase_modification_time , like
 
 dtml-var name="bobobase_modification_time"

If, on the other hand, you really want the last updated date of
the Data.fs file (ie: the whole ZODB database), you will probably
have to write an external method to snarf it and return it.

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




[Zope] Dynamically Picking which object to display

2000-06-07 Thread Jason Lee

I'm fairly new to Zope, so this may be a dumb question, and my vocabulary could
be wrong, so please bear with me.  

I'm in the middle of building an e-commerce solution for my company, and we're
evaluating Zope (and PHP and Servlets, but that's immaterial) as the platform on
which to base this solution.  That doesn't necessarily mean anything other than
to give you context.  One of the problems I'm facing right now is how to display
a particular object based on a value.  For example, let's say a user tries to
access www.foo.com/MyAccount/CCInfo.  If the user has authenticated, I need to
show him the obviously sensitive data he has requested.  If he is not
authenticated, however, I need to give him a login screen which, for argument's
sake, is in the DTML document Login in the root folder.  How would I go about
doing that?  Am I making sense?  Thanks...

-- 
Jason Lee  | My German is as good as my jujitsu, which is to say, 
Programmer/Analyst | "I don't know German." -- Tycho Brahe

___
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] YA newbie question

2000-06-07 Thread Randy Edwards

   I've got a newbie question that I can't seem to find an answer to after
checking docs/faqs.  This is sort of design-related.

   Presently I write web pages as tabled modules which are each put into
various *.html files.  I then string pages together with various modules
using server side includes along with whatever specific code/text goes into
that page.

   I figured this would be easy to do with Zope.  I created a subdirectory
called "modules" and put some modules into that; for example, "leftbuttons"
is a dtml method containing a table data block which contains the standard
left menu button HTML.  I figured I could whip up a page and at the
appropriate place in that page, do a 'dtml-var "modules.leftbuttons"' and
have that code inserted into the page.

   That was my thinking.  "leftbuttons" views properly by itself.  However,
when I try that dtml-var statment above, the page displays raw HTML. 
Obviously I'm using a wrong tactic or am not grasping a concept here. 
Anyone want to smack me (again:-) with a clue-bat?  TIA.

-- 
 Regards, | Moore's Law: Every 2 years CPU power will double.
 .| 
 Randy| Gates' Law: Every 18 months software speed will halve.

___
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] escaping with dtml?

2000-06-07 Thread Dieter Maurer

Riku Voipio writes:
  I'm trying to get some doubleqoutes to the final document,
  but I've been unsuccesful so far:
In a Python expression, you can use "chr(34)" to add a quote,
e.g.

dtml-let quote="chr(34)"

/dtml-let


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] WorldPilot - Regular messages are attachments?

2000-06-07 Thread Dieter Maurer

Bryan Stillwell writes:
  Here's the traceback I received:
  
Sorry, a Zope error occurred.p
  !--
  Traceback (innermost last):
File /usr/share/zope/lib/python/Products/WorldPilot/WorldPilot.py, line 1878, in 
 getpart
  (Object: RoleManager)
File /usr/share/zope/lib/python/Products/WorldPilot/WorldPilot.py, line 856, in 
 getPart
File /var/tmp/python/python-root/usr/lib/python1.5/mimetools.py, line 146, in 
 decode
  ValueError: unknown Content-Transfer-Encoding: 8bit
"mimetools.encode/decode" do not handle transfer encodings "7bit", "8bit"
and "binary", because there is nothing to do for them.

"WordPilot" should check for them and not call "decode".

  Another strange thing is the path to the mimetools.py file in the
  traceback: /var/tmp/python/python-root/usr/lib/python1.5/.  The
  /var/tmp/python/python-root path should have only been used during the
  creation of the python rpm, but it's showing up now.
The "*.pyc" files remember the name they have been compiled from.


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] WorldPilot - Regular messages are attachments?

2000-06-07 Thread Bryan Stillwell

On Wed, 7 Jun 2000, Dieter Maurer wrote:

 Bryan Stillwell writes:
   Here's the traceback I received:
   
 Sorry, a Zope error occurred.p
   !--
   Traceback (innermost last):
 File /usr/share/zope/lib/python/Products/WorldPilot/WorldPilot.py, line 1878, 
in getpart
   (Object: RoleManager)
 File /usr/share/zope/lib/python/Products/WorldPilot/WorldPilot.py, line 856, in 
getPart
 File /var/tmp/python/python-root/usr/lib/python1.5/mimetools.py, line 146, in 
decode
   ValueError: unknown Content-Transfer-Encoding: 8bit
 "mimetools.encode/decode" do not handle transfer encodings "7bit", "8bit"
 and "binary", because there is nothing to do for them.
 
 "WordPilot" should check for them and not call "decode".

Yeah, I finally got to RTFS and found a bug in their code.  I was able to
fix my problem by changing these two lines in WorldPilot.py:

BodyType=ST[0]
BodySubtype=ST[1]

To these:

BodyType=string.upper(ST[0])
BodySubtype=string.upper(ST[1])

I found out after adding some debug info to the code that it was
comparing BodyType to see if it was set to 'TEXT', but when it was doing
the comparison it was actually set to 'text', so it would fail.  I didn't
bother finding out why 'text' was in all lower case...


   Another strange thing is the path to the mimetools.py file in the
   traceback: /var/tmp/python/python-root/usr/lib/python1.5/.  The
   /var/tmp/python/python-root path should have only been used during the
   creation of the python rpm, but it's showing up now.
 The "*.pyc" files remember the name they have been compiled from.

Makes sense...

Thanks for the help!  I'm going to send a patch to the WorldPilot people
to see if they'll fix it before the next release.


Have a great day!

Bryan


___
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: graphics in subdirs

2000-06-07 Thread Phil Harris

eh tone,  your using my name in vain again ;)

- Original Message -
From: "Tony McDonald" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; "Zope List" [EMAIL PROTECTED]
Sent: 07 June 2000 16:56
Subject: Re: [Zope] Newbie question: graphics in subdirs


 At 11:35 am -0400 7/6/00, Randy Edwards wrote:
 dtml-var standard_html_header
 h2dtml-var title_or_id/h2
 pThis is the dtml-var id Document./p
 pNow show a graphic: br
 dtml-var logo.jpg
 /p
 dtml-var standard_html_footer
 
 That references an image file in the root directory called logo.jpg.
 Everything works, it displays fine.
 
 However, I want to keep all of my commonly used image files in a
 subdirectory called /images.  So I create a folder called "images",
upload
 another copy of logo.jpg into it, everything's fine.  I change the dtml
in
 the "test" document to be "dtml-var /images/logo.jpg".  And it doesn't
 work, giving me an error message of:
 

 try
 dtml-with images
 dtml-var logo.jpg
 /dtml-with

 It can get complex quickly though - I'm sure I remember something on
 thew Zope list about this, I think it was a word of wisdom from Phil
 Harris...

 hth
 tone
 --
 Dr Tony McDonald,  FMCC, Networked Learning Environments Project
 http://nle.ncl.ac.uk/
 The Medical School, Newcastle University Tel: +44 191 222 5888
 Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2

 ___
 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] seeking help on roles, authorization, permission

2000-06-07 Thread Craig Allen

I've largely been able to ignore most of the Zope security mechanisms until now,
but I have this new intranet app that's causing me problems.

I have a folder called Reuters that has my application's methods; it has a
subfolder called Staging that has documents being reviewed and subsequently
published.  I need to be able to limit the publishing to specific individuals. 
I created users in the Users Folder in my Reuters directory.  I also created an
editor role in my Reuters folder, and gave it what I thought were appropriate
permissions, including manage_properties.  I assigned the editor role to each of
my new users.

Users work in the Staging folder.  When my users try to publish - which invokes
a method that changes properties on documents in the Staging folder and also
properties of the Reuters folder, they are prompted to log in by their browser. 
However, their usernames and passwords do not seem to work, and after 3 tries,
they get a Zope error page saying they do not have permission to
manage_changeProperties.

I don't get it.  Any clues?

Craig
-- 
Craig Allen  - Managing Partner - Mutual Alchemy
Web Architecture - http://alchemy.nu

___
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] Dynamically Picking which object to display

2000-06-07 Thread Kevin Dangoor

- Original Message -
From: "Jason Lee" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 07, 2000 3:50 PM
Subject: [Zope] Dynamically Picking which object to display


 I'm fairly new to Zope, so this may be a dumb question, and my vocabulary
could
 be wrong, so please bear with me.

 I'm in the middle of building an e-commerce solution for my company, and
we're
 evaluating Zope (and PHP and Servlets, but that's immaterial) as the
platform on
 which to base this solution.  That doesn't necessarily mean anything other
than
 to give you context.  One of the problems I'm facing right now is how to
display
 a particular object based on a value.  For example, let's say a user tries
to
 access www.foo.com/MyAccount/CCInfo.  If the user has authenticated, I
need to
 show him the obviously sensitive data he has requested.  If he is not
 authenticated, however, I need to give him a login screen which, for
argument's
 sake, is in the DTML document Login in the root folder.  How would I go
about
 doing that?  Am I making sense?  Thanks...

You're asking quite a reasonable question. If you use one of the alternate
authentication systems (like LoginManager or Generic User Folder), you can
make a login scheme that uses cookies with a custom login screen. I'm hoping
to soon have a package that works with LoginManager to be a little more plug
and play.

The way it works is pretty straightforward. You just set the permissions
such that the user would have to authenticate in order to view that data.
Zope's authentication machinery will kick in, and LoginManager would then
put your login screen up.

Kevin


___
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] possible security flaw? - and, request for a phone conference.

2000-06-07 Thread Jon Franz

Hello, 
First off, sorry for the cross-posting of this message to admin and
to
development.
   I'm a software developer for a major ISP in the Midwest region of the
USA.
Recently we began evaluating Zope for use in our web application
development,
internally and for our clients, and have been quite pleased with the wealth
of features and add-ons available*;  However, I need two points addressed if

possible:

1)  We are running Zope 2.1.4 mapped to the root of the apache install
on a Linux (mandrake 7.0) box, and have found a rather nasty security -
or at least, its what I'll call a nasty problem - because if you don't know
about it, it could really bite you in the butt.
Basically, if a user with manager privileges to a folder changes
their
password to be empty, then anyone (from permitted domains) can access the
management screen for that folder Without Logging On... Zope assumes that
you are the user without the password and treats you as if you have those
rights.
I found this problem when one day the welcome Zope page (default
from install) didn't prompt me for a password when I clicked to enter
the management screen.  I did not realize what had happened until I went
under the 'undo' tab and saw that all of my actions while I was snooping
around for the problem were being listed as being done by one of the
other developers... I went into the acl_users and fixed their password
and everything is back to normal.  I've tested this by setting my own
password to an empty string, and it lets me log in...
From a security standpoint, It should probably prompt for a user
name and password, and simply accept a empty field for the password
As the password for that user...
Anyway, my point is to either inform the community of the bug,
if it isn't known, or to find out if it is known and has been fixed
in the newest release...  If it has not been fixed in the newest release,
I will be glad to create and provide a patch...

2)  As an experienced web developer, I'm very keen on new technologies
that can be reused and make my life easier - thus Zope is a godsend.
However, my management is hesitant to start using Zope on a regular
basis for our projects - they feel it is unproven and possibly unstable:
Now, I realize, and have informed them of the facts, that Digital Creations
makes their living off of Zope, and that new businesses are springing up
almost everyday that are Zope-centric, and that many contracting/development
firms are embracing it whole heartedly... But, my management is still
kind of hesitant.  
Is there anyone among you in the community who would be willing to 
write about your experience with Zope in the professional development 
arena, to address their concerns?  Even better, Would anyone be willing to 
participate in a conference call q  A session on Zope's suitability for 
use in professional web development?  I cannot offer money for these, but 
I can promise my undying gratitude, and, I can promise that any and all 
add-ons and patches we create for Zope would be released back to the 
community at large... As a large website app dev firm, our contributions 
could be significant...
Please email me privately if you wish to possibly participate in 
the phone conference.  
Thank you for your time and attention!

* I have already made two modifications to the Zope source, one dealing with
making 'border' a built in property (and used during tag output) of the 
image object.  and another, simple hack to the basic dtml parsing routines
that makes your dtml development a little faster by requiring less typing.
Both of these will be available under my member area on Zope.org.  Hopefully
these will be the first of many patches and add-ons I get to contribute.

___
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-sendmail and Content-transfer-encoding

2000-06-07 Thread Chien-Pin Wang


Dear All:

 I'm using dtml-sendmail to send messages of Chinese characters from
Zope. From time to time I got wierd mail delivery behaviors. I was told
then that mail header/message body must follow RFC-822 and RFC-2047
standard with proper encoding, if not in US-ASCII. Basically these RFCs
are talking about methods of encoding for non-US-ASCII characters. My
question is: How do I do this in Zope? Big thanks in advance!

Chien-pin


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

2000-06-07 Thread Michael Bernstein

Chris Withers wrote:
 
 Michael Bernstein wrote:
  As I recall (from a WebObjects demonstartion I sat through a
  long time ago), WO creates the most godawful mangled URLs
  that I had ever seen. As a result, a WO site cannot be
  spidered by search engines, or converted to a static copy
  using wget.
 
 Zope's not too hot on this either what with index_html instead of
 index.html the problem of "is /something' a 'file' or a 'folder' from
 wget's point of view?"

Wget would regard /something as a file. bur it would regard
/something/ as a default document in a folder.

 IIRC, it currently would download a zope folder object as a single file
 :(
 
 I've also been bitten by this in Wiki's since links aren't generated
 with absolute_url and so I sometimes get
 /MyWikiFolder/OneWikiPage/AnotherWikiPage which throws up a nasty
 __getitem__ exception (particularly in Netscape, which seems to like
 appending / onto the end of FrontPage in the URL box...)

This sounds like a Wiki problem rather than a Zope problem.

As Zope will access /something and /something/ the same,
it's trivial to make sure that all URLs that link to an
object include a trailing /.

Wget assumes that when it crawls to a something/ location
that it is accessing the default file for the directory, so
it saves the resulting page as something/index.html .

Whatever webserver you use can be set to regard index.html
as the default file, so the link (which is still pointing to
/something/) will work just fine.

The only problem crops up with inline links that don't
conform to the /something/ format. All automatically
generated links (as in navigation bars) on the sites I
create end with a trailing /.

Cheers,

Michael Bernstein.

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

2000-06-07 Thread Graham Chiu

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Hi,

I seem to get more than a few errors emailed to me, and am trying to
track down how they are occurring.  I never see these errors myself
which makes it frustrating.

I know the url where these occur.  Most of them occur at forms.  How can
I get the full url including the parameters of the queries that cause
the problems?

( Interestingly most of the errors occur with DNS of the client browser
based in the US whereas my target audience is home in New Zealand. )

- -- 
Regards,  Graham Chiu
gchiuatcompkarori.co.nz
http://www.compkarori.co.nz/index.php
Powered by Interbase and Zope

-BEGIN PGP SIGNATURE-
Version: PGPsdk version 1.7.1

iQA/AwUBOT6Ba7TRdIWzaLpMEQK/UwCgwBccUuTQt53UH1UBgU5Qfpw6lfwAn1rI
IbypvR/Er3amtKjZkX9ze33g
=zHAB
-END PGP SIGNATURE-

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