[Zope-dev] Java/Python

2001-01-13 Thread Stefane Fermigier

On Fri, Jan 12, 2001 at 12:00:08PM -0800, [EMAIL PROTECTED] wrote:
 From: "Dario Lopez-Ksten" [EMAIL PROTECTED]
 Subject: [Zope-dev] Using Java (or JDBC) with Zope/Python
 Date: Fri, 12 Jan 2001 15:09:39 +0100
 Organization: CITES
 charset="iso-8859-1"
 
 Hello!
 
 I am exploring the possibilities of using JDBC with Zope, as well as
 investigating whether JavaBeans could be used from Zope/Python.
 
 It seems that most Python/Java stuff use the JPython/Jython approach and,
 IIRC, Zope and Jython/JPython don't mix very well/at all.
 
 Any pointers, references, comments, etc accepted.

One project that I know of:

http://www.arakne.com/jpe.htm 

the home of Java-Python Extension (JPE), a Python extension module and a Java
package ensuring seamless interoperability between Java and Python. 

Alpha source code available on http://sourceforge.net/projects/jpe

S.

-- 
Stfane Fermigier, Tel: 06 63 04 12 77 (mobile).
"Amazon: we patent the dot in .com"

___
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] How do I create a folder with subfolders, docs etc?

2001-01-13 Thread Robert Prosenc

try this:

dtml-call expr="manage_addFolder('mainfolder')"
dtml-call expr="PARENTS[0]['mainfolder'].manage_addFolder('subfolder')"

it works with zope 2.2.4

regards rob.


 Robert Prosencweb:  http://www.matrixware.at/
   mail: [EMAIL PROTECTED]
   Matrixware  phone:+43(  1)   713 43 06 - 2
   postal:   Geusaugasse 39
 (Ecke Kundmanngasse)
 A-1030 Vienna, AUSTRIA

while !asleep() sheep++ 



___
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] ZPatterns implementation question: images attributes?

2001-01-13 Thread Zope mailing lists

I have a specialist (actually, EMarket has a specialist grin) that
manages objects that from a design point of view I think should have
a couple of Images as attributes (thumbnail and fullsized images of
the product).  The question is, how do I implement this using
ZPatterns?  Currently all of the other object data is pulled from an SQL
database.  I don't mind storing the Images in the ZODB, but I'm having
a hard time finguring out how I would implement that.  Pointers or
alternate design suggestions welcome.

--RDM


___
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] ZPatterns implementation question: images attributes?

2001-01-13 Thread Steve Alexander

Zope mailing lists wrote:

 I have a specialist (actually, EMarket has a specialist grin) that
 manages objects that from a design point of view I think should have
 a couple of Images as attributes (thumbnail and fullsized images of
 the product).  The question is, how do I implement this using
 ZPatterns?  Currently all of the other object data is pulled from an SQL
 database.  I don't mind storing the Images in the ZODB, but I'm having
 a hard time finguring out how I would implement that.  Pointers or
 alternate design suggestions welcome.

Here's the simplest approach that I can think of.

Stick all your images in a BTree Folder somewhere convenientm like 
/Images. Name all the images "image-NN" where NN is a unique number.

Make a couple of columns in your database (or whatever) for thumbnail_id 
and large_image_id. You'll store the image ids in these.

Use some SkinScript in that Specialist you mentioned that gets the 
thumbnail_id and large_image_id for a particular object, and also makes 
available the thumbnail and large_image.

WITH QUERY get_thumbnail_for_object_SQL(primary_key=self.id) COMPUTE
   thumbnail_id=thumbnail_id,
   thumbnail=Images[thumbnail_id]
OTHERWISE LET
   thumbnail_id='',
   thumbnail=Images.missing_thumbnail

Note here that I could have had just "thumbnail_id," at line 2.
Also, note that I'm assuming you have an image called missing_thumbnail 
in the Images folder.

Do likewise for large images.

This approach assumes that you're not considering images or thumbnails 
to be first-class domain objects in your system, but just attributes of 
your main objects. Thus, you won't be wanting to store other data that 
is pertinent to images. If you do want to do this, you should use a more 
complex design where Images have their own specialist.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net




