[Zope] ReSTX

2005-04-11 Thread Rakotomandimby (R12y) Mihamina

Hello,

What about ReStructuredText? I found not much tutorial on it? How is its
synonpsys (syntax) ?

Thank you... :-)

-- 
Les serveurs avec 10Mb/s se louent maintenant pour 50 ou 60 Euros par mois!
La preuve http://www.google.fr/search?q=serveur+dedie 
Infogerance de serveur dedie   http://aspo.rktmb.org/activites/infogerance
(En louant les services de l'ASPO vous luttez contre la fracture numerique)


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


Re: [Zope] ReSTX

2005-04-11 Thread Andreas Jung

--On Montag, 11. April 2005 9:09 Uhr +0200 "Rakotomandimby (R12y) Mihamina" 
<[EMAIL PROTECTED]> wrote:

Hello,
What about ReStructuredText? I found not much tutorial on it? How is its
synonpsys (syntax) ?
As always: there is documentation. Just look in the 'doc' folder of your
Zope installation.
-aj

pgpD88tRUfeHY.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Localizer 1.1.0 released

2005-04-11 Thread J. David Ibáñez
Localizer 1.1
=

April 7, 2005 - Two years after release of Localizer 1.0, I am
pleased to announce the availability of the next major version,
Localizer 1.1.

Localizer is a Zope [1] product for developers and web masters.
Localizer solves the problem of building multilingual products
and web sites, ranging from internationalization and localization
of the user interface to management of multilingual content.

jdavid at itaapy.com [2]


What's new in 1.1
-

This release brings several new features. Specifically Localizer
now supports industry standards such as TMX [3] and XLIFF [4],
which enhance the interoperability of Localizer based applications
within mainstream environments.

Native support for 'i18n' namespaces for ZPT (Zope Page Templates)
is included avoiding the need to install other products.

The user interfaces have been vastly improved, specially for
'LocalContent' objects.

Four new translations are available: Danish, Italian, Portuguese
and Russian.

Localizer 1.1 has been re-packaged and now depends on itools Python
package and iHotfix Zope product. While these changes make installation
a bit more complex, the added benefit is simplified source management.
Furthermore this subtle change makes Localizer Services available to
the wider audience of Python [5] developers.

Last but not least, Localizer's stability has been dramatically
improved by resolution of many bugs resulting in a mature and even
more reliable product.


Credits
---

This is the first release where the majority of work has been
contributed by community users and the original author. Credit
where credit is due.

To Eduardo Corrales and Roberto Quero from the Deusto University [6],
for the original implementation of the TMX standard.

To Søren Roug and Cornel Nitu from the European Environment Agency [7],
for their work on the TMX code, the implementation of the XLIFF standard,
the overhaul of the LocalContent interfaces, and the Danish translation.

To Alexey Lubimov for the Russian translation.

To Mario Olimpio de Menezes for the original Portuguese translation.

To Rodrigo Senra for updating the Portuguese translation, and for improving
the Localizer API.

To Marco Bizzarri for the Italian translation, and for improving the
stability.


Download and Install


 1. Download the Localizer meta-package from http://www.localizer.org

 2. Unpack the tarball

 3. Follow the instructions within the README file


Resources
-

Home
http://www.localizer.org

Mailing list
http://in-girum.net/mailman/listinfo/localizer

Bug Tracker
http://in-girum.net/cgi-bin/bugzilla/index.cgi


References
--

[1] http://www.zope.org
[2] http://www.itaapy.com
[3] http://www.lisa.org/tmx/
[4] http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xliff
[5] http://www.python.org
[6] http://www.deusto.es/
[7] http://www.eea.eu.int/

-- 
J. David Ibáñez
Itaapy  Tel +33 (0)1 42 23 67 45
9 rue Darwin, 75018 Paris  Fax +33 (0)1 53 28 27 88 


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


[Zope] DTML namespace problem (was: dtml-tree issue)

2005-04-11 Thread Vangelis Mihalopoulos
Hello,
i have focused my problem on this:
having a Python Script "testScript":

class obj:
a = 1
b = 2
c = 3
return obj()

and a DTML Document "testWith":
---

 

---
when i try to view the DTML Document, i get an "Unauthorized" Exception.
I believe this has something to do with the security mechanism of Zope. 
What must i return from the Python Script in order for the DTML Document 
to work?

Thanks for any help
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] DTML namespace problem (was: dtml-tree issue)

2005-04-11 Thread Andreas Jung

--On Montag, 11. April 2005 13:44 Uhr +0300 Vangelis Mihalopoulos 
<[EMAIL PROTECTED]> wrote:

Hello,
i have focused my problem on this:
having a Python Script "testScript":

class obj:
 a = 1
 b = 2
 c = 3
