Re: [Zope-dev] Linux Zope - Win2K SQL Server?

2000-12-14 Thread Philipp Auersperg


Does it also work with SQL Server 7.0?

thanks
phil
*** REPLY SEPARATOR  ***

On 08.12.2000 at 10:10 Anthony Baxter wrote:

Use the Sybase client libraries, with ZSybaseDA. We do that here, and
it works fine (but not for much longer, byebye sqlserver...)

Or FreeTDS, but I don't think it's thread-safe, so you'll need to use
a Thunked adaptor.

 "Neil K" wrote
 
 I'm still trying to figure out what the missing pieces are... if anyone else
 has gotten a Linux Zope talking to a Win2K SQL Server 2000, I would
 appreciate some guidance.
 
 It seems I would have to write my own Product from scratch to do this, no
 matter what. None of the ODBC Products seem to be available for Unix, and
 ODBC from Unix - Windows will require additional software like EasySoft's
 ODBC Bridge anyway. Or I could just not use ODBC at all and make some
 Product customized to MS SQL Server.
 
 Some may suggest using ActiveState's Perl Methods for Zope and DBD::Proxy.
 :)  It's a possibility, but I'd like to see if more conventional solutions
 exist.
 
 --
 Neil Kandalgaonkar, ActiveState
 
 
 
 ___
 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 )
 

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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 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: General Design Question

2000-12-14 Thread Roch'e Compaan

As part of a Customer Relationship Management system our company is
developing, we have a Licenses specialist which manages product licenses.
All license objects do not have the same attributes however.  The various
attributes relating to different licence types are not known attributes from
the outset.

My idea is to have a LicenseType class for which the user can define extra
attributes per instance eg:
LicenseType1 with properties A,B,C
LicenseType2 with properties D,E,F

When new licenses are created the user first selects a LicenseType.  Based
on this selection the properties of the selected LicenseType are added to a
specific License instance.

As I see it one can take two approaches to this:
a) either add a single dictionary property for both license and licensetypes
which holds user defined attributes
or
b) explicityly call manage_addProperty per instance to add properties.

Any ideas?

Roché


___
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: persistant objects hold DataSkin-Items - KeyError: _v_dm_

2000-12-14 Thread Ulrich Eck


 I'm searching for something that handles a newItem(meta_type,key)
function
 that is provided
 from the FwCS who decides which object-type is created and gets those
 attributes from the customizer

 Just use the normal Zope "add list" to create one manually, or call the
 appropriate constructors (e.g. SomeZClass.createInObjectManager()).



after a while I think I got it now.

I use a FcWS as a Folder like usual in Zope and if i create an object
of a type which is "customized" certain attributes will be set through
the customizer. so for a database app that handles multiple tables
it isnt useful to handle with a FwCS.

First I thought there is the same "magic" as if i ..getItem() with a
specialist .. in a FwCS

Due to the Folders Rules, there can only by one object with the same id
at a time in one FwCS ..

I'll switch back to a Specialist which has many racks as data-providers
which i can choose the right one with a method that has a "meta-type"
parameter.

is this right so far ??

Ulrich Eck


___
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: persistant objects hold DataSkin-Items - KeyError: _v_dm_

2000-12-14 Thread Phillip J. Eby

At 02:49 PM 12/14/00 +0100, Ulrich Eck wrote:

after a while I think I got it now.

I use a FcWS as a Folder like usual in Zope and if i create an object
of a type which is "customized" certain attributes will be set through
the customizer. 

Yes.


so for a database app that handles multiple tables
it isnt useful to handle with a FwCS.

Um, not necessarily.  You can create regular Folders under the FwCS if you
want to keep them seperate.  You can even use BTreeFolders or other
ObjectManagers, if you like.  All that's required is that they support the
ObjectManager protocol.  So you can have a folder for each meta_type.  Of
course, the primary storage of the object has to be the ZODB.


First I thought there is the same "magic" as if i ..getItem() with a
specialist .. in a FwCS

No.  The FwCS is to allow more "traditional" Zope objects to blend in data
from other sources, and/or to have trigger support.


Due to the Folders Rules, there can only by one object with the same id
at a time in one FwCS ..

Yes.   But you don't have to place the DataSkins directly under the FwCS,
they can be any number of nesting levels below it.


I'll switch back to a Specialist which has many racks as data-providers
which i can choose the right one with a method that has a "meta-type"
parameter.

is this right so far ??

Pretty much, although I'm not sure why you want to pick by meta type, since
one of the major reasons for having a Specialist is for the rest of the
application not to know about specific meta types.


___
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: General Design Question

2000-12-14 Thread Phillip J. Eby

At 02:42 PM 12/14/00 +0200, Roch'e Compaan wrote:
As part of a Customer Relationship Management system our company is
developing, we have a Licenses specialist which manages product licenses.
All license objects do not have the same attributes however.  The various
attributes relating to different licence types are not known attributes from
the outset.

My first reaction to this is that I would use a different class for each
type of license, and a rack in the specialist for each class.  This would
allow maximum behavioral flexibility, since each class can have its own
methods for inputting or displaying data.

However, if your application needs to have end-user (as opposed to
integrator-user) definition of license types, then you need to add
LicenseType to your domain model and create a specialist for it (possibly
nested inside the Licenses specialist).  


As I see it one can take two approaches to this:
a) either add a single dictionary property for both license and licensetypes
which holds user defined attributes
   or
b) explicityly call manage_addProperty per instance to add properties.


Option "b" will make your application ZODB-dependent, since there is no way
to map arbitrary attributes to an SQL database, for example.  Option "a" is
better, since a dictionary attribute can be handled with WITH/COMPUTEs and
triggers, with a little work.

There is also an option "c", which would be to model
LicensePropertyDefinition and LicenseProperty objects in your domain model.
 This approach leads to a bit more work defining your model, as well as in
setting up the specialists and their interactions, but the payoff is in
better documentation of what your app is doing and easier re-mapping from
one database type to another.

Ty and I recently experienced something similar, in an application where we
were using a dictionary attribute to represent something that was better
modelled as a seperate object.  The complexity of the associated SkinScript
and DTML/Python/SQL methods went down after we bit the bullet and added a
nested Specialist.  (When a role in a domain model is only accessed from
one other role, it is reasonable to nest that role's Specialist inside the
other's, as it keeps the higher-level app namespace cleaner.  Usually there
is some clustering to domain models that puts a small number of supporting
classes in a position to do this for each major class.)


___
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] DataSkin object ownership

2000-12-14 Thread Ty Sarna

In article [EMAIL PROTECTED],
Phillip J. Eby [EMAIL PROTECTED] wrote:
 At 08:04 PM 12/12/00 -0500, BS wrote:
 Do DataSkins have ownership? I want to give multiple users the ability to
 add objects to a rack and only allow the 'owner' to view/edit the object.
 
 DataSkins stored in Racks do not participate in the Zope ownership
 mechanism, nor the creation of the 'Owner' role.  This is because they are

To clarify: if you just want Owner roles, as opposed to Ownership[1][2][3],
you can do that with totally-non-ZODB objects.  I have a couple
different applications where totally SQL- or LDAP- are given local roles
(Owner and others) to implement security as you describe. 

The way we do it requires LoginManager to be in use, or to have patched
Zope with improvents to the local roles support (LM effectively hotfixes
these in for its own users). Then our DataSkins-based ZClasses also
mix in AppTabs[4], which has a get_local_roles_for_user() which tries
a LocalRolesForUser() method if it exists, otherwise falls back to older
means. Finally, you can define LocalRolesForUser to compute local roles
for the accessing user by whatever rules it wants.

[1] People may complain about ZPatterns terminology, but at least we
have the sense not to use the same word for two entirely different
concepts! :-)

[2] And I don't know why you'd care about Ownership for your objects in
this example...  it doesn't seem meaningful for these sorts of non-code
objects.

[3] Actually, maybe you could write SkinScript to provide the _owner
attribute. But see [2]...

[4] Unreleased product, still in some flux.  It mainly provides fancier,
more flexible version of Zope's management tabs, suitable for use in an
application (that is, suitable for exposing to users, not just
developers). It also has some local roles hooks as mentioned.

___
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] Catalog class--does it support boolean queries?

2000-12-14 Thread Marc Conley

I am working on a project which requires the use of the Catalog class 
(versus ZCatalog) for
indexing and querying. I have basic full text indexing and querying working 
correctly but
boolean queries seem not to work. Should boolean queries work using Catalog 
or is it
necessary to use ZCatalog instead to get that functionality?

This is how I am submitting the query to the Catalog object:

results = sdb.cat({"content" : query})

where sdb is a ZODB, cat is the catalog object, and content is the name of 
the full-text index. query is
the query the user typed, which could be

"(apples and oranges) or plums"

(without the quotes) for instance. Thanks in advance for any assistance 
anyone can provide on this question.




___
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] Catalog class--does it support boolean queries?

2000-12-14 Thread Casey Duncan

Marc Conley wrote:
 
 I am working on a project which requires the use of the Catalog class
 (versus ZCatalog) for
 indexing and querying. I have basic full text indexing and querying working
 correctly but
 boolean queries seem not to work. Should boolean queries work using Catalog
 or is it
 necessary to use ZCatalog instead to get that functionality?
 
 This is how I am submitting the query to the Catalog object:
 
 results = sdb.cat({"content" : query})
 
 where sdb is a ZODB, cat is the catalog object, and content is the name of
 the full-text index. query is
 the query the user typed, which could be
 
 "(apples and oranges) or plums"
 
 (without the quotes) for instance. Thanks in advance for any assistance
 anyone can provide on this question.

You should be able to do what you want using just catalog.

If your example query is an example of something you are really using,
try it without parens.

e.g. "apples and oranges or plums"