___
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] ZPatterns implementation question: images attributes?

2001-01-13 Thread Michael Bernstein

RDM wrote:
 
 I have a specialist (actually, EMarket has a specialist grin) that
 manages objects that from a design point of view I think should have
 a couple of Images as attributes (thumbnail and fullsized images of
 the product).  The question is, how do I implement this using
 ZPatterns?  Currently all of the other object data is pulled from an SQL
 database.  I don't mind storing the Images in the ZODB, but I'm having
 a hard time finguring out how I would implement that.

I've been thinking about my own need for a massive
searchable image archive, and have been wondering if I could
reimplement the ZPhotoAlbum TTW product (which inherits from
ZCatalog and ObjectManager) as a Specialist with a Rack of
Photo objects (Photo is a 'normal' Python Product), but I'm
unsure of how to go about this.

I've also been considering creating an ImageArchive ZClass
that inherits from ZCatalog and BTree folder, so I have
infrastructure that is better suited to managing thousands
(potentially hundreds of thousands) of objects.

Any ideas would be welcome.

Michael Bernstein.

___
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] Massive scalability

2001-01-13 Thread Michael Bernstein

I am currently planning two separate 'Archive' type
projects/Products. In both cases, I need to make sure that
my implementation will scale to hundreds of thousands or
even millions of objects.
In one project the objects are very simple ZClasses with a
few attributes, in the other project, the objects will be
instances of the Photo Product, and considerably larger.

One implementation I'm considering is a simple Specialist
with a Rack. Does anyone know if there are any inherent
limitations on the number of objects that can be stored in a
Rack? are there any performance limitations at the scale
that I'm talking about?

The other implementation I'm considering is to create a
ZClass that inherits from ZCatalog and Btree Folder. Would
this approach run into any scalability problems with the
number and type of objects I'm talking about?

Thanks,

Michael Bernstein.

___
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] ZPatterns implementation question: images attributes?

2001-01-13 Thread Zope mailing lists

On Sat, 13 Jan 2001, Steve Alexander wrote:
 Here's the simplest approach that I can think of.

Thanks, Steve, that's great.  I can even simplify it since there's
a one to one correspondence between products and images, so I can
just use the product Id as the Image Id.  If that correspondence ever
breaks, it'll be a sign that its time to promote the images to
their own specialist...

I think I'm slowly getting the hang of this.  Now, if I can just manage
to finish reading Coad...grin

--RDM


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

2001-01-13 Thread asdksoad

GET YOUR OWN 100 MEG WEBSITE FOR ONLY $11.95 PER MONTH TODAY!

STOP PAYING $19.95 or more TODAY for your web site, WHEN YOU CAN 
GET ONE FOR ONLY $11.95 PER MONTH!

DO YOU ALREADY HAVE A WEBSITE? ALL YOU HAVE TO DO IS TRANSFER THE 
DOMAIN TO OUR SERVERS AND UPLOAD YOUR DATA AND YOU ARE READY TO 
GO! YOUR NEW WEB SPACE CAN BE CREATED INSTANTLY WITH JUST A 
SIMPLE PHONE CALL TO  OUR OFFICE.

YOU CAN CHANGE THE DESIGN OF YOUR SITE AS MUCH AS YOU WANT with 
no extra charge!  UNLIMITED TRAFFIC -- no extra charge!

FRONT PAGE EXTENSIONS are FULLY SUPPORTED.

A SET UP FEE OF $40.00 APPLIES for FIRST TIME CUSTOMERS.

ALL FEES PREPAID IN ADVANCE FOR THE YEAR PLUS A $40.00 SET UP 
CHARGE.

FOR DETAILS CALL 1 888 248 0765  if you are outside the USA,
please fax 240 337 8325

Webhosting International

 
 
 
 
 
 
 
 
 

___
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] RE: Zope 2.3 and manage_page_style.css unauthorized

2001-01-13 Thread Ron Bickers