return obj()

and a DTML Document "testWith":
---

  

---
when i try to view the DTML Document, i get an "Unauthorized"
Exception.
I believe this has something to do with the security mechanism of Zope.
What must i return from the Python Script in order for the DTML Document
to work?
You should *not* define classes inside PythonScripts. PythonScripts are 
stricted
and don't provide the full functionality. Either use filesystem based code 
(Zope
Product) or use simple Python datatypes as dictionaries in this case.

-aj

pgpObF1HSEcUT.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] DTML namespace problem (was: dtml-tree issue)

2005-04-11 Thread Vangelis Mihalopoulos

Andreas Jung wrote:
You should *not* define classes inside PythonScripts. PythonScripts 
are stricted
and don't provide the full functionality. Either use filesystem based 
code (Zope
Product) or use simple Python datatypes as dictionaries in this case.

An External Method behaves exactly the same. I have not yet involved in 
writting even the simpler Product and i will not do it now for such a 
trivial issue.

I tried to return a dictionary,
-  return {'a':1, 'b':2, 'c':3}  --
but it the DTML Doc fails with a KeyError.
I was wondering if there was some "Zopish" way to do it i don't 
know. i kinda desperate here :-)

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


Re: [Zope] DTML namespace problem (was: dtml-tree issue)

2005-04-11 Thread Tino Wildenhain
Hi,

Am Montag, den 11.04.2005, 14:08 +0300 schrieb Vangelis Mihalopoulos:
> 
> Andreas Jung wrote:
> 
> > You should *not* define classes inside PythonScripts. PythonScripts 
> > are stricted
> > and don't provide the full functionality. Either use filesystem based 
> > code (Zope
> > Product) or use simple Python datatypes as dictionaries in this case.
> 
> 
> An External Method behaves exactly the same. I have not yet involved in 
> writting even the simpler Product and i will not do it now for such a 
> trivial issue.
> 
> I tried to return a dictionary,
> -  return {'a':1, 'b':2, 'c':3}  --
> but it the DTML Doc fails with a KeyError.

Use a dict and if you really need DTML... see the keyword
"mapping" for  and  tags.

If you want to return custom class objects into untrusted
code (e.g. from external methods) you need to set security
declarations on them - at least add the attribute:

__allow_access_to_unprotected_subobjects=1 

(from top of head - just grep -r zopes source
for the actual name)

HTH
Tino

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


[Zope] Running different Zope versions

2005-04-11 Thread Henk Laloli


 
Is it possible to run different Zope versions on one machine?
I have a Zope 2.6.4 running and a Zope 2.7.3 both on a Windows 2003 server. They use their own python. I run them on different port numbers configured in the zope.conf file. Both are installed as services. Yet, when both are started usually only the 2.6.4 is available. I have to turn it off to reach the other. What did I forget? Any suggestion appreciated.
 
Henk Laloli___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Anonymous users can download files stored in a restricted folder

2005-04-11 Thread Barbara Harris








Is it possible to restrict access to the file download
function by setting permissions on the folder containing a published file?

 

In a Zope 2.6.4 CMF site, running on Apache, I have removed
anonymous access from a portal folder (the restricted folder) and published documents
and files in that folder.  If a document elsewhere on the site contains a
hyper link to a DOCUMENT in the restricted folder, anonymous users are prompted
to login to the site when they select the link – this is what I
want.  However, a hyper link to a FILE published in the restricted folder
triggers the Windows file download window and allows an anonymous user to
download the file.  

 

Without introducing special procedures, I would like to
provide the content owner with the facility to publish files in the restricted
folder, and create hyperlinks to these files throughout the site that can only
be accessed via Zope members.  

 

Initially I restricted the folder by deselecting
‘Acquire permission settings?’ and selecting Manager and Member
roles only on the following permissions:

 

- Access contents information 

- View

 

Subsequently I deselected and reset the roles on all the (restricted
folder’s) permissions allocated to the Anonymous role at Zope instance
and site level, but it made no difference.

 

Tacking ‘view’ onto the end of the file url
works, but this requires additional user intervention and an extra step in the
download, so I’d rather find a once-off permissioning solution if I can
i.e.

 

http://myCMFsite/myRestrictedFolder
(loads the login page – desired result)

http://myCMFsite/myRestrictedFolder/myPublishedDocument
(loads the login page – desired result)

http://myCMFsite/myRestrictedFolder/myPublishedFile
(triggers the Windows file download window – not acceptable)

http://myCMFsite/myRestrictedFolder/myPublishedFile/view
(loads the login page – desired result)

 

The content owners’ platform is IE6 or Firefox1
running on Windows 2000 or XP.

 

Regards,

Barbara Harris



Web Team