AFAIK grouping in query strings is not supported.
-- 
| Casey Duncan
| Kaivo, Inc.
| [EMAIL PROTECTED]
`--

___
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] Catalog class--does it support boolean queries?

2000-12-14 Thread Dieter Maurer

Marc Conley writes:
  
  Should boolean queries work using Catalog 
  or is it
  necessary to use ZCatalog instead to get that functionality?
  
ZCatalog is nothing more than a thin wrapper around
Catalog (to make a Catalog a persistent object in ZODB).
All search facilities of ZCatalog are in fact implemented
by Catalog.

This implies: Catalog can do boolean queries.


Note: the catalog has notorious bugs (at least until
Zope 2.2.2). If it does not work, it may be one
of these bugs.


Dieter

___
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] IE5 / Medusa bug?

2000-12-14 Thread seb bacon

Tempting fate by claiming a bug...but although I'm sure I'm at fault
here, there's no sensible reason for the results I'm getting.

When I view one of several different pages with IE5, the last 11 bytes
don't reach the browser.  I've got a couple of other people to try it
out.  One of them reported the same symptoms, the other didn't.  I
don't get it with Netscape.

I'd *really* appreciate it if anyone who has IE5 could have a go at

  http://test.jamkit.com

and let me know (you can tell if the bug's happened if the source ends
abruptly with something like '/ta').

Things I've deduced:

- http://test.jamkit.com/index_html works :S

- It's not related to the bad HTML in that example page (I've tried 
  pages with perfect HTML)

- It's related to how I've built the page (the Zope Welcome screen is
  fine, other pages built using the same product don't work.  The
  product I'm building is a folderish thing with lots of extra 
  navigational services)

- it's always the last 11 bytes that are missing, however large the 
  page is

- I've sent exact copies of the HTTP headers to the server, using
  telnet, and there's no problem there

I imagine the fact that I can make it work by adding index_html is the
most telling point, but it's not telling me anything ;)
 
I'll continue my research by eliminating elements until I've nailed down
exactly the bit that's messing it up.  Right now, though, I have to go
to bed.  Meanwhile, any comments?

Cheers,

seb


___
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] Core Session Tracking Development Release 0.1

2000-12-14 Thread Chris McDonough

Hi,

A development release of the fruits of the "core session tracking" Fishbowl
project
(http://dev.zope.org/Wikis/DevSite/Projects/CoreSessionTracking/FrontPage)
is available at
http://www.zope.org/Members/mcdonc/Products/CoreSessionTracking.  It allows
you to keep state across requests for anonymous users (much like FSSession,
SQLSession, HappySession, etc.), but it is capable of storing sessioning
data in the ZODB or in RAM.

You need to be running a pretty recent Zope 2.2.X to use it.  I've tested it
continually against the current trunk release, and it works against that.

Feedback appreciated!

Thanks,

Chris



___
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] Re: [Zope] IE5 / Medusa bug?

2000-12-14 Thread Evan Simpson

From: seb bacon [EMAIL PROTECTED]
 I imagine the fact that I can make it work by adding index_html is the
 most telling point, but it's not telling me anything ;)

Leaving off index_html causes Zope to add a base href to the head.  That's
the only difference I can think of.  Your page doesn't get cut short in my
IE 5.00.2314.1003 (128 bit encryption).

Cheers,

Evan @ digicool  4-am



___
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, ZClasses, Specialists: Assigning responsibilities

2000-12-14 Thread Itai Tavor

I'm having problems deciding where certain methods should be 
implemented. In some cases it's easy - for example, objects manage 
themselves, Specialists manage collections, so editInstanceForm 
belongs in the ZClass, while listOpenOrders belongs in the 
Specialist. But here are some cases where it's not as clear:

1. I want to edit an object from the editing form of another object. 
So I give my object an editInstanceSnippet method. It's very similar 
to editInstanceForm, except that it's not a full html document. 
Should it go in the ZClass? But it's a method used for application 
integration - so maybe it belongs in the Specialist?

2. In a typical shopping cart application, a Product object will be 
responsible for adding itself to an order, right? So the Product will 
have an addMeToOrderForm, which will call addMeToOrder, which in turn 
will call order.addOrderLineItem method. I think. But here's a 
complication: I have the following ZClasses, with matching 
Specialists: Product, Graphic, Order, OrderLineItem. When a customer 
adds a product to their order, they have to provide a graphic file 
which will be printed on the product (imagine buying a lunch box with 
your cat's photo on it). The Graphics Specialist can provide a 
addGraphicSnippet form. But who's responsible for asking for this 
graphic when adding the product to the order? Is it still the Product 
object? But a Product turns into a Product-with-Graphic only when 
it's a part of an order, so is it correct for the Product to even 
know about Graphics? the alternative is to move the addToOrder 
methods to either Order or OrderLineItems, but this doesn't make any 
more sense because these would then have to know a lot more about a 
Product than is good for them. Any ideas?

TIA

Itai
-- 
Itai Tavor"Je sautille, donc je suis."
C3Works[EMAIL PROTECTED]  - Kermit the Frog

"If you haven't got your health, you haven't got anything"


___
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] keyword indexes

2000-12-14 Thread Josh Zeidner

Hi,

  Currently I am wrestling with "keyword" indexes in ZCatalogs.  How do I
query the ZCatalog for all records of objects indexed on a particular
keyword.  For instance if my index is named MediaKeyword ive tried:

 dtml-in "Catalog.searchResults( MediaKeywords = ['ouch'] )"

   this has completely unpredictable results.

 dtml-in "Catalog.searchResults( MediaKeywords in ['ouch'] )"

   this returns all indexed objects!

  What am I doing wrong?  Is there a special ZCatalog function for querying
keyword indexes?  I need some insight into this problem.

   Thanks!
Josh Zeidner


___
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] more on keyword indexes

2000-12-14 Thread Josh Zeidner

Hello,

  I did a little more investigiation into the problem, and couldnt really
find any documentation anywhere on what the actual semantics are of keywords
and how they are queried.  For instance:

  I have three classes and each has an keyword index named KW:

  ObjectOne:KW = ['one','blue','furry']
  ObjectTwo:KW = ['two','flying','purple']
  ObjectThree:  KW = ['three','one-eyed','purple']

  If I were to query the ZCatalog with the following set of words:
['purple'] I would expect to get:

ObjectTwo
ObjectThree

  Right?  If I query the database with ['one','two'] ( if this type of thing
is at all possible ), I get :

ObjectOne
ObjectTwo

  This seems like the obvious result: BUT: it depends if you want a AND/OR
type search.  I could also expect to get nothing( if its an AND type search
because no records match 'one' and 'two' ).  Here is better example, what if
I queried: ['purple','one-eyed'].  Would I be expecting only ObjectThree or
[ ObjectThree, ObjectTwo ] ( because they both match the keyword purple( a
logical set-intersection ) ).

  Also I found the keyword indexes to have some more obvious bugs.  If I
only used one keyword for the matching critiria,  for instance if I used
'purple' , I would only get ObjectTwo.  Is anyone else using keyword
indexes?  In what way are you using them?


   Thanks,

   Josh Zeidner

   http://www.brooklynmedialabs.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 )




[Zope-dev] urllib not available in Python Scripts?

2000-12-14 Thread Itai Tavor

Hi,

sorry for the recent barrage of posts...

In Python Methods I could do urllib.quote(...). This doesn't work in 
Python Scripts. Is quote considered a security risk?

Itai
-- 
Itai Tavor"Je sautille, donc je suis."
C3Works[EMAIL PROTECTED]  - Kermit the Frog

"If you haven't got your health, you haven't got anything"


___
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] Re: [Zope] IE5 / Medusa bug?

2000-12-14 Thread Jerome Alet

On Thu, 14 Dec 2000, Evan Simpson wrote:

 From: seb bacon [EMAIL PROTECTED]
  I imagine the fact that I can make it work by adding index_html is the
  most telling point, but it's not telling me anything ;)
 
 Leaving off index_html causes Zope to add a base href to the head.  That's

WHOW !

base href is exactly 11 bytes long. Couldn't it be that the
content-length is computed by Zope before you automatically add this tag ? 

just my 0.02 euros

Jerome Alet


___
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] How to debug access denials?

2000-12-14 Thread Stephane Bortzmeyer

I have problem with Zope security model and I would like to know the
best way to debug Zope when access is denied. 

I have two experimental sites: on one of them, anonymous users can go
everywhere. On the other, the permissions *look* exactly the same but
anonymous users can only see the home page and are denied access to
subfolders (more precisely, Zope asks a password). I assume one DTML
method, in the second site, is doing something forbidden (anonymous
has "View" and "Access content information").

Is there a way to get an extended log, such as "anonymous user denied
because index_html called standard_html_header which called getData
and getData is a database connection and they don't have permission to
use database connections"?


___
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 debug access denials?

2000-12-14 Thread Chris Withers

Stephane Bortzmeyer wrote:
 
 Is there a way to get an extended log, such as "anonymous user denied
 because index_html called standard_html_header which called getData
 and getData is a database connection and they don't have permission to
 use database connections"?

If you hit cancel when the dialog box pops up, you'll get an error
message. If you view the HTML source of that error message, there'll be
a python traceback in there which should provide the information you're
looking for...

cheers,

Chris

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




Re: [Zope] How to debug access denials?

2000-12-14 Thread Jerome Alet

On Thu, 14 Dec 2000, Chris Withers wrote:

 Stephane Bortzmeyer wrote:
  
  Is there a way to get an extended log, such as "anonymous user denied
  because index_html called standard_html_header which called getData
  and getData is a database connection and they don't have permission to
  use database connections"?
 
 If you hit cancel when the dialog box pops up, you'll get an error
 message. If you view the HTML source of that error message, there'll be
 a python traceback in there which should provide the information you're
 looking for...

May I add: "... in an incredibly unreadable and hardly understandable
format." ? 

What Stephane asks for would be very nice, IMHO.

bye,

Jerome Alet




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

2000-12-14 Thread Oleg Broytmann

On Wed, 13 Dec 2000, Kevin Teague wrote:
 I use a modified version of this script running on a cron job to update
 the rss channels:

 http://www.zope.org/Members/phd/cron-zope/pack-db_fs

 The script looks like this (it's still kind of hack-ish, but it works
 :). My only problem now is to figure out how to have member preferences
 handle a list of rss channels with the PTK.


 #!/usr/bin/python

 username="kteague"
 password="**"

   RSS Channel does not protect Import, so you don't need user/password, I
think...

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [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] Start with Zope

2000-12-14 Thread Pierrick PONS

Hello,

I'm a newbie with Zope and maybe the question I will pose is really stupid but 
please help me.
I'd like to use Zope with Linux ( I'm under a Debian), I installed Zope but I 
can't start using Zope to make a new web site.
I verified that Zope is running but I don't know how to start this program to 
start building my new web site.
May I have to configure something ? I have read lots of things about Zope but 
I wasn't able to start ... please help me ...

Thanks a lot
I hope you'll help me.


Pierrick


___
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: FTP for ZClass hierarchies

2000-12-14 Thread Andreas Tille

On Thu, 7 Dec 2000, M. Adam Kendall wrote:

 Maybe this could be looked at by the DC folks and included
 in the next test version release of Zope?  Just a thought ;)
That would be really great.  I like to use the Zope-Debian packages
and I don't want to patch and recompile them after every Zope release.
This would be more work then necessary for many people in my opinion.

Kind regards

  Andreas.


___
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] Gopher from Zope

2000-12-14 Thread Tres Seaver

"Dario Lopez-Kästen" [EMAIL PROTECTED] wrote:
 
 I wanna serve gopher:// from Zope :-)
 
 Is it possible?  Don't need answers like "but gopher is old, ugly, etc", "we
 will loose all fomatting, etc", etc.

ZServer (aka medusa) is protocol agnostic;  I would look at the
Request/Responses there, plus their equivalents in
lib/python/ZPublisher, and try to fold in Python's gopherlib
module with them (check out ZServer/medusa/http_server.py, as well).
 
 Thanks,
 
 /dario :))
 
 read all about it:
 gopher://gopher.heatdeath.org/00/the%20gopher%20manifesto.txt

Tres.
-- 
===
Tres Seaver[EMAIL PROTECTED]
Digital Creations "Zope Dealers"   http://www.zope.org

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




Re: [Zope] Start with Zope

2000-12-14 Thread Oleg Broytmann

On Thu, 14 Dec 2000, Pierrick PONS wrote:
 I verified that Zope is running but I don't know how to start this program to
 start building my new web site.

   You don't need to "start" it if it is already running - just connect to
it with your browser. If you installed it with default settings, point your
browser to localhost:8080/manage, enter your superuser password (did you
created one while installing?), login, goto acl_user folder, create a user
with Manager role, stop your browser (close all windows), restart he
browser, goto the same location, enter your manager's password - and viola!
Start creating objects - Folders, DTML Documents and Methods, etc.

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [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 )




Re: [Zope] dtml decimals

2000-12-14 Thread Tres Seaver

Andy McKay [EMAIL PROTECTED] wrote:
 
 dtml-var "3/2" fmt="%.2d" instead of getting 1.50 as I was expecting I get
 1.00, I never seem to be getting decimals. Whats the obivous thing Im
 missing here?

Note the following::

 $ python
 Python 1.5.2 (#1, Feb  1 2000, 16:32:16)  [GCC egcs-2.91.66 1...
 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
  3/2
 1
  3.0/2
 1.5

Python performs integer division when handed integer arguments;
you need::

  dtml-var "3.0/2" fmt="%.2d"

  dtml-var "_.float( x )/2" fmt="%.2d"

or equivalent.

Tres.
--
===
Tres Seaver[EMAIL PROTECTED]
Digital Creations "Zope Dealers"   http://www.zope.org

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




Re: [Zope] Start with Zope

2000-12-14 Thread peter bengtson

To start Zope you do that on the commandline or as a service.
To start _working_ with it you use your webbrowser.
If you installed Zope on port 8080 (most likely I think), go to
127.0.0.1:8080 to see you Zope.
To work with it, you go to 127.0.0.1:8080/manage

If you get into the management interface but have problems with adding stuff
and userrights: Search the mailing list or browse the How-Tos for entries
about SuperUser accounts and Managers.

Have you "read lots of things about Zope"? Nice to hear ;)

Peter

- Original Message -
From: "Pierrick PONS" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 14, 2000 12:43 PM
Subject: [Zope] Start with Zope


 Hello,

 I'm a newbie with Zope and maybe the question I will pose is really stupid
but
 please help me.
 I'd like to use Zope with Linux ( I'm under a Debian), I installed Zope
but I
 can't start using Zope to make a new web site.
 I verified that Zope is running but I don't know how to start this program
to
 start building my new web site.
 May I have to configure something ? I have read lots of things about Zope
but
 I wasn't able to start ... please help me ...

 Thanks a lot
 I hope you'll help me.


 Pierrick


 ___
 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] Start with Zope

2000-12-14 Thread Sebastien Douche

Le Thu, Dec 14, 2000 at 01:20:35PM -, peter bengtson à écrit:
# To start Zope you do that on the commandline or as a service.
# To start _working_ with it you use your webbrowser.
# If you installed Zope on port 8080 (most likely I think), go to

Not with Debian package because port 8080 is already use by wwwofle.
The default port is 9673.


-- 
Sébastien Douche [EMAIL PROTECTED]
French Zopista / www.zope.org

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




[Zope] INTERBASE cannot do this type of query ?

2000-12-14 Thread Francois-regis Chalaoux

Error, Products.gvibDA.gvib.gvibExceptions.ProgrammingError: - Dynamic SQL Error -- 
SQL error code = -206 -- Column
unknown -- MOUSE 

SQL used:

select IND_SPECIE 
from ZEB_INDIVIDU
where IND_SPECIE = "MOUSE"

___
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] HTML formatting from a text field

2000-12-14 Thread Ausum

Thanks to all the people who answered.
I couldn't wait to find the proper product so I went the shorter way.
Being not a developer, I just borrowed the code from this known site,
expecting that you real coders could write a finished Zope product.
My needs were simple: let authorized IE-PC users to paste html-formatted
text when needed and in WYSIWYG mode, while having the webmaster to
pay attention to design and layout using Dreamweaver and Zope.
Here you'll find the sample and the code:

http://www.zope.org/Members/ausum/Html-formatted%20text%20field/

There's a pending job (from the original code) and it is to enable
the insert images and tables feature. 

Regards,


Ausum



David Spencer wrote:
 
 Ausum,
 
 I would suggest going to the website for Lotus Quickplace
 (www.quickplace.com or www.lotus.com) and signing up for a demo account.
 They've got a very simple word processor (bold, italics, a couple of fonts,
 etc.) integrated into their project sites that, I think, does what you're
 describing.  I'm pretty sure everything is accomplished using Javascript.
 If you could port something like this over to zope and release it as a
 product, so that WYSIWYG documents can be created through the web and still
 incorporate standard headers and footers, I would be a very happy man.  I
 dread trying to explain zwiki and structured text to clients.  You might
 also want to look at standardbrains.editthispage.com.  He's got an
 excellent, javascript-based approach to WYSIWYG editing, but you can't save
 it back to the site as far as I can tell.
 
 David
 
 

___
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] INTERBASE cannot do this type of query ?

2000-12-14 Thread Bob Tierney


For chuckles try 'MOUSE' instead of "MOUSE"

Bob


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Francois-regis Chalaoux
Sent: Thursday, December 14, 2000 8:12 AM
To: [EMAIL PROTECTED]
Subject: [Zope] INTERBASE cannot do this type of query ?
Sensitivity: Personal


Error, Products.gvibDA.gvib.gvibExceptions.ProgrammingError: - Dynamic SQL
Error -- SQL error code = -206 -- Column
unknown -- MOUSE

SQL used:

select IND_SPECIE
from ZEB_INDIVIDU
where IND_SPECIE = "MOUSE"

___
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] mySQL DA on Win32

2000-12-14 Thread Lee Reilly CS1997

Hi,

Zope is currently being installed on the Unix machines at my uni but it
won't be available for a while. However, I have set up a mySQL database
in the Dept. and installed Zope on a Dept. machine (Windows 95). I can
only access the database from uni so I must have a database adpater
setup on this machine.

I have seen the mySQL DA on Zope.org but I understand that it "does not
support win32 platforms at this time". I need database access ASAP so
can anyone offer any advice?

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 )




Re: [Zope] Start with Zope

2000-12-14 Thread Pierrick PONS

Sorry for this stupid question !

In fact I have a proxy on my computer that's why it was a little difficult to 
start. I change the port by 9673 on my navigator and it does start 
I 'm confused .


Thanks for all of your replies.


Bye

Pierrick


___
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] site structure

2000-12-14 Thread Nuno Goncalves

Hi !
How can we define a structure for an entire site with Zope ?
for example i want that all the site's pages have a table with 3
colums. it's kind of a template for the web site !

thanks in advance !
best regards,
Nuno


___
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] mySQL DA on Win32

2000-12-14 Thread Phil Harris

Lee,

Have you read the MySQL on Win32 howto?

btw,  give my regards to Duncan. 

Phil
[EMAIL PROTECTED]

- Original Message - 
From: "Lee Reilly CS1997" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 14, 2000 2:46 PM
Subject: [Zope] mySQL DA on Win32


 Hi,
 
 Zope is currently being installed on the Unix machines at my uni but it
 won't be available for a while. However, I have set up a mySQL database
 in the Dept. and installed Zope on a Dept. machine (Windows 95). I can
 only access the database from uni so I must have a database adpater
 setup on this machine.
 
 I have seen the mySQL DA on Zope.org but I understand that it "does not
 support win32 platforms at this time". I need database access ASAP so
 can anyone offer any advice?
 
 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 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] Start with Zope

2000-12-14 Thread Stephane Bortzmeyer

On Thu, Dec 14, 2000 at 01:43:55PM +0100, Pierrick PONS wrote:

 May I have to configure something ? I have read lots of things about Zope but 
 I wasn't able to start ... 

A common problem for us Zope newbies. You read ten times the
documentation and it still does not make sense, you don't grasp the
whole picture, etc. The solution for me was: read it an eleventh time
and everything will become clear. (Asking a few stupid questions on
the list helps, too, if you read the replies.)




___
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] mySQL DA on Win32

2000-12-14 Thread Petter Enholm

 From: "Lee Reilly CS1997" [EMAIL PROTECTED]

 I have seen the mySQL DA on Zope.org but I understand that it "does not
 support win32 platforms at this time". I need database access ASAP so
 can anyone offer any advice?

There is a HOW-TO for this:  How-To: ZMySQLDA on Win32

Search for it on www.zope.org. I run Zope and mySQL (3.23.28-gamma) on
Win95. Advice; download the files as specified in the how-to. I tried to use
the .dll file that we're installed with mySQL  - crashed Python/Zope. Also,
remember to store Python files in correct Python directory if you have
installed more than one version / installation of Python.

Best regards
Petter Enholm
Snapper


___
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 debug access denials?

2000-12-14 Thread Stephane Bortzmeyer

On Thu, Dec 14, 2000 at 12:21:19PM +0100, Jerome Alet wrote:

  a python traceback in there which should provide the information you're
  looking for...

Great, I missed it.
 
 May I add: "... in an incredibly unreadable and hardly understandable
 format." ? 

Indeed. What am I supposed to do with that? Why is the 'title'
property of the object unauthorized? (The object itself is viewable by
Anonymous.)

The relevant line seems to be:

  File /usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py, line 331, in eval
(Object: title != '' and
   AUTHENTICATED_USER.has_permission('View',_.getitem('id',1)))
(Info: title)

and the full traceback is:

  You are not authorized to access emtitle/em.
!--
Traceback (innermost last):
  File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 222, in 
publish_module
  File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 187, in publish
  File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 171, in publish
  File /usr/lib/python1.5/site-packages/ZPublisher/mapply.py, line 160, in mapply
(Object: Map)
  File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 112, in call_object
(Object: Map)
  File /usr/share/zope/lib/python/OFS/DTMLMethod.py, line 172, in __call__
(Object: Map)
  File /usr/lib/python1.5/site-packages/DocumentTemplate/DT_String.py, line 528, in 
__call__
(Object: Map)
  File /usr/lib/python1.5/site-packages/DocumentTemplate/DT_With.py, line 146, in 
render
(Object: aq_parent)
  File /usr/share/zope/lib/python/OFS/DTMLMethod.py, line 168, in __call__
(Object: recurseFolder)
  File /usr/lib/python1.5/site-packages/DocumentTemplate/DT_String.py, line 528, in 
__call__
(Object: recurseFolder)
  File /usr/lib/python1.5/site-packages/DocumentTemplate/DT_In.py, line 691, in 
renderwob
(Object: objectItems(['Folder']))
  File /usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py, line 331, in eval
(Object: title != '' and
   AUTHENTICATED_USER.has_permission('View',_.getitem('id',1)))
(Info: title)
  File /usr/share/zope/lib/python/OFS/DTMLMethod.py, line 194, in validate
(Object: Map)
  File /usr/share/zope/lib/python/AccessControl/SecurityManager.py, line 139, in 
validate
  File /usr/share/zope/lib/python/AccessControl/ZopeSecurityPolicy.py, line 209, in 
validate
Unauthorized: (see above)

--

I had to drop most of my DTML methods for the experimental sites I use
to "sell" Zope to other people, they're too hard to use. DTML methods
brings me back to sendmail.cf editing: great in theory but only a few
people (after an agreement with the devil?) can do what they want with
it.



___
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] mySQL DA on Win32

2000-12-14 Thread Jim Washington

Hi, Lee

I got zope and mysql working together last night on win2k.  I used the
instructions in

http://www.zope.org/Members/philh/mysql

(Thanks, Phil Harris!)

I did have to use the custom dll and pyd mentioned there.

http://www.google.com/search?q=mysql+zope+win32 might have more clues if
this does not meet your needs.  

To answer your next question, 
the connection string is like 'db@host username password'

hth,

-- Jim Washington

Lee Reilly CS1997 wrote:
 
 Hi,
 
 Zope is currently being installed on the Unix machines at my uni but it
 won't be available for a while. However, I have set up a mySQL database
 in the Dept. and installed Zope on a Dept. machine (Windows 95). I can
 only access the database from uni so I must have a database adpater
 setup on this machine.
 
 I have seen the mySQL DA on Zope.org but I understand that it "does not
 support win32 platforms at this time". I need database access ASAP so
 can anyone offer any advice?
 
 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] Adding Users To Acl_users

2000-12-14 Thread Mike Kelland




Is it possible to add users to acl users from a 
form other than that in the acl_users folder? I've tried replicating the form 
within a dtml-with acl_users tag with no luck so far, has anyone actually done 
this and made it work?

Thanks!
Mike Kelland
[EMAIL PROTECTED]



Re: [Zope] site structure

2000-12-14 Thread Nuno Goncalves

 On Thu, 14 Dec 2000, Nuno Goncalves wrote:
  How can we define a structure for an entire site with Zope ?
  for example i want that all the site's pages have a table with 3
  colums. it's kind of a template for the web site !
 
Using standard_html_header and standard_html_footer in every Document on
 your site...
But that way if i want to change the structure, i have to change on every
page.
My ideia was to create a template(3 colums) where i add objects (dtml
documents).
If i want to change the site structure to 2 colums i only change the
template !

Nuno

 
 Oleg.
 
  Oleg Broytmann http://www.zope.org/Members/phd/ [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 )




Re: [Zope] site structure (fwd)

2000-12-14 Thread Oleg Broytmann

 Using standard_html_header and standard_html_footer in every Document on
  your site...
 But that way if i want to change the structure, i have to change on every
 page.

   No, you only need to change 2 places: standard_html_header and
standard_html_footer :) All Documents that use these header/footer will be
rendered using new structure.

Oleg.

 Oleg Broytmannhttp://phd.pp.ru/[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 )




RE: [Zope] Adding Users To Acl_users

2000-12-14 Thread Steve Drees

 Is it possible to add users to acl users from a form other than that in
the acl_users folder?
 I've tried replicating the form within a dtml-with acl_users tag with no
luck so far, has
 anyone actually done this and made it work?

dtml-call "REQUEST.set('name','bill')"
dtml-call "REQUEST.set('password','mypassword')"
dtml-call "REQUEST.set('confirm','mypassword')"
dtml-call "REQUEST.set('roles',['RegisteredUser'])"
dtml-call "acl_users.manage_users('Add',REQUEST,RESPONSE)"

Creates a user bill with password mypassword and role of RegisteredUser


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




[Zope] HELP with Postgress!! HELP!!

2000-12-14 Thread Paolo Quaglia



Hi 

I m trying to setup 
a linux box (Redhat 6.1) with PostGress 6.5 
What DA shall I 
use?

I have tried the 
ZPyGreSQLDA-0.3-rjr2.tar.gz, but the product result BROKEN 
PRODUCT!!

I have tried some 
ZPopyDA but some error occours
How Can I Install a 
decent PostGress SQL DA?

I thank you VERY 
Much
Paolo Quaglia


[Zope] Difference between Methods and Scripts?

2000-12-14 Thread Hamish Lawson

I see that the latest version of the O'Reilly Zope book now talks about
Python and Perl *Scripts*, but refers still to DTML and ZSQL *Methods*.
Does this reflect some actual conceptual difference between a Script
and a Method, or is it simply because of the burden of also renaming
DTML, ZSQL, etc?

I understand that it is recommended that logic be implemented using
Python/Perl Scripts, while DTML Methods should now be reserved for
presentation; but I wasn't sure if that could be the rationale for the
Scripts/Methods division, since ZSQL Methods don't really fall into the
presentation category.

If the difference is explained in the book, please excuse my having
missed it; if not, I'd welcome an explanation, and perhaps it would be
worthwhile including it in the book too.

Hamish Lawson


=
Hamish Lawson  [EMAIL PROTECTED]


Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

___
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] Adding Users To Acl_users

2000-12-14 Thread Mike Kelland

Perfect, thank you so much!

Mike Kelland - slowly getting the hang of this whole Zope thing...
[EMAIL PROTECTED]
- Original Message -
From: "Steve Drees" [EMAIL PROTECTED]
To: "Mike Kelland" [EMAIL PROTECTED]
Cc: "Zope@Zope. Org" [EMAIL PROTECTED]
Sent: Thursday, December 14, 2000 11:35 AM
Subject: RE: [Zope] Adding Users To Acl_users


  Is it possible to add users to acl users from a form other than that in
 the acl_users folder?
  I've tried replicating the form within a dtml-with acl_users tag with no
 luck so far, has
  anyone actually done this and made it work?

 dtml-call "REQUEST.set('name','bill')"
 dtml-call "REQUEST.set('password','mypassword')"
 dtml-call "REQUEST.set('confirm','mypassword')"
 dtml-call "REQUEST.set('roles',['RegisteredUser'])"
 dtml-call "acl_users.manage_users('Add',REQUEST,RESPONSE)"

 Creates a user bill with password mypassword and role of RegisteredUser


 ___
 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] site structure (fwd)

2000-12-14 Thread Max M

From: Oleg Broytmann

 But that way if i want to change the structure, i have to change on every
 page.

   No, you only need to change 2 places: standard_html_header and
standard_html_footer :) All Documents that use these header/footer will be
rendered using new structure.

I think you misunderstand him. He is actually right.

Some things are pretty hard to do in zope, because of the header/footer
principle.

Making a global look to a site can be pretty difficult if it doesn't fit
nicely into a header/footer structure, with a main area being the pages'
unique content.

If I where to do it in regular Python I would use special classes for
special layouts. That is hard to do in Zope.

Regards maxm

Max M. W. Rasmussen,Denmark.   New Media Director
private: [EMAIL PROTECTED] work: [EMAIL PROTECTED]
-
Specialization is for insects.  -  Robert A. Heinlein


___
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] site structure (fwd)

2000-12-14 Thread Oleg Broytmann

On Thu, 14 Dec 2000, Max M wrote:
 If I where to do it in regular Python I would use special classes for
 special layouts. That is hard to do in Zope.

   Why hard? Not hard at all - develop your own set of classes, make it
into a Product, and use instance of these classes instead of DTML
Documents. Actually, there is nothing special in DTML Documents - they are
instances of DTMLDocument class, nothing more. Creating your own type of
document is not harder, IMHO.

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [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 )




Re: [Zope] HELP with Postgress!! HELP!!

2000-12-14 Thread Oleg Broytmann

On Thu, 14 Dec 2000, Paolo Quaglia wrote:
 I have tried the ZPyGreSQLDA-0.3-rjr2.tar.gz, but the product result BROKEN
 PRODUCT!!

   Instead of asking for free HELP!!! you'd better try to fix the broken
product; after all, it is free software, do it yourself or hire someone.

   Go to Control Panel and click on this broken product. Now see a
traceback. Look what is wrong and fix the problem. Restart Zope. Use th DA.

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [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 )




RE: [Zope] mySQL DA on Win32

2000-12-14 Thread sean . upton

Couldn't one just use MyODBC and the ODBC DA?  What disadvantages (besides
latency from yet another API to go through) are there to this approach?

Sean

___
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] Difference between Methods and Scripts?

2000-12-14 Thread Evan Simpson

From: Hamish Lawson [EMAIL PROTECTED]
 I see that the latest version of the O'Reilly Zope book now talks about
 Python and Perl *Scripts*, but refers still to DTML and ZSQL *Methods*.
 Does this reflect some actual conceptual difference between a Script
 and a Method, or is it simply because of the burden of also renaming
 DTML, ZSQL, etc?

DTML and ZSQL Methods (and the older Python Methods) act as though they are
bound methods of the object on which they are called.  Python Scripts aren't
bound to any particular object, although they have access to their context,
their container, and their selves.  There could be a future class of DTML or
ZSQL objects that behave this way, but they would probably be better named
Templates than Scripts.

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] Difference between Methods and Scripts?

2000-12-14 Thread jpenny

On Thu, Dec 14, 2000 at 04:56:15PM +, Hamish Lawson wrote:
 I see that the latest version of the O'Reilly Zope book now talks about
 Python and Perl *Scripts*, but refers still to DTML and ZSQL *Methods*.
 Does this reflect some actual conceptual difference between a Script
 and a Method, or is it simply because of the burden of also renaming
 DTML, ZSQL, etc?
 
 I understand that it is recommended that logic be implemented using
 Python/Perl Scripts, while DTML Methods should now be reserved for
 presentation; but I wasn't sure if that could be the rationale for the
 Scripts/Methods division, since ZSQL Methods don't really fall into the
 presentation category.
 
 Hamish Lawson
 

The whole renaming mess has been unpleasant.

The real problem is that method has a technical meaning in Python
(and perl) that predate any usage in Zope.
It happens that Python Methods do not have the same properties as
methods in Python.  This was felt to be too confusing.

But, Methods do not have any technical meaning in SQL, or in DTML.
So, it was felt that there was no large gain and much potential 
confusion in renaming something that people had been using for
some time only to make it analogous to the renamed Python Method.

I still want to see a thingy patch applied!
Long live Python Thingies!

 
 =
 Hamish Lawson  [EMAIL PROTECTED]
 
 
 Do You Yahoo!?
 Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
 or your free @yahoo.ie address at http://mail.yahoo.ie
 
 ___
 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] site structure (fwd)

2000-12-14 Thread Stephane Bortzmeyer

On Thu, Dec 14, 2000 at 06:25:19PM +0100, Max M wrote:

 Some things are pretty hard to do in zope, because of the header/footer
 principle.
 
 Making a global look to a site can be pretty difficult if it doesn't fit
 nicely into a header/footer structure, with a main area being the pages'
 unique content.

Although I agree that Zope misses real templates (like in M4 or, to
take a more Web-centric example, in WML
http://www.engelschall.com/sw/wml/, there are several workarounds:

1) if you need "standard" elements between header and footer, a bit of
  discipline from the page authors (which can be helped by tools like
  HTML-kit, where you can define a template for the new and empty
  page):

  dtml-var header
  ... Content here
  dtml-var inbetween
  .. More content here
  dtml-var footer

2) DTML methods allow you to replace a lot of what would be
   document-specific elements (such as context-dependant navigation
   bars), helping to stay in the header/footer paradigm. On the other
   hand, they are very complicated to use properly.


___
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] Installing a DA for PostgreSQL (RedHat)

2000-12-14 Thread Stephane Bortzmeyer

[Stupid subject changed.]

On Thu, Dec 14, 2000 at 05:46:09PM +0100, Paolo Quaglia wrote:

 I m trying to setup a linux box (Redhat 6.1) with PostGress 6.5
 What DA shall I use?

On a RedHat 6.2 (BTW, 6.1 has several known security bugs, be careful
if you have a direct link to the Internet), with PostgreSQL 6.5.3, I
have ZPoPy and it works fine (I use it only for light tasks).
 
 I have tried the ZPyGreSQLDA-0.3-rjr2.tar.gz, but the product result BROKEN
 PRODUCT!!

You have to install the Python interface, not only the Zope product. 
 
 I have tried some ZPopyDA but some error occours

Difficult to help without more details :-)

Remember to install both the Zope product (ZPoPy) and the Python
adapter (PoPy). AFAIK, there is no RPM :-( To compile PoPy, you need
the postgresql-devel package. Give the traceback (in the Products
Management window) if there is an error in Zope. Or use a Debian :-)





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




Re: [Zope] HELP with Postgress!! HELP!!

2000-12-14 Thread César A. K. Grossmann

 Paolo Quaglia wrote:
 
 I have tried the ZPyGreSQLDA-0.3-rjr2.tar.gz, but the product result
 BROKEN PRODUCT!!

Did you have compiled it?

[]s
-- 
 +-+-+
 | César A. K. Grossmann   | Capacitação Solidária   |
 | [EMAIL PROTECTED]| http://www.uol.com.br/umminuto/ |
 | http://members.xoom.com/ckant/  | Clique e doe - é de graça   |
 +-+-+
   http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html
  A ética do iG: http://antispambr.abranetrj.org.br/not-20001023.html

All is well that ends well.
-- John Heywood

___
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] site structure (fwd)

2000-12-14 Thread Nuno Goncalves

i see !!!
i have just found a package ZopeFish that has ZFSuite.
ZFSuite has an object (ZF document template) that 
defines a layout and structure for the entire site.

More info at
http://www.zope.org/WikiCentral/ZFWiki

still
i installed it (it is a bunch of libs) but i haven't tested it !

if i get it work i will tell you 

thanks


On Thu, 14 Dec 2000, Max M wrote:

 From: Oleg Broytmann
 
  But that way if i want to change the structure, i have to change on every
  page.
 
No, you only need to change 2 places: standard_html_header and
 standard_html_footer :) All Documents that use these header/footer will be
 rendered using new structure.
 
 I think you misunderstand him. He is actually right.
 
 Some things are pretty hard to do in zope, because of the header/footer
 principle.
 
 Making a global look to a site can be pretty difficult if it doesn't fit
 nicely into a header/footer structure, with a main area being the pages'
 unique content.
 
 If I where to do it in regular Python I would use special classes for
 special layouts. That is hard to do in Zope.
 
 Regards maxm
 
 Max M. W. Rasmussen,Denmark.   New Media Director
 private: [EMAIL PROTECTED] work: [EMAIL PROTECTED]
 -
 Specialization is for insects.  -  Robert A. Heinlein
 
 
 ___
 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] mySQL DA on Win32

2000-12-14 Thread Lloyd Kvam

I came across links that recommended recompiling both MySQL and the MySQL DA.  I
did so without too much difficuly.  The batch compile scripts did not work, but
compiling through the MicroSoft IDE did work.  The source code I pulled down
required the Microsoft compiler, not gcc++.

I still have the download files.  I could also send you the results of my
compilations.  I do not remember the URL's I used to get these files, but it was
probably through the mysql web site.

Lee Reilly CS1997 wrote:

 Hi,

 Zope is currently being installed on the Unix machines at my uni but it
 won't be available for a while. However, I have set up a mySQL database
 in the Dept. and installed Zope on a Dept. machine (Windows 95). I can
 only access the database from uni so I must have a database adpater
 setup on this machine.

 I have seen the mySQL DA on Zope.org but I understand that it "does not
 support win32 platforms at this time". I need database access ASAP so
 can anyone offer any advice?

 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 )

--
Lloyd Kvam
Venix Corp.
1 Court Street, Suite 378
Lebanon, NH 03766-1358

voice: 603-443-6155
fax: 801-459-9582



___
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] Difference between Methods and Scripts?

2000-12-14 Thread Hamish Lawson

I wrote:

 Does this reflect some actual conceptual difference between a
 Script and a Method

Evan wrote:

 DTML and ZSQL Methods (and the older Python Methods) act as though
 they are bound methods of the object on which they are called.  
 Python Scripts aren't bound to any particular object, although they 
 have access to their context, their container, and their selves.

Thanks for the explanation. I'm glad there is indeed a conceptual
rationale behind the names.

Hamish Lawson


=
Hamish Lawson  [EMAIL PROTECTED]


Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

___
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] site structure (fwd)

2000-12-14 Thread Nuno Goncalves

On Thu, 14 Dec 2000, Oleg Broytmann wrote:

 On Thu, 14 Dec 2000, Max M wrote:
  If I where to do it in regular Python I would use special classes for
  special layouts. That is hard to do in Zope.
 
Why hard? Not hard at all - develop your own set of classes, make it
 into a Product, and use instance of these classes instead of DTML
 Documents. Actually, there is nothing special in DTML Documents - they are
 instances of DTMLDocument class, nothing more. Creating your own type of
 document is not harder, IMHO.

I was thinking about that to !
But how could you build a page with the template developed ??
something like:
dtml var template(COMPONENTS LIKE HEADER AND FOOTER AS ARGUMENTS)
and how can you generelize the objects to beeing used by the template ?


 
 Oleg.
 
  Oleg Broytmann http://www.zope.org/Members/phd/ [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] HELP with Postgress!! HELP!!

2000-12-14 Thread Paolo Quaglia

Thank you very much to all for the quick replies.
I'm fighting compiling the modules ... and trying to solve the prob

I'll let you know ... :)

Ciao

Paolo Quaglia

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of César A. K. Grossmann
 Sent: Thursday, December 14, 2000 6:49 PM
 To: Paolo Quaglia
 Cc: [EMAIL PROTECTED]
 Subject: Re: [Zope] HELP with Postgress!! HELP!!


  Paolo Quaglia wrote:
 
  I have tried the ZPyGreSQLDA-0.3-rjr2.tar.gz, but the product result
  BROKEN PRODUCT!!

 Did you have compiled it?

 []s
 --
  +-+-+
  | César A. K. Grossmann   | Capacitação Solidária   |
  | [EMAIL PROTECTED]| http://www.uol.com.br/umminuto/ |
  | http://members.xoom.com/ckant/  | Clique e doe - é de graça   |
  +-+-+
http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html
   A ética do iG: http://antispambr.abranetrj.org.br/not-20001023.html

 All is well that ends well.
   -- John Heywood





___
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] INTEGER manipulation with INTERBASE

2000-12-14 Thread Francois-regis Chalaoux

Hi,

When I query  my db with gvib adaptator I obtain integer value as 1L, 2L !!!
I would like to query the same db with these resulting previous integer but 1L or 2L 
are not understood by an interbase db.

Any solution to transform these strings in integer on the fly or others propositions ?

FR

___
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] INTERBASE cannot do this type of query ?

2000-12-14 Thread Jan H. Haul

Francois-regis Chalaoux wrote:

 Error, Products.gvibDA.gvib.gvibExceptions.ProgrammingError: - Dynamic SQL Error -- 
SQL error code = -206 -- Column
 unknown -- MOUSE
 
 SQL used:
 
 select IND_SPECIE
 from ZEB_INDIVIDU
 where IND_SPECIE = "MOUSE"

Use single quotes around 'MOUSE'.

In SQL, single qoutes are for string literals, double quotes for
column names (there are people who think spaces in column names
or mixed lower/upper case column names are neat NOT).

Jan

___
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] site structure (fwd)

2000-12-14 Thread Oleg Broytmann

On Thu, 14 Dec 2000, Nuno Goncalves wrote:
 Why hard? Not hard at all - develop your own set of classes, make it
  into a Product, and use instance of these classes instead of DTML
  Documents. Actually, there is nothing special in DTML Documents - they are
  instances of DTMLDocument class, nothing more. Creating your own type of
  document is not harder, IMHO.

 I was thinking about that to !
 But how could you build a page with the template developed ??
 something like:
 dtml var template(COMPONENTS LIKE HEADER AND FOOTER AS ARGUMENTS)
 and how can you generelize the objects to beeing used by the template ?

   No, no, no! :)
   You misunderstand how the Zope works. You think that basic building
block is a piece of HTML (probably you think to put it into DTML
Documents). No. In Zope basic building block is "instance of some python
class". A DTML Document is an instance of DTMLDocument class, e.g.
   If you develop your own set of classes, you'll just build Zope sites
creating instances of these classes - you put HTML fragmenst just into
these instances. Zope will call your objects, you don't need to use DTML to
call them.

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [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 )




RE: [Zope] site structure (fwd)

2000-12-14 Thread Nuno Goncalves

  But how could you build a page with the template developed ??
  something like:
  dtml var template(COMPONENTS LIKE HEADER AND FOOTER AS ARGUMENTS)
  and how can you generelize the objects to beeing used by the template ?
 
No, no, no! :)
You misunderstand how the Zope works. You think that basic building
 block is a piece of HTML (probably you think to put it into DTML
 Documents). No. In Zope basic building block is "instance of some python
 class". A DTML Document is an instance of DTMLDocument class, e.g.
If you develop your own set of classes, you'll just build Zope sites
 creating instances of these classes - you put HTML fragmenst just into
 these instances. Zope will call your objects, you don't need to use DTML to
 call them.

humm !!! I see now !!
So i can have a general structure for all my site and when create a
page, specifying the template to use and consequently adding the objects
that i want ??

Nuno

 
 Oleg.
 
  Oleg Broytmann http://www.zope.org/Members/phd/ [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 )




Re: [Zope] site structure

2000-12-14 Thread Jan H. Haul

Nuno Goncalves wrote:
 
  On Thu, 14 Dec 2000, Nuno Goncalves wrote:
   How can we define a structure for an entire site with Zope ?
   for example i want that all the site's pages have a table with 3
   colums. it's kind of a template for the web site !
 
 Using standard_html_header and standard_html_footer in every Document on
  your site...
 But that way if i want to change the structure, i have to change on every
 page.
 My ideia was to create a template(3 colums) where i add objects (dtml
 documents).
 If i want to change the site structure to 2 colums i only change the
 template !
 
 Nuno
 

That is *exactly* what standard_dtml_header and ...footer are
for.
Together, they *are* your template.

You *include* these in every document (using the dtml-var
standard... tag. They'll show up in your documents at run time.

Put the default template into the root folder and all your DTML
documents will acquire it. In a sub-folder, you can either do
nothing (then the acquired header and footer will be used), or
override these with a folder-specicic template.

See the Zope book, it explains it pretty well.

Jan

___
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] site structure (fwd)

2000-12-14 Thread sean . upton

You may also want to take a look at HiperDOM as a templating mechanism as
well.  I haven't used it, but in looking at the Wiki and the examples, it
looks like it would do what you are looking for, and from all accounts I
have read, this will be the "official" Zope replacement for DTML for
presentation logic in the future (relegating DTML for logic use, along with
Perl and Python methods), and has a lot of cool features that allow you to
create a template with mockup data that actually renders your presentation,
replacing the mockup.

http://www.zope.org/Members/lalo/HiperDom

I'm working on a content-management project in which I am just starting to
do real user interface work, and I am likely going to try switching over
most of the presentation from DTML to HiperDOM.  Anyway, creating valid
XHTML documents for templates is an exciting idea, especially in the sense
that this decreases the learning curve for a designer needing to work on
presentation, but not logic - that is a definite need in my organization.

Cheers,
Sean

-Original Message-
From: Nuno Goncalves [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 14, 2000 9:51 AM
To: Max M
Cc: [EMAIL PROTECTED]; Zope@Zope. Org
Subject: RE: [Zope] site structure (fwd)


i see !!!
i have just found a package ZopeFish that has ZFSuite.
ZFSuite has an object (ZF document template) that 
defines a layout and structure for the entire site.

More info at
http://www.zope.org/WikiCentral/ZFWiki

still
i installed it (it is a bunch of libs) but i haven't tested it !

if i get it work i will tell you 

thanks


On Thu, 14 Dec 2000, Max M wrote:

 From: Oleg Broytmann
 
  But that way if i want to change the structure, i have to change on
every
  page.
 
No, you only need to change 2 places: standard_html_header and
 standard_html_footer :) All Documents that use these header/footer will
be
 rendered using new structure.
 
 I think you misunderstand him. He is actually right.
 
 Some things are pretty hard to do in zope, because of the header/footer
 principle.
 
 Making a global look to a site can be pretty difficult if it doesn't fit
 nicely into a header/footer structure, with a main area being the pages'
 unique content.
 
 If I where to do it in regular Python I would use special classes for
 special layouts. That is hard to do in Zope.
 
 Regards maxm
 
 Max M. W. Rasmussen,Denmark.   New Media Director
 private: [EMAIL PROTECTED] work: [EMAIL PROTECTED]
 -
 Specialization is for insects.  -  Robert A. Heinlein
 
 
 ___
 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 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] site structure (fwd)

2000-12-14 Thread Oleg Broytmann

On Thu, 14 Dec 2000, Nuno Goncalves wrote:
 humm !!! I see now !!
 So i can have a general structure for all my site and when create a
 page, specifying the template to use and consequently adding the objects
 that i want ??

   No, you should separate design (template) and content. Actually, it is
possible even without creating a python product - you put content (HTML
fragments) into small DTML Documents, and define design (template) using
DTML Methods - standard_html_header/footer and other methods, your custom
methods.

   Think, for example, you want to create a site with the following design:

-
 | ||
left | CONTENT1| right  |
column   | | column |
 | special ||
 | fature  ||
 | ||
 | CONTENT2||
 | ||
-

   Easy! (Thanks, Zope! :)

   You define "left column" in standard_html_header, "right column" in
standard_html_footer, in every folder put two pieces of content and feature
into 3 DTML Documents, and call these Documents again from
standard_html_header (or DTML Methods that will be called from
standard_html_header).

   In outline, your standard_html_header will looks like the following:

HTMLHEADTITLEdtml-var title_or_id/TITLE/HEAD
tabledtml-commentI'll skip most HTML-related things like tr td etc/dtml-comment
   dtml-var left-column

   dtml-var CONTENT1

   dtml-var feature

   dtml-var CONTENT2

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [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 )




Re: [Zope] ZWiki hierarchy seems to be brokenZope Folk zope@zope.org

2000-12-14 Thread Dieter Maurer

Timothy Grant writes:
  However, I seem to have done something somewhere that is preventing the
  hierarchy headers from showing up on many of the pages. It shows on the
  first page, and it still shows on all the help pages, but it has disappeared
  from the pages that I have been adding (They were there for a while).
Are you sure, that you Wiki Pages have correct "parent" properties?



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

2000-12-14 Thread Oleg Broytmann

On Thu, 14 Dec 2000, Andy McKay wrote:
 Actually I went one further and hacked SiteSummary so that it remembered the
 url the rss is located at (rss_url). Then I wrote a quick reload method.
 Then in dtml I wrote a method that finds all the site summaries and reloads
 them. So my python script is down to two lines:

 import urllib
 print urllib.urlopen(/reload)

 Or something like that. It also means anyone can add news feeds on the fly,

   Send your patches to RSS Channel author!

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [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 )




Re: [Zope] Problem on running the ZOPE by using ZmySQLDA

2000-12-14 Thread Dieter Maurer

Angietel writes:
  Finally my ZOPE is connected to MySQL succesfully, i can insert, delete =
  the record,but i can not search and view my record in ZOPE. When i go to =
  MySQL it can shows all my database records after my modification in =
  ZOPE. Every time when i want to search or view my records it will promt =
  out the illegal operation message in ZOPE and my pyhon will be exactly =
  look like this:-
  
  
  2000-12-13T08:34:28 PROBLEM(100) ZServer Computing default hostname
  --
  2000-12-13T08:34:31 INFO(0) ZServer Medusa (V1.16.4.2) started at Wed =
Your Zope died.
Must be something wrong in an C extension module,
probably the MySQL connector.

I would try to get a core ("limit", "ulimit" commands) and
then look with a debugger into it.


Dieter

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




[Zope] Build a website

2000-12-14 Thread Pierrick PONS

Hello again,

I have another question: my aim is to build a web site (using Zope) to put it 
at my Internet Provider 's .

Would it be possible with Zope or maybe Zope is not the good application to do 
so ?
I've heard about arena, bluefish 

Thanks a lot

Pierrick



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

2000-12-14 Thread Andy McKay

Will do once I fix the bugs in the patches :)
--
  Andy McKay, Developer.
  ActiveState.

- Original Message -
From: "Oleg Broytmann" [EMAIL PROTECTED]
To: "Andy McKay" [EMAIL PROTECTED]
Cc: "Zope Mailing List" [EMAIL PROTECTED]
Sent: Thursday, December 14, 2000 10:33 AM
Subject: Re: [Zope] rss


 On Thu, 14 Dec 2000, Andy McKay wrote:
  Actually I went one further and hacked SiteSummary so that it remembered
the
  url the rss is located at (rss_url). Then I wrote a quick reload method.
  Then in dtml I wrote a method that finds all the site summaries and
reloads
  them. So my python script is down to two lines:
 
  import urllib
  print urllib.urlopen(/reload)
 
  Or something like that. It also means anyone can add news feeds on the
fly,

Send your patches to RSS Channel author!

 Oleg.
 
  Oleg Broytmann http://www.zope.org/Members/phd/ [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] site structure (fwd)

2000-12-14 Thread sean . upton

Getting fairly familiarized with namespaces and acquisition is going to be
useful here.

You actually will need to do 2 templates (one for the footer, and one for
the header) in the case of writing a "wrapper."   That said, objects in Zope
(like a document, in this case) behave based upon their context or
environment.  A DTML document, when it is told to render something with
dtml-var name="foo" looks for foo in it's current namespace (i.e. the
folder it is in), and if it doesn't find it, it then works its way upward
(by looking in the namespace of the folder that is the parent of the folder
it just looked in before).  When it finds foo, it renders that method (or if
foo is an attribute, it renders its value).  

Let us suppose that your document is called bar, and looks like this:
htmlbody
 dtml-var name="foo"
/body/html

bar is in a folder hierarchy that looks like this (using URL syntax)

http://mysite.com/folder1/subfolder/bar

bar would first look for foo as an attribute of it's own namespace (i.e. it
would look to see if you defined a custom property called foo in the
properties of the document).  If it found it, it would render it, but let's
suppose that it does not find it, so it has to look in another namespace.

So, it moves up to the next namespace (subfolder) looking for foo, as either
a method of that folder or a data member (attribute).  If it finds it, it
renders it.  If not, it moves up to folder1 as the next namespace, and
perhaps that is where it finds foo; in that case it renders foo.  Seems
rather simple, and in some cases it is, but what if foo is a dtml method and
looks like the following?

h1Title:dtml-var title/h1

Where does foo look for title? Not in folder1, where foo resides, but in in
bar's namespace, and indeed, since dtml documents have a title attribute,
that will be rendered.  If, instead of title, we had an attribute named
something like "what" but there was no attribute named "what" in bar, it
would look through the namespace stack (starting with the namespaces of bar,
then subfolder then folder1, then the root folder, etc), until it found what
it was looking for.

This, I hope, explains acquisition well.  If you were to apply this to
templating strategies, you would realize, that (as long as you kept
standard_html_header and standard_html_footer in sync) that you could do
some powerful things with your site navigation.  Consider the following
example:

Suppose you have a sports news site, and you publish stories about baseball,
football, and basketball.  In the upper right hand-corner of your document
(i.e. in the header portion) you have an 32x32 icon image that is a picture
of a football, basketball, and baseball, respectively.  Otherwise, you
wanted to use the same template for all of the documents.  

Suppose that you have a folder structure like this:
-/
   -basketball
   -baseball
   -football

In this case, you could have a standard_html_header in the root folder /
that creates the top portion of your document, so you only have to use one
template, and that the template might have code that looks like this:

!--html here--
dtml-var name="sports-icon.gif"
!--more html here--

In this case, you could have an image in each folder (basketball, football,
baseball) containing an appropriate image with the id of sports-icon.gif.
This is useful, because now, one template is rendering sports news stories
different folders differently, depending upon the context of the folder they
are contained in.  

In this simple example, you don't even need to create a different
standard_html_header for every folder to create different results, but can
rely upon Zope's built-in acquisition smarts to work for you.  Applying this
in practice, takes some playing around with, but once you get a clear idea
of applying this, you can create some very intelligent standard_html_headers
that do a lot of work for you.

Hope this helps,

Sean

-Original Message-
From: Nuno Goncalves [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 14, 2000 10:19 AM
To: Oleg Broytmann
Cc: Max M; Zope@Zope. Org
Subject: RE: [Zope] site structure (fwd)


  But how could you build a page with the template developed ??
  something like:
  dtml var template(COMPONENTS LIKE HEADER AND FOOTER AS ARGUMENTS)
  and how can you generelize the objects to beeing used by the template ?
 
No, no, no! :)
You misunderstand how the Zope works. You think that basic building
 block is a piece of HTML (probably you think to put it into DTML
 Documents). No. In Zope basic building block is "instance of some python
 class". A DTML Document is an instance of DTMLDocument class, e.g.
If you develop your own set of classes, you'll just build Zope sites
 creating instances of these classes - you put HTML fragmenst just into
 these instances. Zope will call your objects, you don't need to use DTML
to
 call them.

humm !!! I see now !!
So i can have a general structure for all my site and when create a
page, specifying 

RE: [Zope] site structure

2000-12-14 Thread Farrell, Troy

If you are like me, you like to keep your standard_html_[header,footer]
fairly stock.  I have started including dtml-method components in my pages
like this:

dtml-var name="standard_html_header"
dtml-var name="top_navbar"
*CONTENT HERE*
dtml-var name="bottom_navbar"
dtml-var name="standard_html_footer"

Though, I have a difficult situation:  If I understand correctly, definition
of JavaScript functions belongs in the head tags.  Does anyone know how to
do this?

Troy

-Original Message-
From: Jan H. Haul [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 14, 2000 12:17 PM
To: Nuno Goncalves
Cc: Oleg Broytmann; [EMAIL PROTECTED]
Subject: Re: [Zope] site structure


Nuno Goncalves wrote:
 
  On Thu, 14 Dec 2000, Nuno Goncalves wrote:
   How can we define a structure for an entire site with Zope ?
   for example i want that all the site's pages have a table with 3
   colums. it's kind of a template for the web site !
 
 Using standard_html_header and standard_html_footer in every Document
on
  your site...
 But that way if i want to change the structure, i have to change on every
 page.
 My ideia was to create a template(3 colums) where i add objects (dtml
 documents).
 If i want to change the site structure to 2 colums i only change the
 template !
 
 Nuno
 

That is *exactly* what standard_dtml_header and ...footer are
for.
Together, they *are* your template.

You *include* these in every document (using the dtml-var
standard... tag. They'll show up in your documents at run time.

Put the default template into the root folder and all your DTML
documents will acquire it. In a sub-folder, you can either do
nothing (then the acquired header and footer will be used), or
override these with a folder-specicic template.

See the Zope book, it explains it pretty well.

Jan

___
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] Windows NT, Zope, PostgreSQL, PoPy, and ZPoPyDA

2000-12-14 Thread Farrell, Troy

Right now, I have PostgreSQL 7.0.3 on Cygwin:

$ uname -a
CYGWIN_NT-4.0 hostname 1.1.6(0.30/3/2) 2000-11-21 21:00 i686 unknown

I followed the instructions found here:
http://people.freebsd.org/~kevlo/postgres/portNT.html

I haven't bothered with PoPy yet, but using the --with-odbc option seems to
work.  I am using the PostgreSQL 6.5 ODBC driver and am using ZODBCDA to
connect to PGSQL over ODBC.  I will keep you posted as I progress.

Troy

___
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] site structure

2000-12-14 Thread Bill Welch

Well, just put them there. The head section is in standard_html_header,
open it up and add your script section.

Bill.

On Thu, 14 Dec 2000, Farrell, Troy wrote:
 Though, I have a difficult situation:  If I understand correctly, definition
 of JavaScript functions belongs in the head tags.  Does anyone know how to
 do this?


___
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] Object adding strangeness

2000-12-14 Thread Dieter Maurer

Geoffrey L. Wright writes:
  So I've created a simple little product to dynamically manage CSS.  It
  consists of three ZClasses and the arrangement looks something like
  this:
   
 STYLEn_containerClass
   \
\-- STYLEn_styleClass
\
 \-- STYLEn_stylePropertyClass
   
   creating "STYLEn_stylePropertyClass" instance overwrite
   "title" property of folder (containing STYLEn_containerClass instance)
  .

  ..
  dtml-with "STYLEn_stylePropertyClass.createInObjectManager('color', REQUEST)"
dtml-call "REQUEST.set('value','#00')"
dtml-call 
 "propertysheets.STYLEn_stylePropertyClassPropertySheet.manage_editProperties(REQUEST)"
dtml-call "manage_editProperties(REQUEST)"
  /dtml-with
  .

I expect the "manage_editProperties" is the culprit.
I further expect that neither of your classes has
a "manage_editProperties". Therefore, the
"manage_editProperties" of the enclosing folder is
acquired. It changes the properties of this folder.


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] site structure

2000-12-14 Thread Max M

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Farrell, Troy

Though, I have a difficult situation:  If I understand correctly,
definition
of JavaScript functions belongs in the head tags.  Does anyone know how
to
do this?

Just pop in them old:

script language="JavaScript"
!--
function allwaysTrue(){return 1;}
--
/script

anywhere on your page. Makes no difference.

or you could:

head
titleWhat goes here/title
dtml-var header_script missing
/head

And then just make shure that your "header_script" method doesn't do any
funny business through aquisition. ie. you should put an empty
"header_script" method if needed.

Regards Max M


___
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 debug access denials?

2000-12-14 Thread Dieter Maurer

Stephane Bortzmeyer writes:
  I have problem with Zope security model and I would like to know the
  best way to debug Zope when access is denied. 
  
  I have two experimental sites: on one of them, anonymous users can go
  everywhere. On the other, the permissions *look* exactly the same but
  anonymous users can only see the home page and are denied access to
  subfolders (more precisely, Zope asks a password). I assume one DTML
  method, in the second site, is doing something forbidden (anonymous
  has "View" and "Access content information").
  
  Is there a way to get an extended log, such as "anonymous user denied
  because index_html called standard_html_header which called getData
  and getData is a database connection and they don't have permission to
  use database connections"?
I have read in this list (- searchable list archive),
that Shane's ZDebug product can help to analyse access problems.

I had never need to try it for myself, though.


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] site structure

2000-12-14 Thread Dieter Maurer

Nuno Goncalves writes:
  How can we define a structure for an entire site with Zope ?
  for example i want that all the site's pages have a table with 3
  colums. it's kind of a template for the web site !
As others told you, you can use a header and footer
to standardize layout.

   The header would define the top and left part of your
   site (i.e. your first table column); the
   bottom your right part of the site (i.e. the third table
   column) and the bottom part.
   The content between header and footer would define
   the center of the page (i.e. your second table column).

If this does not provide enough flexibility, you
can look into ZClasses.

   The page specific content would go into properties
   or content items of the ZInstances.
   The ZClass' "index_html" would combine all these
   elements into the final page.


Dieter

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




Re: [Zope] How to debug access denials?

2000-12-14 Thread Dieter Maurer

Stephane Bortzmeyer writes:
  Indeed. What am I supposed to do with that? Why is the 'title'
  property of the object unauthorized? (The object itself is viewable by
  Anonymous.)
I would expect "AccessContentsInformation" is relevant to
access properties.

  
  I had to drop most of my DTML methods for the experimental sites I use
  to "sell" Zope to other people, they're too hard to use. DTML methods
  brings me back to sendmail.cf editing: great in theory but only a few
  people (after an agreement with the devil?) can do what they want with
  it.
I read from that, that you do not use DTML objects.
For *them*, access to attributes is granted for the
"View" permission.
Apparently, this is not true for all objects.


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] stupid file upload question

2000-12-14 Thread Joh Johannsen

Thanks for the responses.  My first message was a little unclear...

Here is what I am doing in more detail:

On the client side (me), I have a windows machine, and I am uploading a
file:  "E:\test\my_file"

On the server, I am running Zope on Linux.  My upload form looks like this:

dtml-var standard_html_header
h2dtml-var title_or_id/h2
p
form method="post" action="Customize" enctype="multipart/form-data"
input type="file" name="attached_file"
input type=submit
/form
/p
dtml-var standard_html_footer


So I use this form, and I think the file gets uploaded, though I'm not quite
sure where it goes.  The "Customize" DTML gets called when the form is
submitted, it looks like this:

dtml-var standard_html_header
h2dtml-var title_or_id dtml-var document_title/h2
p
filename: dtml-var "get_file_name(REQUEST)"
/p
dtml-var standard_html_footer


And the "get_file_name" is a Python External Method, which looks like this:

def get_file_name(self,REQUEST):
s = REQUEST.form['attached_file'].filename
return s


Everything works great so far.

Now I want to do something with that file I just uploaded.

What is its name on the server?

The "filename" in the field I am pretty sure is NOT the name of the file on
the local system, since when I look at it, it says "E:\test\myfile" and this
is on a Linux system, so there is no such path.  That is the name file had
on my Windows system.

What sort of object is this "REQUEST.form['attached_file']"?   Is there some
way to find out this sort of thing when you have a Python object?  (I'm new
to Python)

Is that even the place to look to get the name of the file on the server
after it is uploaded?

That's why I mentioned the quote from that How-To (which the above is
basically a copy of):  "In you python external method you can now reference
REQUEST.form['attached_file'] as a normal file. You can perform things such
as read() on the object. "

This makes it seem like whatever is necessary, it is very easy, but there's
some detail that I am missing.  Maybe I just don't know what a "normal file"
is...

Regards,

JJ


Dieter Maurer wrote:

 Joh Johannsen writes:
   But it says: "In you python external method you can now reference
   REQUEST.form['attached_file'] as a normal file. You can
 perform things such as read() on the object. "
  
   Now in my Python external method, I can reference things like:
  
   REQUEST.form['attached_file'].filename
  
   and that is fine.
  
   But what is the syntax for actually reading the file?  From the above
   quote I thought it was as simple as
   x=REQUEST.form['attached_file'].read()  but that doesn't work...
 Please tell us, how it does not work (in fact, it should work):

Did you get an attribute error (read) or was the result wrong?

 You must use the 'enctype="multipart/form-data"' and
 'method=post' form parameter to upload files. Did you do that?

 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] stupid file upload question

2000-12-14 Thread Dieter Maurer

Joh Johannsen writes:
  What sort of object is this "REQUEST.form['attached_file']"?   Is there some
  way to find out this sort of thing when you have a Python object?  (I'm new
  to Python)
It is a "ZPublisher.HTTPRequest.FileUpload" object.
From its (source) documentation:

File upload objects are used to represent file-uploaded data.

File upload objects can be used just like files.

In addition, they have a 'headers' attribute that is a dictionary
containing the file-upload headers, and a 'filename' attribute
containing the name of the uploaded file.

  Is that even the place to look to get the name of the file on the server
  after it is uploaded?
You should not rely on the fact that the data is stored somewhere
on the server.

  That's why I mentioned the quote from that How-To (which the above is
  basically a copy of):  "In you python external method you can now reference
  REQUEST.form['attached_file'] as a normal file. You can perform things such
  as read() on the object. "
"REQUEST.form['attached_file']" should be a "FileUpload" object
and as such have a "read" method (beside many others).

Thus, "REQUEST.form['attached_file'].read()" should return the
file content.

In an earlier message, you said, it did not.
What happened?



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] ZWiki hierarchy seems to be broken

2000-12-14 Thread Simon Michael

Timothy Grant [EMAIL PROTECTED] writes:
 I just went digging through all the properties of the pages that didn't have
 headers, and compared them to the properties for the pages that did, and I
 noticed that they were all parented wrong! I didn't think to look there. I
 had changed the name of the FrontPage to something else, which broke all the
 parent links.

Ahhh. That's good to know. So the header was there, but showing no
parents. And ideally all parent links would get adjusted on page
rename or deletion.

Frank is your problem similar ? Does reparenting a few pages improve
the situation ?

Best regards
-Simon

___
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 file upload question

2000-12-14 Thread Joh Johannsen



Dieter Maurer wrote:

 Joh Johannsen writes:
   What sort of object is this "REQUEST.form['attached_file']"?   Is there some
   way to find out this sort of thing when you have a Python object?  (I'm new
   to Python)
 It is a "ZPublisher.HTTPRequest.FileUpload" object.
 From its (source) documentation:

 File upload objects are used to represent file-uploaded data.

 File upload objects can be used just like files.

 In addition, they have a 'headers' attribute that is a dictionary
 containing the file-upload headers, and a 'filename' attribute
 containing the name of the uploaded file.

   Is that even the place to look to get the name of the file on the server
   after it is uploaded?
 You should not rely on the fact that the data is stored somewhere
 on the server.

   That's why I mentioned the quote from that How-To (which the above is
   basically a copy of):  "In you python external method you can now reference
   REQUEST.form['attached_file'] as a normal file. You can perform things such
   as read() on the object. "
 "REQUEST.form['attached_file']" should be a "FileUpload" object
 and as such have a "read" method (beside many others).

 Thus, "REQUEST.form['attached_file'].read()" should return the
 file content.

 In an earlier message, you said, it did not.
 What happened?


What happens is that if I have this:


def get_file_name(self,REQUEST):
s = REQUEST.form['attached_file'].filename
contents = REQUEST.form['attached_file'].read()
return s

I get a Zope error for the External Method, when I reload it by clicking on "edit"
Here is traceback...

Traceback (innermost last):
  File /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
  File /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 187, in
publish
  File /usr/local/Zope-2.2.0-src/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: get_file_name)
  File /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 171, in
publish
  File /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/mapply.py, line 160, in
mapply
(Object: manage_edit)
  File /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 112, in
call_object
(Object: manage_edit)
  File
/usr/local/Zope-2.2.0-src/lib/python/Products/ExternalMethod/ExternalMethod.py,
line 201, in manage_edit
(Object: get_file_name)
  File
/usr/local/Zope-2.2.0-src/lib/python/Products/ExternalMethod/ExternalMethod.py,
line 210, in getFunction
(Object: get_file_name)
  File /usr/local/Zope-2.2.0-src/lib/python/App/Extensions.py, line 217, in
getObject
(Info: ('/usr/local/Zope2/Extensions/get_file_name.py', 'get_file_name'))
SyntaxError: (see above)


JJ


___
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] ZWiki hierarchy seems to be broken

2000-12-14 Thread Simon Michael

Wait! Is this what you've been seeing ?

http://joyful.com/zwiki/link

ie no title at all ? That's a BUG, thank you. 

Looks like certain pages, like the above and
http://joyful.com/zwiki/page%20about%20nothing , get an empty string
from context() and don't appear in the map.

Both the above point to SandBox as their parent, and SandBox points to
MyNewTestPage, and MyNewTestPage points back to SandBox. Maybe
something about that tight loop. When one goes to SandBox/backlinks
and clicks reparent, all pages look normal again.

-Simon

___
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] IE5 / Medusa bug?

2000-12-14 Thread Evan Simpson

From: seb bacon [EMAIL PROTECTED]
 I imagine the fact that I can make it work by adding index_html is the
 most telling point, but it's not telling me anything ;)

Leaving off index_html causes Zope to add a base href to the head.  That's
the only difference I can think of.  Your page doesn't get cut short in my
IE 5.00.2314.1003 (128 bit encryption).

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 )




[Zope] Core Session Tracking Development Release 0.1

2000-12-14 Thread Chris McDonough

Hi,

A development release of the fruits of the "core session tracking" Fishbowl
project
(http://dev.zope.org/Wikis/DevSite/Projects/CoreSessionTracking/FrontPage)
is available at
http://www.zope.org/Members/mcdonc/Products/CoreSessionTracking.  It allows
you to keep state across requests for anonymous users (much like FSSession,
SQLSession, HappySession, etc.), but it is capable of storing sessioning
data in the ZODB or in RAM.

You need to be running a pretty recent Zope 2.2.X to use it.  I've tested it
continually against the current trunk release, and it works against that.

Feedback appreciated!

Thanks,

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] IE5 / Medusa bug?

2000-12-14 Thread seb bacon

Tempting fate by claiming a bug...but although I'm sure I'm at fault
here, there's no sensible reason for the results I'm getting.

When I view one of several different pages with IE5, the last 11 bytes
don't reach the browser.  I've got a couple of other people to try it
out.  One of them reported the same symptoms, the other didn't.  I
don't get it with Netscape.

I'd *really* appreciate it if anyone who has IE5 could have a go at

  http://test.jamkit.com

and let me know (you can tell if the bug's happened if the source ends
abruptly with something like '/ta').

Things I've deduced:

- http://test.jamkit.com/index_html works :S

- It's not related to the bad HTML in that example page (I've tried 
  pages with perfect HTML)

- It's related to how I've built the page (the Zope Welcome screen is
  fine, other pages built using the same product don't work.  The
  product I'm building is a folderish thing with lots of extra 
  navigational services)

- it's always the last 11 bytes that are missing, however large the 
  page is

- I've sent exact copies of the HTTP headers to the server, using
  telnet, and there's no problem there

I imagine the fact that I can make it work by adding index_html is the
most telling point, but it's not telling me anything ;)
 
I'll continue my research by eliminating elements until I've nailed down
exactly the bit that's messing it up.  Right now, though, I have to go
to bed.  Meanwhile, any comments?

Cheers,

seb

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




[Zope] Re: [Zope-dev] IE5 / Medusa bug?

2000-12-14 Thread Chris McDonough

Works For Me (IE 5.0.2920)

- Original Message - 
From: "seb bacon" [EMAIL PROTECTED]
To: mailto:[EMAIL PROTECTED];; [EMAIL PROTECTED]
Sent: Thursday, December 14, 2000 5:10 PM
Subject: [Zope-dev] IE5 / Medusa bug?


 Tempting fate by claiming a bug...but although I'm sure I'm at fault
 here, there's no sensible reason for the results I'm getting.
 
 When I view one of several different pages with IE5, the last 11 bytes
 don't reach the browser.  I've got a couple of other people to try it
 out.  One of them reported the same symptoms, the other didn't.  I
 don't get it with Netscape.
 
 I'd *really* appreciate it if anyone who has IE5 could have a go at
 
   http://test.jamkit.com
 
 and let me know (you can tell if the bug's happened if the source ends
 abruptly with something like '/ta').
 
 Things I've deduced:
 
 - http://test.jamkit.com/index_html works :S
 
 - It's not related to the bad HTML in that example page (I've tried 
   pages with perfect HTML)
 
 - It's related to how I've built the page (the Zope Welcome screen is
   fine, other pages built using the same product don't work.  The
   product I'm building is a folderish thing with lots of extra 
   navigational services)
 
 - it's always the last 11 bytes that are missing, however large the 
   page is
 
 - I've sent exact copies of the HTTP headers to the server, using
   telnet, and there's no problem there
 
 I imagine the fact that I can make it work by adding index_html is the
 most telling point, but it's not telling me anything ;)
  
 I'll continue my research by eliminating elements until I've nailed down
 exactly the bit that's messing it up.  Right now, though, I have to go
 to bed.  Meanwhile, any comments?
 
 Cheers,
 
 seb
 
 
 ___
 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 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 version of Python Methods - no - Scripts for2.2.4?

2000-12-14 Thread Itai Tavor

Ron Bickers wrote:

I got PythonScripts running on 2.2.4 after doing the following:

1) Install PythonScripts from CVS just like any other Product.

2) Add these lines to lib/python/AccessControl/__init__.py:

from SecurityInfo import ClassSecurityInfo, ModuleSecurityInfo
from SecurityInfo import ACCESS_PRIVATE
from SecurityInfo import ACCESS_PUBLIC
from SecurityInfo import ACCESS_NONE
from SecurityInfo import secureModule

3) Add the CVS version of SecurityInfo.py to lib/python/AccessControl/

It works in my limited testing, but I have no idea if something is badly
broken that just hasn't shown itself yet.

I also had to add OFS/Cache.py from the CVS for this to work.
-- 
Itai Tavor"Je sautille, donc je suis."
C3Works[EMAIL PROTECTED]  - Kermit the Frog

"If you haven't got your health, you haven't got anything"


___
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] default values in forms

2000-12-14 Thread Curtis Maloney

On Thursday 14 December 2000 04:52, Ivan Cornell wrote:
 Olaf Zanger wrote:
  hi there,
 
  i'd like to send default values for an data update with the link to the
  form
 
  like
  a href="adr_change_frm?f_id=dtml-var idf_name=dtml-var name"c/a
 
  unfortunately name may contain spaces.
 
  i found out that spaces may be replaced by "+" in the link,
  but how do i get the "+" into the dtml-var ... statement?

 Try
 a href="adr_change_frm?f_id=dtml-var idf_name=dtml-var name
 fmt=url_quote"c/a


I don't know about you, but this looks messy  Yes, It will work, but...


a href="dtml-var " 'adr_change_frm?f_id=%sf_name=%s' % ( id, name ) " 
fmt=url_quotec/a

at least, to me, is a fair bit clearer  However, the url_quote might not 
like  or ?... but I'm sure this is working in one of my sites currently.

 Ivan

Curtis.

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




[Zope] Volunteer internship for Zope programmer

2000-12-14 Thread Fred Wilson Horch

Dear kind Zope folks,

If you are

 * computer literate,
 * interested in programming or already a programmer,
 * looking for a volunteer opportunity or an independent study project,
 * eager to publish code and work on a development team, and
 * able to invest a few hours a week between January and May 2001
   reading, writing and documenting open source object-oriented web
   application software (specifically Java, C and Python code for Zope
   running on Linux),

you may be interested in the attached announcement.

Thanks for the bandwidth,

Fred Wilson Horch   mailto:[EMAIL PROTECTED]
Executive Director, EcoAccess   http://ecoaccess.org/
P.O. Box 2823, Durham, NC 27715-2823phone: 919.419-8354

Spring 2001 EcoAccess Technology Associate Internship

EcoAccess, a public charity working to enhance public understanding
of our natural environment, is offering a volunteer Technology
Associate internship program for people seeking the opportunity to
enhance their software development skills.

Selected Technology Associates will receive a loaner Linux system to
allow them to develop free open source software for the EcoAccess
database-backed web site.

Designed for Associates who have some programming experience,
the internship runs from January 8 through May 4.  Our software is
published on SourceForge and licensed under the General Public
License.

How to Apply

The internship is open to anyone who has any programming experience
or training, with preference to those residing in the Triangle area of
North Carolina.  Apply by e-mail to

 Fred Wilson Horch, Executive Director
 [EMAIL PROTECTED]

Please include the following information:

 * Your name
 * Preferred e-mail address
 * A summary of your education and relevant work experience, if any
 * Your experience with open source software, if any
 * Your other time commitments between January and May

If we are interested in working with you, we will request a code
sample before making a decision whether to accept you into the
program.

More About the Internship

Our Technology Associates will learn how to develop for Zope, a
leading Open Source web application server.  Part of the internship
will be devoted to learning and improving Zope itself, including
documenting aspects of its interfaces.  The other part will be devoted
to writing applications in Python, Java and C to support the charitable
EcoAccess project.

Technology Associates must have at least dial-up Internet
connectivity.  Four interns who are in the Triangle area of North Carolina
(Raleigh-Durham-Chapel Hill) can receive fully-configured development
machines for use during the internship.  (Associates may also use
their own Linux machines if they prefer.)  The loaner machines are
best described as tomorrow's software running on yesterday's hardware.

Our Technology Associates will get hands-on experience building
object-oriented transactional web applications.  Specifically, our
Associates will write programs in Java, C and Python that run on Linux
and use PostgreSQL databases.

This internship is made possible through the generosity of several
members of the Triangle Linux Users Group (TriLUG) who donated the
hardware for our loaner machines.  We appreciate the help!

(Announcement revision 1.0 2000-12-14 10:21)


RE: [Zope] What version of Python Methods - no - Scripts for 2.2.4?

2000-12-14 Thread Ron Bickers


 -Original Message-
 From: Itai Tavor [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 14, 2000 7:55 PM
 To: [EMAIL PROTECTED]
 Cc: Ron Bickers
 Subject: RE: [Zope] What version of Python Methods - no - Scripts for
 2.2.4?

 I also had to add OFS/Cache.py from the CVS for this to work.

That's interesting.  I don't have OFS/Cache.py and it seems to be working
fine.  Maybe there was a recent change that now requires 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 )




[Zope] Converting Python Methods to Python Scripts

2000-12-14 Thread Itai Tavor

Hi,

I was wondering if anyone is planning to add automated migration of 
Python Methods to Python Scripts (maybe with Zope 2.3 final)? Or 
maybe there's something like this in there already that I missed?

Anyway, for now I created a simple hack to do this - it's not pretty, 
but it works. In case anyone's interested, this is how to do it:

* Create the following External Method at the top level of Zope, named M2S:

from Products.PythonScripts.PythonScript import PythonScript
from string import strip

def M2S(self, ids, REQUEST):
 method_id = type(ids) == type('') and ids or ids[0]
 method = self._getOb(method_id)

 if method.meta_type != 'Python Method':
 raise 'HackError', 'Selected object is not a Python Method'

 title = method.title
 params = method._params
 if not type(method._body) == type(''):
 body = method._body.read()
 else:
 body = method._body

 self.manage_renameObject(method_id, method_id+'X')

 id = self._setObject(method_id, PythonScript(method_id))

 script = self._getOb(method_id)
 script.ZPythonScript_setTitle(title)
 script.ZPythonScript_edit(params, body)

 return REQUEST.RESPONSE.redirect('%s/%s/manage' % 
(REQUEST['URL1'], method_i
d))


* Edit lib/python/OFS/main.dtml. Find these lines:

   dtml-if "AUTHENTICATED_USER.has_permission('Import/Export 
objects', this())"
   INPUT TYPE="SUBMIT" 
NAME="dtml-id;/manage_importExportForm:method" VALUE="Ex
port..."
   /dtml-if

After them add this line:

   INPUT TYPE="SUBMIT" NAME="M2S:method" VALUE="Convert Python Method 
to Script"


* Repeat the last step for lib/python/Products/PlugIns/www/main.dtml

* To use, check a Python Method in the management interface and click 
"Convert Python Method To Script". If you check more than one method, 
only the first one will be converted.

* A new Python Script will be created, using the same id of the 
original Python Method. The old method will remain, with an 'X' added 
to its id. After the conversion you'll be redirected to the editing 
interface of the new script.


Hope this is useful to anyone. It could probably be made much nicer, 
but why bother.

Itai
-- 
Itai Tavor"Je sautille, donc je suis."
C3Works[EMAIL PROTECTED]  - Kermit the Frog

"If you haven't got your health, you haven't got anything"


___
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 version of Python Methods - no - Scripts for2.2.4?

2000-12-14 Thread Itai Tavor

That's what I figured. Didn't check, though. I'm just happy it works.

   -Original Message-
  From: Itai Tavor [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, December 14, 2000 7:55 PM
  To: [EMAIL PROTECTED]
  Cc: Ron Bickers
  Subject: RE: [Zope] What version of Python Methods - no - Scripts for
  2.2.4?

  I also had to add OFS/Cache.py from the CVS for this to work.

That's interesting.  I don't have OFS/Cache.py and it seems to be working
fine.  Maybe there was a recent change that now requires it?
___

Ron Bickers
Logic Etc, Inc.
[EMAIL PROTECTED]

-- 
Itai Tavor"Je sautille, donc je suis."
C3Works[EMAIL PROTECTED]  - Kermit the Frog

"If you haven't got your health, you haven't got anything"


___
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: Converting Python Methods to Python Scripts

2000-12-14 Thread Itai Tavor

Hi,

I was wondering if anyone is planning to add automated migration of 
Python Methods to Python Scripts (maybe with Zope 2.3 final)? Or 
maybe there's something like this in there already that I missed?

Anyway, for now I created a simple hack to do this - it's not 
pretty, but it works. In case anyone's interested, this is how to do 
it:
...snip...

Oops, bug. It didn't work in ZClasses. And while I was fixing that, I 
modified it so that if you select more than one object all will be 
converted and you'll get back to the object list.

A bug in a hack. How embarrassing. Here's the new External Method.

Still-hoping-anybody-cares-about-this, Itai


from Products.PythonScripts.PythonScript import PythonScript
from string import strip
from urllib import quote

def PythonMethod2Script(self, ids, REQUEST, RESPONSE):
 for method_id in ids:
 method_id = strip(method_id)
 method = self._getOb(method_id)

 if method.meta_type != 'Python Method':
 raise 'AppError', 'Selected object is not a Python Method'

 title = method.title
 params = method._params
 if not type(method._body) == type(''):
 body = method._body.read()
 else:
 body = method._body

 self.manage_renameObject(method_id, method_id+'X')

 id = self._setObject(method_id, PythonScript(method_id))

 script = self._getOb(method_id)
 script.ZPythonScript_setTitle(title)
 script.ZPythonScript_edit(params, body)

 if len(ids) == 1:
 return RESPONSE.redirect('%s/%s/manage' % (REQUEST['URL1'], 
quote(method_id)))
 else:
 return RESPONSE.redirect('%s/manage' % REQUEST['URL1'])
-- 
Itai Tavor"Je sautille, donc je suis."
C3Works[EMAIL PROTECTED]  - Kermit the Frog

"If you haven't got your health, you haven't got anything"


___
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] IE5 / Medusa bug?

2000-12-14 Thread Jerome Alet

On Thu, 14 Dec 2000, Evan Simpson wrote:

 From: seb bacon [EMAIL PROTECTED]
  I imagine the fact that I can make it work by adding index_html is the
  most telling point, but it's not telling me anything ;)
 
 Leaving off index_html causes Zope to add a base href to the head.  That's

WHOW !

base href is exactly 11 bytes long. Couldn't it be that the
content-length is computed by Zope before you automatically add this tag ? 

just my 0.02 euros

Jerome Alet


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