Well... that figures.  I see now that this was added to the Collector
earlier this evening (http://classic.zope.org:8080/Collector/1848/view).
___

Ron Bickers
Logic Etc, Inc.
[EMAIL PROTECTED]


 -Original Message-
 From: Ron Bickers [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, January 13, 2001 3:07 AM
 To: [EMAIL PROTECTED]
 Subject: Zope 2.3 and manage_page_style.css unauthorized


 Playing with 2.3.0a2, I discovered that if I log in to the
 management screen with a Manager user that is not defined in the
 root folder, I get an unauthorized error when accessing
 /manage_page_style.css (401 from detail log).  If the Manager is
 defined in the root, everything works fine.

 A bug?  How can I fix it?
 ___

 Ron Bickers
 Logic Etc, Inc.
 [EMAIL PROTECTED]



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




Re: [Zope] Newbie question: HTTP variables

2001-01-13 Thread Michael Bernstein

Dean  Deb Ekstrand wrote:
 
 I'm trying to figure out Zope (on a time crunch, too), and I'm wondering how
 to do something.  How can I access HTTP variables in my DTML code?
 Specifically, I want to return code specific to the user's browser.  I know
 that HTTP has provisions for determing browser version, are those accessible
 in DTML and how?  If they are not accessible in DTML, is there a workaround
 (without oodles of javascript)?

these variables are part of the REQUEST namespace.
Specifically you can do

dtml-var "REQUEST.HTTP_USER_AGENT" to display the browswer
version. Creating conditional code is left as an excersize
for the student.

If you want to display a complete list of all HTTP REQUEST
variables, try this:

dtml-var REQUEST

 Another quick question:  I see that Zope 2.3 will have "Script" objects.
 What's the closest I can come in Zope 2.2.5?

The Python Method product:
http://www.zope.org/Members/4am/PythonMethod

Or external methods:
http://www.zope.org/Documentation/How-To/ExternalMethods

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] with a variable

2001-01-13 Thread Eric Walstad

//  I want to get some properties for a zclass instance after being
//  passed its
//  id in a variable. In these tests I have been defining the varible in the
//  code, in the final case it will be passed through the url.
//
//  Using the id directly as above works fine, it writes the
//  attribute to the
//  page.
//
//  Thanks for any help,
//
//  Josh On
Hi Josh,
I'm kinda new to this stuff, but I think I am doing something similar to
what you need.
I have a DTML method that grabs a ZCLass object's id from the query string
and uses it to
gain access to that ZCLass object.  It looks like I'm generating the id's
the same way
you are (not that that matters...)  I do it like this:
The URLs look something like this:
addUserToEvent?977952867
where 977952867 is the id of the ZClass object I want to work with

and the "addUserToEvent" method has this in it:
dtml-with "_.getitem(QUERY_STRING)"

...Do stuff with the ZClass reference here...

/dtml-with

I hope that helps.

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 )




[Zope] Collector Product ??

2001-01-13 Thread Peter Bengtsson

I'm looking for a bug-tracking-software-system.
Does DC give out their Collector (http://classic.zope.org:8080/Collector) Product for 
free for us? Where can it be downloaded?
Is there anybody out there who would care to share their product with me? ;)

Any hints? Peter



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   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] NameError: Zope2.3a2 and LoginManager-0-8-8b1

2001-01-13 Thread Shane Hathaway

Janko Hauser wrote:
 
 Hello, I try to install LoginManager on a new Zope2.3. I have made the
 before mentioned changes regarding Super and the product shows up fine
 in the Product folder.
 
 But I can not add a LoginManager in a normal folder with the attached
 error message. I have seen, others have already LoginManager
 running. Any ideas, where I can look for a clue?

I traced this to a mistake in HTTPRequest and have fixed it in CVS.

Shane

 Error Type: NameError
 Error Value: path
 
 Traceback (innermost last):
   File /home/zope/LOCAL/zope/lib/python/ZPublisher/Publish.py, line
   222, in publish_module
   File /home/zope/LOCAL/zope/lib/python/ZPublisher/Publish.py, line
   187, in publish
   File /home/zope/LOCAL/zope/lib/python/Zope/__init__.py, line 221, in
   zpublisher_exception_hook
   File /home/zope/LOCAL/zope/lib/python/ZPublisher/Publish.py, line
   171, in publish
   File /home/zope/LOCAL/zope/lib/python/ZPublisher/mapply.py, line
   160, in mapply
 (Object: addLoginManager)
   File /home/zope/LOCAL/zope/lib/python/ZPublisher/Publish.py, line
   112, in call_object
 (Object: addLoginManager)
   File /home/zope/LOCAL/zope/lib/python/App/special_dtml.py, line 127,
   in __call__
 (Object: addLoginManager)
   File /home/zope/LOCAL/zope/lib/python/DocumentTemplate/DT_String.py,
   line 538, in __call__
 (Object: addLoginManager)
   File /home/zope/LOCAL/zope/lib/python/DocumentTemplate/DT_In.py,
   line 646, in renderwob
 (Object: UserSourcesMetaTypes(this()))
   File /home/zope/LOCAL/zope/lib/python/DocumentTemplate/DT_Util.py,
   line 330, in eval
 (Object: UserSourcesMetaTypes(this()))
 (Info: UserSourcesMetaTypes)
   File /home/zope/LOCAL/zope/lib/python/ZPublisher/HTTPRequest.py,
   line 802, in __getitem__
 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] document_src not doing what I thought it did

2001-01-13 Thread Tim Hicks


- Original Message -
From: Dieter Maurer [EMAIL PROTECTED]
To: Tim Hicks [EMAIL PROTECTED]
Sent: Friday, January 12, 2001 10:28 PM
Subject: Re: [Zope] document_src not doing what I thought it did


 Tim Hicks writes:
   I have a dtml-documentish zclass and have created a custom edit method
for
   it so that I can do an automatic reindex when each instance is edited.
I
   created this custom form by simply copying the source html that is
generated
   for the standard edit form, and then replacing the static parts of what
I
   copied with various dtml-var  inserts (see below).  This seemed to go
   according to plan until I realised that something strange is happening
when
   I try to view this edit form for an instance of the zclass.  In most
cases,
   everything seems normal, but when I try to edit an instance that has a
   property set to 'private', my 'privacy' method kicks in and redirects
me
   away from the edit form to my standard 'Restricted Page'.  The
redirection
   is written into the text of the instance I am trying to edit, so I
expected
   that by using dtml-var document_src, the actual source would get
placed in
   the text area without being processed.  This is what appears to happen
when
   the instance does not have the 'private' property.  I guess therefore,
my
   question is, am I using document_src correctly?
 Is is possible that your edit form is called
 in the context of you ZInstance?


I'm not sure I completely understand the terminology you use, but I guess it
sounds right that the edit form method is called 'on' (in my terminology
;-) ) the Zclass instance.  It is in that way that the dtml-var
id/title/get_size/etc retrieve the attributes of the instance and not the
method itself... is that correct? Is that what you mean?

 Then, it might be able that *it* interpretes the "private"
 and redirects before "document_src" is executed at all.

Each Zclass instance has dtml-call privacydtml-if "available* ==
1"dtml-call RESPONSE.redirect(restricted)dtml-elseblah/dtml-if . (*
set by the privacy method).  Thanks for your help with that btw :-).
However, the edit form method does not have this code in it.  As far as I
can gather, the only time the method gets to 'see' the code shown above is
when it inserts dtml-var document_src.

What am I missing?

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 )




Re: [Zope] reindex when a zclass is edited

2001-01-13 Thread Tim Hicks


- Original Message -
From: Aleksander Salwa [EMAIL PROTECTED]
To: Tim Hicks [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, January 12, 2001 8:34 AM
Subject: Re: [Zope] reindex when a zclass is edited



 On Thu, 11 Jan 2001, Tim Hicks wrote:

  from a builtin edit form as my template.  One thing doesn't work now
though,
  and that's making the textarea wider/narrow/etc.  Obviously, this is
because
  I have static values put in for the dimensions of the text area, but I'm
not
  sure how to alter this to make it work... any pointers?

 I use this code for that purpose:

 dtml-if "REQUEST.has_key('dtpref_cols')"
  dtml-if "REQUEST.has_key('dtpref_rows')"
   dtml-var
 "manage_edit(data,title,SUBMIT,dtpref_cols,dtpref_rows,REQUEST)"
  dtml-else
   dtml-var "manage_edit(data,title,SUBMIT,dtpref_cols,REQUEST=REQUEST)"
  /dtml-if
 dtml-else
  dtml-if "REQUEST.has_key('dtpref_rows')"
   dtml-var
 "manage_edit(data,title,SUBMIT,dtpref_rows=dtpref_rows,REQUEST=REQUEST)"
  dtml-else
   dtml-var "manage_edit(data,title,SUBMIT,REQUEST=REQUEST)"
  /dtml-if
 /dtml-if
 dtml-call "reindex_object()"
 dtml-call "RESPONSE.redirect(manage_edycjaTresciForm.absolute_url())"



Thanks very much for the help Aleksander, but when I drop your code into my
method, it doesn't work (it doesn't break either). I simply copied and
pasted your code, then edited the final redirect at the bottom.  Here is the
submission part of my edit form (if it makes any difference).

TD align=left
  INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Change"
 /TD
 TD align=left
   INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Taller"
   INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Shorter"
   INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Wider"
   INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Narrower"
 /TD

I had a look on the ZQR, and found the section on manage_edit, but I still
don't really understand how the dtpref_cols/rows works.  Any insight?

Cheers

tim


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   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] OpenBSD 2.8 woes

2001-01-13 Thread Shane Hathaway

Jan Muenther wrote:
 However, after installing the Python packages that comes shipped
 with the OpenBSD 2.8 CDs, the Zope installation script runs
 nicely, but when I try and access the management screen, I only
 see LOADS of error messages:
 
   Zope Error
 
   Zope has encountered an error while publishing this
 resource.
 
   Error Type: ParserError
   Error Value: Expected node type 12, got 312.
 
 Could anybody enlighten me??? I don't know Python (yet), so the
 tracebacks are not too informative for me ...

Are you using Python 2.0?  It's not yet compatible with Zope, though
efforts are being made. Just enter "python" to find out.

Shane

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




[Zope] REQUEST object - obtaining variables from

2001-01-13 Thread Lee

Hi,

I am having some problems with the REQUEST namespace/object. I
understand that if I submit form data then it can be retrieved using the
REQUEST object. I have looked at Chapter 7 (Advanced DTML) for support
but I'm still no closer to success.

I have a DTML method, which passes an unknown number of arguments with
unknown names to another method. For example,

form action="display"
Name input type="text" name="name1"br
Age input type="text" name="age1"br
Name input type="text" name="name2"br
Age input type="text" name="age2"br
input type="submit"
/form

I would like the display method to simply show each of the variable's
names and values i.e. iterate through each variable in the REQUEST
object. Maybe I've overlooked something in the Zope documentation but
could someone supply a useful snippet of code to get me started?

Thanks very much,

Lee

--
Lee Reilly
mailto:[EMAIL PROTECTED]

````

HAVE SKILLS; WILL TRAVEL.

I'm currently looking for an internship in the USA
in the field of web development. Ideally, I'm looking
for a placement for 3 to 18 months. Can you help?

More details, my resume, etc. @
http://homepages.strath.ac.uk/~aeu97172/

/shameless plug




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   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] Lines Property and special namespace variable

2001-01-13 Thread Tom Scheidt

Hi all,

Im trying to changes the contents of a lines property
into floating point numbers a la:

dtml-in lines
dtml-let "_.float(lines)"
dtml-if "lines  0"font color="#006600"/dtml-if
dtml-var sequence-item
/dtml-in

The contents of the lines property are:
25.32
-16.50

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 )




Re: [Zope] Collector Product ??

2001-01-13 Thread Michael Bernstein

Peter Bengtsson wrote:
 
 I'm looking for a bug-tracking-software-system.
 Does DC give out their Collector (http://classic.zope.org:8080/Collector) Product 
for free for us? Where can it be downloaded?
 Is there anybody out there who would care to share their product with me? ;)

The collector has been superseded by the Tracker. It's an
unsupported product, but you can get it through CVS:
http://www.zope.org//Members/klm/TrackerWiki/FrontPage

Here's another one, a bit less sophisticated, but easier to
set up and use:
http://www.zope.org/Members/shalabh/iTrack

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] Collector Product ??

2001-01-13 Thread Chris McDonough

I believe you can download Ken Manheimer's Tracker product via CVS:
http://www.zope.org//Members/klm/TrackerWiki/TrackerCVSInstructions

- Original Message -
From: "Peter Bengtsson" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, January 13, 2001 7:35 AM
Subject: [Zope] Collector Product ??


 I'm looking for a bug-tracking-software-system.
 Does DC give out their Collector (http://classic.zope.org:8080/Collector)
Product for free for us? Where can it be downloaded?
 Is there anybody out there who would care to share their product with me?
;)

 Any hints? Peter



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




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




RE: [Zope] Zope Marketing

2001-01-13 Thread Stephan Goeldi

  I searched on several sites for Zope Marketing products like
  e.g. high quality color PDF or slides, targeting management
  or marketing people.

Not a bad idea. I wouldn't mind having a go at it, can someone at
DigiCool send me a large version of the Z ball logo and the fonts used
by 'Zope'?

And if you could create a 'media' or 'press' directory on zope.org with all 
the PR and Marketing PDF Files, Zlogo etc. in it, it would be perfect.


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




[Zope] TREE tag - not showing Folderish objects that contain no sub-objects

2001-01-13 Thread Kevin Howe

I currently have a TREE tag as follows:

  dtml-tree expr="PARENTS[-1]" branches_expr="objectValues()" sort=id

which basically says:

  "Display objects which can contain sub-objects"

such as Folders, Folderish Products, ZClassed based on ObjectManager, etc.

What I would like to do is display these objects, but ONLY IF they currently
contain some objects, so that if an object does not contain any subobjects
at the moment, it is not displayed. Something like the following:

  dtml-tree expr="PARENTS[-1]" branches_expr="_.len( objectValues() )  0"
sort=id

Unfortuntately the above doesn't seem to work (can Python's len() function
be called from DTML?).

Does anyone know what expression might do what I am looking for?

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 )




Re: [Zope] Lines Property and special namespace variable

2001-01-13 Thread Aleksander Salwa

On Sat, 13 Jan 2001, Tom Scheidt wrote:

 Im trying to changes the contents of a lines property
 into floating point numbers a la:
 
 dtml-in lines
 dtml-let "_.float(lines)"
 dtml-if "lines  0"font color="#006600"/dtml-if
 dtml-var sequence-item
 /dtml-in
 
 The contents of the lines property are:
 25.32
 -16.50

dtml-in lines
dtml-let float_seq_item="_.float(_['sequence-item'])"
 dtml-if "float_seq_item0"font color="#006600"/dtml-if
 dtml-var sequence-item
 dtml-if "float_seq_item0"/font/dtml-if
/dtml-let
/dtml-in

[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   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] hasRole bug or feature in 2.2.?

2001-01-13 Thread Chris McDonough

Thank god for Dieter.  :-)

I'll trust that you're right, Dieter, because reading the traversal
machinery code makes my head hurt.  :-)

- Original Message -
From: "Dieter Maurer" [EMAIL PROTECTED]
To: "Chris McDonough" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, January 12, 2001 5:00 PM
Subject: Re: [Zope] hasRole bug or feature in 2.2.?


 Chris McDonough writes:
   You didn't protect the isMember document.  It's viewable by Anonymous.
The
   Zope security machinery short-circuits authentication for resources
that
   don't require it.  This means that when you view a resource that's
   unprotected, you view it "as Anonymous".  Anonymous doesn't have the
Member
   role, so you see "You are NOT a Member" when you view /isMember.
  
   I don't particularly like this behavior, but it seems not to bother
anyone
   else.  I think it should authorize you and set AUTHENTICATED_USER if
you
   pass in auth info regardless of the protection on the resource you're
trying
   to view.
 It would bother me a lot, if you were right :-)

 Fortunately, you are not completely right.

 What really happens is the following:

   when ZPublisher has located the object addressed by
   the request URL, it starts going back its way
   along PARENTS to find a UserFolder that can
   authenticate a user with sufficient permissions
   to call the object.

   If the object is unprotected, then no permissions
   are required. In this case, the top level
   UserFolder will return "Anonymous",
   if it is reached and it cannot authenticate the
   user.
   Therefore, an unprotected object can be
   called by Anonymous and in this case,
   "hasRole" is that of "Anonymous", as Chris
   reported.

   However, if previously a protected object
   has been accessed, then your browser may (and usually
   will) send Authentication information with
   all following requests.
   A UserFolder will use this information (if present)
   to authenticate the user, even if no permissions
   are necessary for object access.
   If successful, AUTHENTICATED_USER will not
   be "Anonymous" even though the accessed object
   is unprotected.


 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 maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   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] hasRole bug or feature in 2.2.?

2001-01-13 Thread Randall F. Kern

 From: Ron Bickers [mailto:[EMAIL PROTECTED]]

 If this is true, it explains clearly Zope's behavior.  It's really a
browser
 "feature" and not a Zope issue at all.



Yes, that's the problem.

My solution is to use a custom UserFolder, which sets a temporary cookie
when a normal HTTP login is accepted.  This cookie is then used for
further validation.  The class I use is rather complex, providing
persistent login in addition to these features, and randomly re-creating
the cookie so one can't easily spoof a user, but this simple class will
get you going:

class UserFolder(AccessControl.User.BasicUserFolder):
def validate(self, request, auth='', roles=None):
user = AccessControl.User.BasicUserFolder.validate(self,
request, auth, roles)
if user is AccessControl.User.nobody or user is None:
if request.cookies.has_key('login'):
user =
self.getUser(request.cookies['login'])
else:
request.response.setCookie('login',
user.getUserName(), path='/')

return user


-Randy

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




Re: [Zope] Zope Marketing

2001-01-13 Thread Kevin Teague

On 1/13/01 12:30 PM, "Stephan Goeldi" [EMAIL PROTECTED] wrote:

 I searched on several sites for Zope Marketing products like
 e.g. high quality color PDF or slides, targeting management
 or marketing people.
 
 Not a bad idea. I wouldn't mind having a go at it, can someone at
 DigiCool send me a large version of the Z ball logo and the fonts used
 by 'Zope'?
 
 And if you could create a 'media' or 'press' directory on zope.org with all
 the PR and Marketing PDF Files, Zlogo etc. in it, it would be perfect.
 

I'm not sure about the typeface they used, but there are some nice EPS files
of the Zope logo available at:

http://www.zope.org/Images/Logos.html

I've also put up a Zope image that I use for my Eterm background here:

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


Kevin Teague
http://www.bud.ca


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   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] REQUEST object - obtaining variables from

2001-01-13 Thread Jens Vagelpohl

here's how you could display the form variables on the receiving object:

tested

dtml-in expr="REQUEST.form.items()"
  dtml-var name="sequence-key": dtml-var name="sequence-item"br
/dtml-in

/tested

REQUEST.form will contain all the fields from the form and
REQUEST.form.items() will give you access to all key-value pairs that you
can then access with sequence-key and sequence-item in the loop.

jens




on 1/13/01 13:11, Lee at [EMAIL PROTECTED] wrote:

 Hi,
 
 I am having some problems with the REQUEST namespace/object. I
 understand that if I submit form data then it can be retrieved using the
 REQUEST object. I have looked at Chapter 7 (Advanced DTML) for support
 but I'm still no closer to success.
 
 I have a DTML method, which passes an unknown number of arguments with
 unknown names to another method. For example,
 
   form action="display"
   Name input type="text" name="name1"br
   Age input type="text" name="age1"br
   Name input type="text" name="name2"br
   Age input type="text" name="age2"br
   input type="submit"
   /form
 
 I would like the display method to simply show each of the variable's
 names and values i.e. iterate through each variable in the REQUEST
 object. Maybe I've overlooked something in the Zope documentation but
 could someone supply a useful snippet of code to get me started?
 
 Thanks very much,
 
 Lee


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   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] importing string module in python METHOD - a problem that shouldn't be aproblemproblem