Birkbeck, University
 of London





Email: [EMAIL PROTECTED]





 



 






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


Re: [Zope] Running different Zope versions

2005-04-11 Thread Lennart Regebro
On Apr 11, 2005 1:58 PM, Henk Laloli <[EMAIL PROTECTED]> wrote:
>  
>   
> Is it possible to run different Zope versions on one machine? 
> I have a Zope 2.6.4 running and a Zope 2.7.3 both on a Windows 2003 server.
> They use their own python. I run them on different port numbers configured
> in the zope.conf file. Both are installed as services. Yet, when both are
> started usually only the 2.6.4 is available. I have to turn it off to reach
> the other. What did I forget? Any suggestion appreciated. 

Hmmm, could it be that you changes only the HTTP port and that the FTP
port or webDav port still tries to use the same port on both
instances?

Otehrwise I have no idea. It's always worked fine for me, I think. :)

-- 
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Anonymous users can download files stored in a restricted folder

2005-04-11 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barbara Harris wrote:
> Is it possible to restrict access to the file download function by
> setting permissions on the folder containing a published file?
> 
> In a Zope 2.6.4 CMF site, running on Apache, I have removed anonymous
> access from a portal folder (the restricted folder) and published
> documents and files in that folder.  If a document elsewhere on the site
> contains a hyper link to a DOCUMENT in the restricted folder, anonymous
> users are prompted to login to the site when they select the link - this
> is what I want.  However, a hyper link to a FILE published in the
> restricted folder triggers the Windows file download window and allows
> an anonymous user to download the file.  

Zope's security model, by design, allows objects to be published even if
the container cannot be;  therefore you need to ensure that the object
itself does not become viewable by anonymous.

You likely need to modify the "Security" tab on the "published" state in
your workflow to prevent granting "View" permission to "Anonymous".  You
probably want it to have the "Acquire?" flag turned on, instead.


Tres.
- --
===
Tres Seaver[EMAIL PROTECTED]
Zope Corporation  "Zope Dealers"   http://www.zope.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCWoJNGqWXf00rNCgRApfMAJ9/F3dVBzALa6cSd/EKALqURxlHfwCfaeD5
8Dw09zY/hgXQj0k/IHT4ISM=
=GWRr
-END PGP SIGNATURE-

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


[Zope] how to expand a branch using dtml-tree ?

2005-04-11 Thread BonviciniJ
I would like to know if its possible to expand a specified branch of a 
tree,using the dtml-tree tags.

I use this tag to display the tree of my site:


 
 

But I have a problem.I want the chosen branch to keep expanded when the user 
click on the link.
At the moment, when I click on a branch (expanded or not), the page is called 
buit the tree is initialised (all branches collapsed)

So I wonder if its possible to kepp the branch expanded (by adding a special 
line, or send via post the id of the branch and expand it on the next loading 
of the page).
I add that The tree is in the same page and I don't want to use frames

thanks a lot for your help, and scuse for the english


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


[Zope] Ten days to go to Python-UK

2005-04-11 Thread andy
This is a reminder that there are just ten days left before the UK 
Python
Conference.  This is the one chance in the UK each year to hear 
in-depth
talks on a wide variety of topics from top Python experts. It
takes place at the Randolph Hotel in Oxford on 21-23 April.

https://www.accu.org/conference/python.html
The Python event is part of the ACCU Conference which is one of the 
world's
leading events on C++, Java, patterns and development methods.

We are very happy to announce that Greg Stein will be flying in to
talk about "Python at Google" as our keynote talk.  We've got a
great array of talks on language features, GUIs, network programming,
testing tools, PyPy; and case studies and expertise from many of the 
key
Python companies and projects including Google, the BBC, SchoolTool, 
PyPy,
AB Strakt, Clocksoft and ReportLab.

Places are limited, so please register now at...
   https://www.accu.org/bookings/
Best Regards,
Andy Robinson
ACCU Python Conference Chair
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Anonymous users can download files stored in a restricted folder

2005-04-11 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barbara Harris wrote:

> I'm still using the default_workflow (Simple Review / Publish Policy)
> because it meets the content owner's requirements.  I didn't look in
> this area because I thought I could only apply a workflow to ALL
> folders, and I want this security restriction on only one of the site's
> folders.  Have I missed your point?

Please look at the "Security" tab of one of your documents:  I'm willing
to bet that, after publication, the "View" permission is granted to the
Anonymous role.  In that case, the settings on the folder are irrelevant.

To make those settings relevant, you are going to have to change
something:  using a DCWorkflow (there is one available which mimics the
'default_workflow') and tweaking the security settings for the
"published" state is your likeliest bet.

In that case, you would:

 1. Delete the 'default_workflow' from the 'portal_workflow' tool.

 2. Create a DCWorkflow in the tool, selecting the option labelled
"default_workflow (Web-configurable workflow [Classic])".

 3. Change the security settings settngs on the "published" state,
turning on the "acquire" flag for the "View" permisison and turning
off the grant to "Anonymous".

 4. Use the "Update security settings" button on the "Workflows" tab of
the workflow tool to re-apply the settings you have just tweaked.

I've readded the Zope list to the address;  note that, since this is
workflow-related, the zope-cmf list would be a more appropriate forum.


Tres.
- --
===
Tres Seaver[EMAIL PROTECTED]
Zope Corporation  "Zope Dealers"   http://www.zope.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCWqL2GqWXf00rNCgRAuCSAJ9wEupLuCk/pK9799IMa8BE1Q7P+gCfWJIR
1pqFYNrz3SfHqYio1+690yU=
=N0LV
-END PGP SIGNATURE-
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Description Strings in Archetypes

2005-04-11 Thread S . D .
I'm running Archetypes 1.3.2-final in Plone 2.0.5 (Mac OS X Server). I added the
Article example from ArchExamples to the available items list in a Plone site.
It works fine except for the fact that when you look at a list of Articles
inside a given folder, each item's Description is taken from the Description
string of the containing folder rather than the Description attached to that
individual Article.

For example, if I create a folder named "Foo" whose Description field reads
"Place your foo in this folder," that description is attached to each of the
Articles you see when you look at the folder listing.

Apparently, the Description info is being taken from the wrong "Description."
How can I adjust Archetypes to find and display the correct, Article-specific
Description?

Thanks!

Scott

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


[Zope] Newbie ZPsycopgDA question

2005-04-11 Thread Heather Bumbalough