2001-01-13 Thread Lee

Hi,

I have a Python method that needs to use the string module. In the
method body I have the 'import string' statement but when I try it =

Error Type: ImportError
Error Value: __import__ not found

The documentation collaborates that import statements (the string module
specifically) can be used in Python methods. The method body is...

import string
text = details
y = string.split(text,"x")
studentMatric = y[0]
studentRecord = y[1]
return studentMatric + studentRecord

.., which results in the above error. Can anyone suggest a reason for
this? I think (hope) it'll work if I put it in my extensions directory.

Thanks very much,

Lee

--
Lee Reilly
mailto:[EMAIL PROTECTED]

````

HAVE SKILLS; WILL TRAVEL.

I'm currently looking for an internship in the USA
in the field of web development. Ideally, I'm looking
for a placement for 3 to 18 months. Can you help?

More details, my resume, etc. @
http://homepages.strath.ac.uk/~aeu97172/

/shameless plug


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   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] importing string module in python METHOD - a problem that shouldn't be aproblemproblem

2001-01-13 Thread Shane Hathaway

Lee wrote:
 I have a Python method that needs to use the string module. In the
 method body I have the 'import string' statement but when I try it =
 
 Error Type: ImportError
 Error Value: __import__ not found

import is available in Python Scripts but not Python Methods.  PS is
available in Zope 2.3.x.

Shane

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   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] ZClasses meet PythonScripts, sample request

2001-01-13 Thread Timothy Wilson

Hi everyone,

I'm looking forward to using some PythonScripts as methods of some ZClasses
because it seems like a much cleaner way to do things. I wonder if one of
the PythonScript gurus out there would be willing to show an example of two
presumably common PythonScript/ZClass tasks: processing changes to a
property sheet using form input and deleting a ZClass instance.

Let's say we've got a ZClass for keeping track of a CD collection. (I recall
seeing that example in a ZClass How-To.) Let's say the ZClass has a property
sheet called 'cd_info' with the following properties:

title (string)
artist (string)
date_purchased (date)

(for extra credit, add a 'songs' property of type 'lines' :-)

Is that enough info? Anybody want to take a crack at this? (This would
surely be good info to put at zope.org somewhere.)

-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] importing string module in python METHOD - a problem that shouldn't be aproblemproblem

2001-01-13 Thread Evan Simpson

From: "Lee" [EMAIL PROTECTED]
 I have a Python method that needs to use the string module. In the
 method body I have the 'import string' statement but when I try it =

As Shane mentioned, 'import' is only enabled in Python Scripts, but Python
Methods pre-import all of the same modules as DTML, including 'string'.

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] importing string module in python METHOD - a problem that shouldn't be a problem problem

2001-01-13 Thread Ron Bickers

You can using the string module in Python Methods the same way you can in
DTML.  There's no need to import anything.

Try _.string.split(...)

___

Ron Bickers
Logic Etc, Inc.
[EMAIL PROTECTED]


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Lee
 Sent: Saturday, January 13, 2001 8:55 PM
 To: [EMAIL PROTECTED]
 Subject: [Zope] importing string module in python METHOD - a problem
 that shouldn't be a problem problem


 Hi,

 I have a Python method that needs to use the string module. In the
 method body I have the 'import string' statement but when I try it =

 Error Type: ImportError
 Error Value: __import__ not found

 The documentation collaborates that import statements (the string module
 specifically) can be used in Python methods. The method body is...

 import string
 text = details
 y = string.split(text,"x")
 studentMatric = y[0]
 studentRecord = y[1]
 return studentMatric + studentRecord

 .., which results in the above error. Can anyone suggest a reason for
 this? I think (hope) it'll work if I put it in my extensions directory.


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