I am very new to Zope & Python so please forgive me if this is stupid question 
or if the answer is posted elsewhere (I've looked!)...

I am using Zope v. 2.8.0-a1, Python v.2.3, and psycopg-1.1.18.  After adding 
the ZPsycopgDA connection in Zope the Status indicates I am connected to the 
database but the tables do not show up on the Browse tab and when I attempt to 
perform a query on the Test tab I get the following (from the log):

Traceback (innermost last):
  Module ZPublisher.Publish, line 113, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 40, in call_object
  Module Shared.DC.ZRDB.Connection, line 123, in manage_test
  Module Shared.DC.ZRDB.Results, line 76, in __init__
TypeError: object does not support item assignment

I have tested adding tables and removing them and that works fine, but I have 
to use phpPgAdmin to see them.

Any ideas on what I need to change?

Thanks!
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Newbie ZPsycopgDA question

2005-04-11 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Heather Bumbalough wrote:
> I am very new to Zope & Python so please forgive me if this is stupid 
> question or if the answer is posted elsewhere (I've looked!)...
> 
> I am using Zope v. 2.8.0-a1, Python v.2.3, and psycopg-1.1.18.  After adding 
> the ZPsycopgDA connection in Zope the Status indicates I am connected to the 
> database but the tables do not show up on the Browse tab and when I attempt 
> to perform a query on the Test tab I get the following (from the log):
> 
> Traceback (innermost last):
>   Module ZPublisher.Publish, line 113, in publish
>   Module ZPublisher.mapply, line 88, in mapply
>   Module ZPublisher.Publish, line 40, in call_object
>   Module Shared.DC.ZRDB.Connection, line 123, in manage_test
>   Module Shared.DC.ZRDB.Results, line 76, in __init__
> TypeError: object does not support item assignment
> 
> I have tested adding tables and removing them and that works fine, but I have 
> to use phpPgAdmin to see them.
> 
> Any ideas on what I need to change?

Can you try with 2.8.0a2?  I'm pretty sure that Sidnei da Silva checked
in a fix for that.

Tres.
- --
===
Tres Seaver[EMAIL PROTECTED]
Zope Corporation  "Zope Dealers"   http://www.zope.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCWrzMGqWXf00rNCgRAqyMAJ0Y3gpnR750LGrtDqlorViY4HdIfwCeNSPT
rEh3HpddHe8o8phtlX1YMMk=
=HK9D
-END PGP SIGNATURE-

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


Re: [Zope] Description Strings in Archetypes

2005-04-11 Thread Stefan H. Holek
Please take this to the plone-users list. See http://plone.org/contact
Stefan
On 11. Apr 2005, at 18:36, S.D. wrote:
I'm running Archetypes 1.3.2-final in Plone 2.0.5 (Mac OS X Server). I 
added the
Article example from ArchExamples to the available items list in a 
Plone site.
It works fine except for the fact that when you look at a list of 
Articles
inside a given folder, each item's Description is taken from the 
Description
string of the containing folder rather than the Description attached 
to that
individual Article.
--
Software Engineering is Programming when you can't. --E. W. Dykstra
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Session without cookies.

2005-04-11 Thread Fernando Lujan
Hi everyone,
Is there possible to use a Session control without cookies?
I already changed the browser_id_manager and unchecked the cookies and 
checked the "Automatically Encode Zope-Generated URLs With A Browser Id" 
option. But it's just stops working. :(

In addition, where could I get the Examples? The Zope book has a mention 
of it, but I couldn't find the URL to download the Examples.

Thanks!
Fernando Lujan
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Composite Objects?

2005-04-11 Thread Jeffrey E. Forcier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey all,

I'm attempting to use mostly-vanilla Zope to implement an intranet
here at my office, but am finding it difficult to use a 'feature' that
I imagine should be possible. I've created a template for what ideally
would be a single object/class type, containing multiple different
kinds of Zope objects, and want to be able to clone new copies of that
template as one can do with the existing Zope objects (e.g. as one
would add a new File or Folder).

The template currently consists of a typical index_html ZPT, a
Formulator form, a small collection of Python Scripts, and two generic
Files which are the CSS and JavaScript includes for the ZPT. These are
all contained in a normal Folder object.

The ideal situation is that I want a single object, which has various
data fields (storage location is not important at this time) that are
manipulated with the above objects--the ZPT+files generate a form
page, using Formulator for rendering and validation, and the Python
scripts for various other tasks, including the eventual input
processing. And, as stated before, I need to be able to instantiate
new copies of this object.

Now, I first looked at ZClasses (which according to the Zope Book is
exactly what I want), but it appears that each ZClass instance shares
the 'methods' in the ZClass definition--so that if I wanted each
individual object to add fields to its own Formulator form, it
couldn't. On top of that, I read and (mostly) understand some of the
recent discussions here about possible deprecation of ZClasses, making
it even less of a desirable option.

I then looked at CPSSchema, but what appears to be its homepage on
zope.org cannot be accessed even after one creates an account on the
site; furthermore, what little I was able read about it suggests that
it too is not quite what I'm looking for. Ditto for Plone's ArchTypes
(plus I'd *rather* not have to use Plone, as this intranet is not
really going to be a CMS in the classical sense).

So, I'm pretty much out of ideas; obviously I could just write my own
Product from scratch, and that's what I'll be looking into in the
meantime, but this seems like something that should be possible, and I
hope I'm just missing something or being misled by what I've already
read. Please help :)

Regards,
Jeff

- --
Jeffrey E. Forcier
Junior Developer, Research and Development
Stroz Friedberg, LLC
15 Maiden Lane, 12th Floor
New York, NY 10038
[main]212-981-6540 [direct]212-981-6546
http://www.strozllc.com

This message is for the named person's use only.  It may contain
confidential, proprietary or legally privileged information. No right
to confidential or privileged treatment of this message is waived or
lost by any error in transmission.  If you have received this message
in error, please immediately notify the sender by e-mail or by
telephone at 212.981.6540, delete the message and all copies from your
system and destroy any hard copies.  You must not, directly or
indirectly, use, disclose, distribute, print or copy any part of this
message if you are not the intended recipient.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCWuF5p45MMXK8DgERArShAKCYkeCGkI4lqYz0YHWT6yHOUtCK3gCg+b9L
EQqJ2c7J1SOGmEugQ/lZ4Qg=
=rh/h
-END PGP SIGNATURE-

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


Re: [Zope] Composite Objects?

2005-04-11 Thread Paul Winkler
On Mon, Apr 11, 2005 at 04:43:38PM -0400, Jeffrey E. Forcier wrote:
> I'm attempting to use mostly-vanilla Zope to implement an intranet
> here at my office, but am finding it difficult to use a 'feature' that
> I imagine should be possible. I've created a template for what ideally
> would be a single object/class type, containing multiple different
> kinds of Zope objects, and want to be able to clone new copies of that
> template as one can do with the existing Zope objects (e.g. as one
> would add a new File or Folder).

(snip)

I gather you want to be able to modify the scripts and such
for each copy, which argues against the usual solution of building
a Product.  

You might check out AbracadabraObject, which seems tailor-made
for your use case.

-PW

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Composite Objects?

2005-04-11 Thread Jeffrey E. Forcier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paul Winkler wrote:

> (snip)
>
> I gather you want to be able to modify the scripts and such for
> each copy, which argues against the usual solution of building a
> Product.

Actually, no--the only thing that would change per-instance would be
the Formulator form and, of course, the underlying data. The logic, as
scripted in the Python Scripts, would be the same for all instances.
In other words, this is just a plain old object-oriented class (data
structures + methods) but one that needs to hold Zope data types.

> You might check out AbracadabraObject, which seems tailor-made for
> your use case.

I'll take a look, thanks.

Regards,
Jeff

- --
Jeffrey E. Forcier
Junior Developer, Research and Development
Stroz Friedberg, LLC
15 Maiden Lane, 12th Floor
New York, NY 10038
[main]212-981-6540 [direct]212-981-6546
http://www.strozllc.com

This message is for the named person's use only.  It may contain
confidential, proprietary or legally privileged information. No right
to confidential or privileged treatment of this message is waived or
lost by any error in transmission.  If you have received this message
in error, please immediately notify the sender by e-mail or by
telephone at 212.981.6540, delete the message and all copies from your
system and destroy any hard copies.  You must not, directly or
indirectly, use, disclose, distribute, print or copy any part of this
message if you are not the intended recipient.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCWuRkp45MMXK8DgERAoFIAJ4lUedI8NAZpPqWTyyMSh9fKo6jxwCfQk+z
rTWcaDwc3Ftv7ZRY3Ib0pog=
=ZFMT
-END PGP SIGNATURE-

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


Re: [Zope] Session without cookies.

2005-04-11 Thread Chris McDonough
On Mon, 2005-04-11 at 16:35, Fernando Lujan wrote:
> Hi everyone,
> 
> Is there possible to use a Session control without cookies?

Yes.

> 
> I already changed the browser_id_manager and unchecked the cookies and 
> checked the "Automatically Encode Zope-Generated URLs With A Browser Id" 
> option. But it's just stops working. :(

Note that it says "Zope-generated" URLs.  URLs that are not generated by
Zope will not be encoded.

> In addition, where could I get the Examples? The Zope book has a mention 
> of it, but I couldn't find the URL to download the Examples.

Examples are available from the "Quick Start" page, which is available
from the default index_html of your Zope root.

- C


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


Re: [Zope] object creation in a specific folder...

2005-04-11 Thread J Cameron Cooper
Rushabh Mehta wrote:
hello all,
this is my first zope app... i am trying to figure out how to create
an object in a particular folder via script, when my current object
may not be in the right tree...
I tried to do a 'change folder' via restrictedTraverse (eg 
context.getRestrictedTraverse('/myapp/myfolder'), and then create the
object using manage_addProduct... but it dosnt seem to work. any tips?
The manage_addProduct method creates an object in the context in which 
is was called. Which is to say, the object it is called on. If you say 
context.manage_addProduct(...) you're creating an object on the current 
object (or the current object's container.)

The restrictedTraverse method gets and returns some object; it does not 
"change folders". (The API note reads: "Return the object obtained by 
traversing the given path from the object on which the method was 
called, performing security checks along the way.") You're thinking 
file-system-wise, and that doesn't work here. Think objects.

(Note: I don't think 'getRestrictedTraverse' exists. 
'restrictedTraverse' on the other hand, definitely does.)

What you want to do, then, is call manage_addProduct on the object 
returned by restrictedTraverse::

  context.restrictedTraverse('/wherever/a').manage_addProduct(...)
Of course, you can also get a certain folder via acquisition::
  context.wherever.a.manager_addProduct(...)
unless you're getting paths dynamically.
		--jcc
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Session without cookies.

2005-04-11 Thread Fernando Lujan
Chris McDonough wrote:
On Mon, 2005-04-11 at 16:35, Fernando Lujan wrote:
 

I already changed the browser_id_manager and unchecked the cookies and 
checked the "Automatically Encode Zope-Generated URLs With A Browser Id" 
option. But it's just stops working. :(
   

Note that it says "Zope-generated" URLs.  URLs that are not generated by
Zope will not be encoded.
 

The URL is generated by Zope.
It's a simple code. I create two dtml documents with the following code.
1)test





2) teste1

The teste1 displays None, I expected it to display the number 2. :(
In addition, where could I get the Examples? The Zope book has a mention 
of it, but I couldn't find the URL to download the Examples.
   

Examples are available from the "Quick Start" page, which is available
from the default index_html of your Zope root.
 

I didn't have the Examples directory under my Zope instance... :(
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Newbie questions:

2005-04-11 Thread Enrique Arizón
Hi again, I'm starting to make up with Zope, but still
basic doubts remains:

Q1: When using normal python I'got used to the
dir(Object) to learn new APIs/Libraries. But when
trainning with my first Zope Scripts I can't. The "dir
not defined" error appears. ???

Q2: I can access the Zope management console and the
help system but when I got to Zope Help -> API
Reference -> "Something" I'm requested for a
user/password. I try with the one I defined during the
initial setup (the same I use to access the Zope
Man.Console) but is rejected. What I did wrong?

 Thanks in advance for any help, hint, link!

 ENRIQUE
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Session without cookies.

2005-04-11 Thread Jens Vagelpohl
On Apr 11, 2005, at 23:47, Fernando Lujan wrote:
Note that it says "Zope-generated" URLs.  URLs that are not generated 
by
Zope will not be encoded.

The URL is generated by Zope.
It's a simple code. I create two dtml documents with the following 
code.

1)test





The URL "test1" in the form tag is obviously *not* generated by Zope. 
You put it in there manually. So it cannot work as you expect.

jens
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Newbie questions:

2005-04-11 Thread Jeffrey E. Forcier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Enrique Arizón wrote:

> Hi again, I'm starting to make up with Zope, but still basic doubts
> remains:
>
> Q1: When using normal python I'got used to the dir(Object) to learn
> new APIs/Libraries. But when trainning with my first Zope Scripts I
> can't. The "dir not defined" error appears. ???

Being a relative newbie myself, I'm not positive this is correct, but
I can tell you that Python Scripts are limited in Zope--you can't
access the entire set of normal Python libraries and functions. A
large part, yes, but not all of them. I'd be surprised if 'dir' was
not in the allowed functions, but that would be one reason why it's
claiming it's not defined.

- --
Jeffrey E. Forcier
Junior Developer, Research and Development
Stroz Friedberg, LLC
15 Maiden Lane, 12th Floor
New York, NY 10038
[main]212-981-6540 [direct]212-981-6546
http://www.strozllc.com

This message is for the named person's use only.  It may contain
confidential, proprietary or legally privileged information. No right
to confidential or privileged treatment of this message is waived or
lost by any error in transmission.  If you have received this message
in error, please immediately notify the sender by e-mail or by
telephone at 212.981.6540, delete the message and all copies from your
system and destroy any hard copies.  You must not, directly or
indirectly, use, disclose, distribute, print or copy any part of this
message if you are not the intended recipient.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCWv2hp45MMXK8DgERAsrLAKC0N7Pt43jhfuwVdG/i2Qwpr97t9QCghc9X
fgDpaU9iFGD/3x/NAv9imuU=
=ZOlF
-END PGP SIGNATURE-

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


Re: [Zope] Session without cookies.

2005-04-11 Thread Fernando Lujan
Jens Vagelpohl wrote:
1)test





It's a simple code. I create two dtml documents with the following code.
The URL "test1" in the form tag is obviously *not* generated by Zope. 
You put it in there manually. So it cannot work as you expect.

jens
Hum, I see. Just web pages that aren't dinamically generated by Zope. 
For instance, other DTML document will not keep the Session. Is this 
correct?

I need to keep a SESSION through the entire site without cookies. Is 
that possible?

Sorry if I made myself incomprehensible.
Fernando Lujan
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Composite Objects?

2005-04-11 Thread Paul Winkler
On Mon, Apr 11, 2005 at 04:56:04PM -0400, Jeffrey E. Forcier wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Paul Winkler wrote:
> 
> > (snip)
> >
> > I gather you want to be able to modify the scripts and such for
> > each copy, which argues against the usual solution of building a
> > Product.
> 
> Actually, no--the only thing that would change per-instance would be
> the Formulator form and, of course, the underlying data. The logic, as
> scripted in the Python Scripts, would be the same for all instances.

In that case, I'd write a filesystem Product for the logic.
Replace the scripts with methods of the Product class.
Make it folderish so it can contain Forumator forms and anything
else you want: inherit from Folder and use its UI to manage
contents.

You could then use AbracadabraObject to clone instances of
this thing; or you could do it all in code and have a manage_afterAdd 
method that adds a preconfigured Formulator form.
Source and/or docs of Formulator should give you a clue how
to instantiate one with the right config.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Newbie questions:

2005-04-11 Thread Paul Winkler
On Mon, Apr 11, 2005 at 06:43:46PM -0400, Jeffrey E. Forcier wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Enrique Ariz?n wrote:
> 
> > Hi again, I'm starting to make up with Zope, but still basic doubts
> > remains:
> >
> > Q1: When using normal python I'got used to the dir(Object) to learn
> > new APIs/Libraries. But when trainning with my first Zope Scripts I
> > can't. The "dir not defined" error appears. ???
> 
> Being a relative newbie myself, I'm not positive this is correct, but
> I can tell you that Python Scripts are limited in Zope--you can't
> access the entire set of normal Python libraries and functions. A
> large part, yes, but not all of them. I'd be surprised if 'dir' was
> not in the allowed functions, but that would be one reason why it's
> claiming it's not defined.

Mostly correct, except I'd say a "small part" rather than "large part".

See
http://www.plope.com/Books/2_7Edition/ScriptingZope.stx
(which will make more sense if you read
http://www.plope.com/Books/2_7Edition/BasicScripting.stx first)

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Session without cookies.

2005-04-11 Thread Jens Vagelpohl
On Apr 12, 2005, at 1:02, Fernando Lujan wrote:
The URL "test1" in the form tag is obviously *not* generated by Zope. 
You put it in there manually. So it cannot work as you expect.
Hum, I see. Just web pages that aren't dinamically generated by Zope. 
For instance, other DTML document will not keep the Session. Is this 
correct?
No, you misunderstand what Chris said earlier. You need to let Zope 
generate the URL. In this case, instead of just saying...


you could do
">
of course that's ugly because it looks like putting a tag inside a tag, 
ZPT is much nicer that way:


jens
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Composite Objects?

2005-04-11 Thread Jeffrey E. Forcier
Paul Winkler wrote:
In that case, I'd write a filesystem Product for the logic.
Replace the scripts with methods of the Product class.
Make it folderish so it can contain Forumator forms and anything
else you want: inherit from Folder and use its UI to manage
contents.
You could then use AbracadabraObject to clone instances of
this thing; or you could do it all in code and have a manage_afterAdd 
method that adds a preconfigured Formulator form.
Source and/or docs of Formulator should give you a clue how
to instantiate one with the right config.
 

That's kind of what I was thinking. AbracadabraObject appears to have a 
method call that allows you to use its magic in code, which I think is 
exactly what I want, although as before I'm very surprised that this 
sort of functionality doesn't exist in Zope proper.

I guess my desires aren't actually all *that* in-line with the main body 
of Zope users, as I do *not* want the users of this application to ever 
see a ZMI screen. So I need this half-and-half situation where I or 
another admin can tweak some aspects of a class (e.g. Formulator forms, 
ZPT) via the ZMI or WebDAV, but the instances of those objects are 
instantiated *via code only*, by Python logic and my own (ZPT-driven) 
HTML form interface.

Another possibly far-fetched feature I'd like, which again I believe was 
part of ZClasses, would be to be able to tweak the instances' Formulator 
forms after the fact...e.g. add another data field a year down the road. 
Of course this then means that I both do and don't want these cloned 
forms to match up with the central one, and I'm not at all sure that I 
can accomplish this without writing lots of my own code to handle it.

Thanks for the help, by the way, it's appreciated.
Regards,
Jeff
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Composite Objects?

2005-04-11 Thread Paul Winkler
On Mon, Apr 11, 2005 at 08:36:22PM -0400, Jeffrey E. Forcier wrote:
> Paul Winkler wrote:
> 
> >In that case, I'd write a filesystem Product for the logic.
> >Replace the scripts with methods of the Product class.
> >Make it folderish so it can contain Forumator forms and anything
> >else you want: inherit from Folder and use its UI to manage
> >contents.
> >
> >You could then use AbracadabraObject to clone instances of
> >this thing; or you could do it all in code and have a manage_afterAdd 
> >method that adds a preconfigured Formulator form.
> >Source and/or docs of Formulator should give you a clue how
> >to instantiate one with the right config.
> > 
> >
> That's kind of what I was thinking. AbracadabraObject appears to have a 
> method call that allows you to use its magic in code, which I think is 
> exactly what I want, although as before I'm very surprised that this 
> sort of functionality doesn't exist in Zope proper.

Well, it's not really all that hard.
Googling ZopeLabs turns up a bunch of potentially relevant recipes.
...although, i cheated and searched for the method names because
I already know what they are :-)

http://www.zopelabs.com/cookbook/1008971158
http://www.zopelabs.com/cookbook/1059840939
http://www.zopelabs.com/cookbook/1045607641 (for CMF, but works
for any PropertyManager)
http://www.zopelabs.com/cookbook/1022683717


> I guess my desires aren't actually all *that* in-line with the main body 
> of Zope users, as I do *not* want the users of this application to ever 
> see a ZMI screen. 

That's not so unusual.. see for example CMF and all its offspring,
e.g.CPS, Plone

> Another possibly far-fetched feature I'd like, which again I believe was 
> part of ZClasses, would be to be able to tweak the instances' Formulator 
> forms after the fact...e.g. add another data field a year down the road. 

to all of 'em? Traditionally we do this sort of thing via an
iterator script. Something like:

all = context.ZopeFind(context, obj_metatypes=['Formulator Form'],
   search_sub = sub)
for form in all:
form.callSomeMethod() # i'm too lazy to look up the formulator API

> Of course this then means that I both do and don't want these cloned 
> forms to match up with the central one, and I'm not at all sure that I 
> can accomplish this without writing lots of my own code to handle it.

yep, there's no free lunch with that kind of problem.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )