Re: [Zope3-Users] Are we following the flow (Python 3)

2009-01-22 Thread David Pratt
Hi Shane, Roger and list. Personally, I think there needs to be  
prioritization myself beginning with the essential packages to zca.  
zodb would be next. I am not sure about anything else. My feeling is  
the rest might need to be considered legacy. It would be unrealistic  
to move forward with these without untangling the dependencies. I  
have stopped using much of zope for this rationale alone.  It was  
impractical to wade into it for a variety of reasons. I had raised  
the issue of Python 3K on the list quite some time ago and it has  
been on my mind for quite a while.

I have been participating in some discussion with others about  
merging Pylons, TurboGears and repoze.bfg to focus on a core that  
python developers can rely upon into the future. I believe this type  
of merge would be analogous to what has happened with Rails and Merb.  
It is still conceptual and will be called Pypes if it fully  
materializes. It would also provide the way forward since the core  
will support zca development. The framework will run on webob as  
repoze.bfg does. Webob has become the defacto request for wsgi  
frameworks.  URL traversal as zope does will be a routing option.   
The routing method will be pluggable as will the type of database  
hookup, etc. Bfg is already doing this. In any case, the discussion  
has been taking place at http://www.openplans.org/projects/ 
pypefitters/project-home on its mailing list. Much of this came  
originally from discussion we started on irc. I would expecting more  
formalization at Pycon leading to a code base.

In any case, Pypes, if it fully materializes, may be point of  
departure into the future. Certainly prioritizing the work of getting  
the most essential essence zope packages more future proof can't  
hurt. Zope owes considerable credit to Jim Fulton for its vision and  
success. It is up to Jim to determine the direction of zope. The  
reality at present though, is that zope is loosing ground among the  
python community. It might be better to unite the python community  
under a common core that supports zca development and full wsgi.  I  
think a common core allow developers to focus on better programming  
and packages than we are seeing today. We do not need repeat the  
common, but important underlying framework code in my opinion.  
Further, we all want to use the more difficult bits like security,  
authentication, sessions, etc with assurance. Interestingly, this  
discussion came about as there was recognition that we were using  
many of the same things already -  had more in common than we were  
different. It has also become increasingly easier to create your own  
framework.

Python itself will be challenged, and perhaps threatened when we are  
able to access 32, 64 or 1000 core hardware of the future. if there  
is a solution forthcoming on the GIL we could all wind up programming  
predominantly in Erlang in 3 - 5 years - who know's for sure. Some  
transition is already occurring to some extent in this area.

Regards,
David

On Jan 15, 2009, at 1:28 PM, Shane Hathaway wrote:

> Roger Ineichen wrote:
>> I didn't say we should start the refactoring today or tomrrow.
>> But it whould be a good idea to talk about this painfull piece
>> of work. My personal wish is to see some dicussion about how
>> we do it instead of if we should do it now or later.
>
> The best thing to do now is to make as much code as possible work with
> the 2to3 conversion utility.  I am hopeful that we can cover nearly  
> all
> Zope 3 components that way.
>
> Shane
> ___
> Zope3-users mailing list
> Zope3-users@zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Not shutting z3 program for maintenance

2008-08-13 Thread David Pratt
If your talking about changes on the application level, if zodb is your
datastore, this would be appropriate. You can read more on zope wiki
about zeo to get help. Since you are concerned about shutting down a
single server I am assuming your setup is not large.

Large setups would most likely be load balanced across multiple
instances per server and over more than a single machine for
availability. This provides other possibilities that include diverting
requests from the application server you are maintaining such as
temporary changes on balancer or DNS (in case of round robin DNS setup)
for example. These days, it can also mean just firing up another server
with the improvements to take load and killing off the one that would
otherwise need maintenance.

If your talking about changes at database level, this depends on the
datastore, and technologies your are using for replication and backup.
Don't think this helps much since its pretty generic answer. You might
also find some reading in plone docs I believe about system maintenance
for zope - so this might be another place to look, or in a plone book
for that matter.

Regards,
David


hass wrote:
> Hello all,
> 
> I did some extensive Z3 2 year ago and now I am warming up to get into
> the pool of z3 again.
> 
> I was wondering if there was any way in z3 not to shut the whole program
> down when code maintenance is needed.
> It wold be like having a simple instance run in the background which can
> do the basics, and then other functionalities plug into it as different
> z3 instances.
> so when one needs to update the code in one part, it can only shut the
> responsible program (instance) without shutting the whole web server.
> 
> I googled a bit and thought maybe by having multiple instances which
> share a database through ZEO and apache's rewrite module to redirect
> change the port based on the URL, I can bundle something up but that
> doen't seem so elegant I suppose.
> Is there a more standard way to do this?
> What do z3 experts do when they have a big server with many logically
> seperate functionalities and they want to update only one of them, plus
> they don't want to have down time for the whole server.
> 
> Any help is greatly appreciated.
> Hass
> 
> 
> 
> 
> 
> 
> 
> ___
> Zope3-users mailing list
> Zope3-users@zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: XML schema definitions, zope.schema and z3c.form

2008-05-17 Thread David Pratt
Sorry. I missed your earlier post and have the link to the work. Many 
thanks.


Regards
David

David Pratt wrote:
Hi Christian. Can you advise what was the outcome of this at grokkerdam. 
  Many thanks.


Regards,
David


Christian Klinger wrote:

Hi Nylan,

we are working during the grokkerdam sprint on the same topic.
We used userschema, and ore.alchemist as exampels.

I think userschema has some xml thing.

Hope this helps,

Christian

http://agendaless.com/Members/tseaver/software/userschema
http://pypi.python.org/simple/ore.alchemist/



Hello,

I need some advice from experienced zope3 developers. ;-)

Use case:
1. Receive xsd from a server(see example xsd)
2. use xsd with zope3(add,edit forms with z3c.form)


I've found this solution(supports only simple elements at root level):
http://blogs.nuxeo.com/sections/blogs/julien_anguenot/2005_08_19_xml-schema-support-on 



Are there other solutions, besides the link above, I haven't 
found/noticed?

Something able to manage more complex types?

Any help or advice appreciated!

best regards


Example XSD:

http://www.w3.org/2001/XMLSchema";
  targetNamespace="http://schemas.domain.com/SQLSource";
  xmlns:tns="http://schemas.domain.com/SQLSource";
  elementFormDefault="qualified">

  

  

  

  

  
  
  

  

  

  

  

  

  

  



  



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: XML schema definitions, zope.schema and z3c.form

2008-05-17 Thread David Pratt
Hi Christian. Can you advise what was the outcome of this at grokkerdam. 
  Many thanks.


Regards,
David


Christian Klinger wrote:

Hi Nylan,

we are working during the grokkerdam sprint on the same topic.
We used userschema, and ore.alchemist as exampels.

I think userschema has some xml thing.

Hope this helps,

Christian

http://agendaless.com/Members/tseaver/software/userschema
http://pypi.python.org/simple/ore.alchemist/



Hello,

I need some advice from experienced zope3 developers. ;-)

Use case:
1. Receive xsd from a server(see example xsd)
2. use xsd with zope3(add,edit forms with z3c.form)


I've found this solution(supports only simple elements at root level):
http://blogs.nuxeo.com/sections/blogs/julien_anguenot/2005_08_19_xml-schema-support-on 



Are there other solutions, besides the link above, I haven't 
found/noticed?

Something able to manage more complex types?

Any help or advice appreciated!

best regards


Example XSD:

http://www.w3.org/2001/XMLSchema";
  targetNamespace="http://schemas.domain.com/SQLSource";
  xmlns:tns="http://schemas.domain.com/SQLSource";
  elementFormDefault="qualified">

  

  

  

  

  
  
  

  

  

  

  

  

  

  



  



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Get anonymous and logged users

2008-04-07 Thread David Pratt
Hi Chris. Yes, I was looking at using sqlite for this. A guestimate is 
all you are going to get for anonymous users for sure.


Regards,
David

Chris Withers wrote:

David Pratt wrote:
I was thinking of a small wsgi app that puts ip into a database or 
dict and remove ips if they are not active within a time interval. 
Sessions will give logged users so they can be differentiate with 
anonymous. Think that should do it. Seems simple enough, any other ideas?


This is all well and good as long as you accept that it's only ever an 
guestimate ;-)


I'd also suggest using something other than zodb to store this information.

cheers,

Chris


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Question about what recipe install needs to return

2008-04-06 Thread David Pratt
Hi Jim. Many thanks. I created a list of paths to return and am just 
extending the list for each call to zc.buildout.easy_install.scripts 
which is fine. I was just curious since there is no uninstall in this 
case so thought I would ask.


Regards,
David

Jim Fulton wrote:


On Apr 6, 2008, at 2:10 PM, David Pratt wrote:
Hi. I have created a recipe where I am attempting to install multiple 
scripts to bin as part of an install method. As a result I have a few 
calls to zc.buildout.easy_install.scripts but am returning nothing 
from the install method.


The recipe emits a warning indicating 'A path or iterable os paths 
should be returned'. In fact I cannot return a list indicating it 
needs a string. Is it necessary to return anything from the install 
method?


Yes.  You must return an string or an iterable of strings.


Why?


Because that's the API.  :)

Returning None is almost always a bug.  If you really want to say you 
didn't install anything, return ().


If you are installing scripts, then you should return their paths so 
they get uninstalled if your part is uninstalled.


Jim

--
Jim Fulton
Zope Corporation



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Question about what recipe install needs to return

2008-04-06 Thread David Pratt
Hi. I have created a recipe where I am attempting to install multiple 
scripts to bin as part of an install method. As a result I have a few 
calls to zc.buildout.easy_install.scripts but am returning nothing from 
the install method.


The recipe emits a warning indicating 'A path or iterable os paths 
should be returned'. In fact I cannot return a list indicating it needs 
a string. Is it necessary to return anything from the install method? Why?


Regards
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope-dev] Re: [Zope3-Users] How do I automatically login a user

2008-04-03 Thread David Pratt
Thanks Jim for doing this. Actually, the domain is something I have been 
looking for also. These other features are really nice. I am hoping this 
 can be worked into something like z3c.authentication for generic use. 
Hoping roger is following this.


Regards,
David

Jim Fulton wrote:


Let's move this discussion to zope-dev.

On Apr 2, 2008, at 5:36 AM, kevin gill wrote:

Please check in the code to the sandbox and I will have a look at it. The
coding looks straight-forward, but choosing how to work it into the
existing  components.

I will look at the code and come back with questions.



I just checked 2 files, session.txt and session.py, into

  http://svn.zope.org/Sandbox/J1m/

These provide several features, most of which are of particular interest 
here:


- An api to save session credentials independent of login,

- saving sha-encoded passwords,

- logout api

- having an optional additional credential of a user domain,
  (probably not of general interest)

Jim

--
Jim Fulton
Zope Corporation


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


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Get anonymous and logged users

2008-04-02 Thread David Pratt
I was thinking of a small wsgi app that puts ip into a database or dict 
and remove ips if they are not active within a time interval. Sessions 
will give logged users so they can be differentiate with anonymous. 
Think that should do it. Seems simple enough, any other ideas?


David Pratt wrote:
I am would like to display the number of users online getting an idea of 
anonymous and logged in users. This is a staple of many php 
applications. Can someone suggest an appropriate mechanism for this in 
zope 3. Many thanks.


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Get anonymous and logged users

2008-04-02 Thread David Pratt
I am would like to display the number of users online getting an idea of 
anonymous and logged in users. This is a staple of many php 
applications. Can someone suggest an appropriate mechanism for this in 
zope 3. Many thanks.


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Attn Jim Fulton: Buildout builder

2008-03-15 Thread David Pratt
Hi Malthe. I tend to agree. Anyone that can write python can create a 
recipe of any kind for whatever purpose. Most concrete recipes already 
exist for the fairly standard things one needs to do. At the very least, 
they can be emulated by someone new to buildout. There is little 
daunting about constructing a text file to create a buildout. Reading 
Jim's excellent tutorial and understanding how it works and extending 
for your needs is fairly explanatory.


Perhaps I am missing the point of the project, but a gui may be more 
difficult to maintain than it is worth. Each recipe has its own options 
that must be validated. The fact that they are options means they can be 
used/not used in most cases. Even then, one would still be faced with 
key/value pairs that would involve entering text or turning options on 
or off. I am assuming that the next step would be generating 
documentation to use the gui explaining the options that can be chosen 
and possible values and consequences for each recipe. So not really sure 
what this accomplishes myself.


I guess I would also ask what audience are the project is intended to 
serve. Either you are a developer and are concerned of the details of 
the software or an implementer/user that knows less or perhaps nothing? 
If the second is what the project is aiming at, then perhaps this is 
better accomplished with traditional installers and packaging tools with 
better documentation about the specific application (plone for example).


I tend to see more suggestions that seem to have the objective of 
removing the developer from an understanding of what they are working 
with. If there is a high level of redundancy, or a need to assist/reduce 
the tedious or mundane, then it is reasonable to consider tools. Other 
than that, why a tool would be used by someone that would not understand 
or interpret its output as you have pointed out. The text of a buildout 
can be assembled fairly quickly when you know what you are doing since 
most common things you need to do are available. Perhaps the recipes 
could be communicated better, but then is this not what we have pypi for?


Regards,
David


Jim Fulton wrote:
I replied to this privately. This has gotten so much discussion, I think 
I'd better clarify my position.


On Mar 14, 2008, at 8:27 AM, Derek Richardson wrote:

I am the Plone champion for the buildout builder. The buildout builder 
will be a web application, likely written in Grok, that will allow 
textually-challenged users to configure a buildout via a GUI and 
receive a .cfg in return.


Jim, you mentioned at PSPS-2008 that you would gladly help whoever 
championed this.



There was a misunderstanding or miscommunication.

I volunteered to help with a buildout-based installer. This is *much* 
narrower than a buildout-building GUI.  My thought was that, for a 
simple installer, there could be  GUI that asked the user some 
high-level configuration questions and then ran a buildout included with 
the software to set up instances.  This is similar to what we're doing 
for deployments at ZC where we have high-level non-buildout 
configuration files that collect options that control instance installs. 
The instance installs are actually done by running buildouts.


I have about as much interest in a GUI to help me write buildout 
configurations as I have in a GUI to help me write Python scripts. :)


I do see potential benefits of having GUIs or other automation tools to 
help people get started assuming that the scope of these tools is very 
narrow. They are only either to help people get started or for people 
who's needs will never be anything but simple.


JIm

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Dynamic interfaces ?

2008-03-10 Thread David Pratt
Yes, this is interesting, thank you for sharing this. I had done some 
things with xml schemas as zope schemas a while back and had also seen 
other work in this area.


Regards,
David


Jim Washington wrote:

Thierry Florac wrote:

Hi,

I'm looking for a way to handle what I've called "dynamic interfaces".
My problem is quite simple : I have an application where an
administrator can define "content types" ; for each content type, a set
of common predefined attributes are used, but the administrator can
define for each content type a set of custom attributes, each attribute
being defined by a name, a datatype (text, textline, date, boolean...)
and eventually a list of references values (for choices) ; definition of
these custom attributes is persistent and stored in the ZODB.
When creating data, contributor can select the data type, according to
which the matching set of attributes will be available in forms.

The main point is probably that I'd like to use z3c.form package "as
usual", and so integrate this attributes management into Zope3
interfaces machinery... ; I suppose I should need a king of "interface
factory", but couldn't find any link about that.

Thanks for any help,

  Thierry Florac
  

Hi, Thierry

I was experimenting with dynamic interfaces a while back, and this is 
where I ended up.


Theoretically, Interfaces are just python class objects, not importantly 
different than any others.


You just need to create a python class dynamically:

import new
from zope.interface import Interface

dyn_iface = new.classobj(name,(Interface,),definitions)

where

name is a string, the name of your interface class
Interface is zope.interface.Interface or a descendent
definitions is a dict of class members 
{'__doc__':docstring,'name':Schema,'name2':Schema2}


so,

if your class could be defined in an interfaces file as


class IMyClass(Interface):
   """IMyClass interface"""
   yourName=TextLine(title=u'Your name',required=True)


you can dynamically create it like this:


import new
from zope.interface import Interface
import zope.schema

definitions = {}
# __doc__ needs to be there; empty string is fine
definitions['__doc__'] = 'IMyClass Interface'
definitions['yourName'] = zope.schema.TextLine(title=u'Your 
name',required=True)


iface_name=u'IMyClass'

myiface = new.classobj(iface_name.encode('utf-8'),(Interface,),definitions)


At this point, myiface should be usable as if generated in an interfaces 
file.


According to the python docs, you need to be careful when using "new", 
so appropriate caution is advised. 
http://docs.python.org/lib/module-new.html



HTH,

- Jim Washington

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: AW: AW: AW: AW: [Zope3-Users] z3c.form - howto ignore the contextfor singlewidgets in an Edit form?

2008-02-18 Thread David Pratt
Hi Roger. You make great points here for why those serious about zope's 
potential really ought to consider explicit configuration. I also 
believe taking time to understand configuration, dependencies and what 
is actually being configured is better that implicitly trusting 
something automatic to do the right thing.


Implicit automatic configuration is a good starting point howeverfor 
folks just starting z3 as you have pointed out but it is best for to 
learn this for the reasons you cited and more.


Good points about concise packages with specific functionality also.

Regards,
David

Roger Ineichen wrote:

I guess it's better to learn what's going on then to
develope for newcommers. I guess Grok is the right place
for them. Not that Grok is bad, but the target of Grok, 
as far as I can see, is the ability to develop with minimal

effort and everything should just work.

I guess this is not true for zope as "the component system".
There you really have to know what's going on. Or at least
you need to learn that if it comes to speedup optimisation.
There is no Zope3 which fits for everything and z3c packages
which most of them are base libraries are not the level to
blow them up. I realy like to have small independent packages
with minimal dependencies which I can assamble to the right
thing for each project. 

Feature separation can be made at different levels: an egg 
contains several packages that contain several modules that 
contain several classes, and I think you will always have 
unused classes in a module, unused modules in a package and 
unused packages in an egg, unless there is one egg per class...
What you really want is having control on what is eventually 
loaded. Isn't it already possible with zcml?


The exclude directive form zc.configuration helps a lot
to exlude configuration loading. But independent eggs
make it more explicit and let people think one more 
time about their dependencies which is allways a good thing.


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3ext

2008-02-15 Thread David Pratt

Hi Nikolay.

Just wanted to say that I have been aware of your efforts with z3ext on 
sourceforge for a while and wish to congratulate you on moving forward 
with a comprehensive ZPL licensed CMS. It is an important development 
for a number of reasons:


* Efforts such as zext and Hivurt exemplify how to glue components and 
packages together to create substantive applications. These type of 
tangible examples have been missing from the zope 3 landscape. In 
addition to your application being extremely useful in its own right, it 
will help developers understand how to assemble components and architect 
an application.


* The packages in the zext namespace further increase the pool of 
liberally licensed zope components. Over the past few years, there have 
a steadily increasing number of solid packages, componentry and 
repositories popping up. Zope corp, Lovely, the z3c community efforts to 
name a few (but there are certainly many others I am aware of). This is 
resulting in a plethora of high quality packages and serves as as a 
stimulant to encourage reuse for virtually any purpose.


The fact that the project and packages are all under the ZPL is not to 
be underestimated. It is a key opportunity for developers to engage in 
sharing and consumption of reusable code without licensing conflict. I 
strongly believe that liberal licensing scenario have been a critical 
ingredient to the success of Django, TurboGears, Twisted and other major 
frameworks.


* A low barrier to a functioning CMS reduces the cost and risk of 
experimentation, implementation and deployment of a full zope solution. 
I believe that when a clean break is made from the older api's of zope2, 
the scenario for development is more understandable. As far as I can 
see, the future of folks utilizing a combination of z2 and z3 
technologies will only grow out the z3 components while factoring out 
the old. For folks coming in for the first time, zext will help show 
them the way and give them an excellent CMS that they can build upon.


* Projects like zext, Hivurt, and Lovely's deployments demonstrate the 
power of zope3. Zope3 is not simply a library of components but a 
framework of possibility. The new 'zope' is a rich superset of 
functionality that provides the opportunity for a python programmer to 
integrate packages from all parts of the python world. It shows how 
competent systems can be created that are elegant, agile and capable of 
competing with anything out there (most of it from existing code bases). 
On top of it, you have scalability and the reliability of a mature code 
base.


* zext can show developers a different zope endpoint than Grok. Grok is 
an easier way to create zope3 applications and an important door to the 
world of zope. That said, I believe it is important to demonstrate 
conventional package patterns as well. While I favor explicit 
configuration for my own work, Grok removes much of the complication of 
assembling useful components. Grok continues to push on barriers to 
harness the potential of zope. More importantly though, when all this 
goodness is zope in general, it is good for the community as a whole.


Overall, the comments I have read about giving the project different 
name or different skin ought to be considered as you move forward. On 
the other hand, they take nothing away from what I see as a very strong 
effort of your behalf. I look forward to seeing a release in the future. 
Personally, I hope you receive more well deserved support.


Further, I encourage folks that may be using legacy zope to take a 
strong look at the zext project and the many packages that have been 
released under the ZPL as a result. zext, Grok and the many other 
efforts underway exemplify the new face of 'zope'. Many thanks Nikolay 
for this effort.


Regards,
David


Nikolay Kim wrote:

Hello,

Last year i worked on zope3 based cms. Today i built first site for my
friend without python coding, only TTW customization. So i think system
is ready for first development release. All code released under ZPL
license.

Basic features: Control panel, Principals managerment, Personal preferences, 
Basic TTW customization, Pluggable Content Types, Pluggable membership system, 
Members home folders, Product installer, Cataloging and searching, 
Full text searching with lucene, Basic forum product, Easy install with buildout


Here project homepage - http://z3ext.net/
Source code - http://sourceforge.net/projects/z3ext
Discussion Forums - http://z3ext.net/forums/

Everyone can try it locally
  svn co https://z3ext.svn.sourceforge.net/svnroot/z3ext/z3ext.portal/trunk 
z3ext
  cd z3ext
  python2.4 ./bootstrap.py
  ./bin/buildout
  ./bin/app

z3ext.net is built with z3ext, you only need checkout z3ext.homesite package
  svn co https://z3ext.svn.sourceforge.net/svnroot/z3ext/z3ext.homesite/trunk 
z3ext


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/ma

Re: [Zope3-Users] Buildout bug?

2008-02-14 Thread David Pratt

David Pratt wrote:

Hi Jim. I think ${name} or ${part} would be good.

Sorry for poor example. baz in prev example could be a version or other 
differentiating information to form a path name. Here's a better example 
though there is many places this could be used.


extra-options = --datadir=${software:prefix}/share/${name}

BTW, can you think of anyway to work around the first issue for buildout 
part. For substitution to work, could buildout part have its own dict as 
a data source for substitution prior to files being configured as a 
special case). Then after config do the routine substitution. So you 
could have something like the following. Thing is this is a pretty small 
example and when you get a number of configurations going with long 
paths, well its sort of looks ugly too, especially if you are using urls 
or paths that may be the same.


Sorry, should have clarified that it is the scenario with the long long 
paths or urls that is undesirable. The first case below represents what 
I'd rather see which keeps it fairly clean.




[buildout]
develop = .
parts = somepart anotherpart
etc = p1=/somewhere/in/my/filesystem
  p2=/just/another/somewhat/long/path
extends = ${etc:p1}/bar.cfg
  ${etc:p1}/smallbar.cfg
  ${etc:p1}/bigbar.cfg
  ${etc:p2}/baz.cfg

contrast this with the following without the prefixes:

[buildout]
develop = .
parts = somepart anotherpart
extends = /somewhere/in/my/filesystem/bar.cfg
  /somewhere/in/my/filesystem/smallbar.cfg
  /somewhere/in/my/filesystem/bigbar.cfg
  /just/another/somewhat/long/path/baz.cfg

Regards,
David


Jim Fulton wrote:


On Feb 14, 2008, at 5:59 PM, David Pratt wrote:
One other thing that I have not yet seen is using the part name 
within the part which would be useful. Something like:


[foobar]
baz = bar
log = /some/path/${foobar:?}-${foobar:baz}.log



I don't follow the example.  I can thing of perhaps similar examples:

  log = /some/path/${name}-something.log

where ${name} refers to the part name.  I definitely want to do 
something like this.  I'm not sure what syntax should be used.


Jim

--
Jim Fulton
Zope Corporation



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout bug?

2008-02-14 Thread David Pratt

Hi Jim. I think ${name} or ${part} would be good.

Sorry for poor example. baz in prev example could be a version or other 
differentiating information to form a path name. Here's a better example 
though there is many places this could be used.


extra-options = --datadir=${software:prefix}/share/${name}

BTW, can you think of anyway to work around the first issue for buildout 
part. For substitution to work, could buildout part have its own dict as 
a data source for substitution prior to files being configured as a 
special case). Then after config do the routine substitution. So you 
could have something like the following. Thing is this is a pretty small 
example and when you get a number of configurations going with long 
paths, well its sort of looks ugly too, especially if you are using urls 
or paths that may be the same.


[buildout]
develop = .
parts = somepart anotherpart
etc = p1=/somewhere/in/my/filesystem
  p2=/just/another/somewhat/long/path
extends = ${etc:p1}/bar.cfg
  ${etc:p1}/smallbar.cfg
  ${etc:p1}/bigbar.cfg
  ${etc:p2}/baz.cfg

contrast this with the following without the prefixes:

[buildout]
develop = .
parts = somepart anotherpart
extends = /somewhere/in/my/filesystem/bar.cfg
  /somewhere/in/my/filesystem/smallbar.cfg
  /somewhere/in/my/filesystem/bigbar.cfg
  /just/another/somewhat/long/path/baz.cfg

Regards,
David


Jim Fulton wrote:


On Feb 14, 2008, at 5:59 PM, David Pratt wrote:
One other thing that I have not yet seen is using the part name within 
the part which would be useful. Something like:


[foobar]
baz = bar
log = /some/path/${foobar:?}-${foobar:baz}.log



I don't follow the example.  I can thing of perhaps similar examples:

  log = /some/path/${name}-something.log

where ${name} refers to the part name.  I definitely want to do 
something like this.  I'm not sure what syntax should be used.


Jim

--
Jim Fulton
Zope Corporation



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout bug?

2008-02-14 Thread David Pratt
Hi Jim. Thank you for your reply. I use a number of separate config 
files for buildouts, some with longer paths - was hoping to shorten them 
up a bit to make them clearer (particularly if they originate from same 
root).


One other thing that I have not yet seen is using the part name within 
the part which would be useful. Something like:


[foobar]
baz = bar
log = /some/path/${foobar:?}-${foobar:baz}.log

Many thanks.

Regards,
David

Jim Fulton wrote:


On Feb 14, 2008, at 2:58 PM, David Pratt wrote:

Hi. I have done some fairly sophisticated buildouts over the past year 
but here's something I have not done with an extension before now that 
I thought ought to be possible:


[buildout]
extends = ${some-part:path}/foo/bar.cfg

[some-part]
path = /some/where/on/my/filesystem

This produces an error while initializing since it is unable to find 
the file but works correctly if the full path is provided. I use 
substitutions like this all over the place. Should they not work in 
the buildout part as well? Many thanks.



Substitutions don't work for extends because extension (assembling files 
to create a configuration database) happens before substitutions.


Jim

--
Jim Fulton
Zope Corporation



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Buildout bug?

2008-02-14 Thread David Pratt
Hi. I have done some fairly sophisticated buildouts over the past year 
but here's something I have not done with an extension before now that I 
thought ought to be possible:


[buildout]
extends = ${some-part:path}/foo/bar.cfg

[some-part]
path = /some/where/on/my/filesystem

This produces an error while initializing since it is unable to find the 
file but works correctly if the full path is provided. I use 
substitutions like this all over the place. Should they not work in the 
buildout part as well? Many thanks.


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope-dev] Re: [Zope3-Users] Re: Zope 3.4.0 candidate 1 Released

2008-02-01 Thread David Pratt

Martin Aspeli wrote:

I think you're right on the money. I really have very little idea of how 
Zope 3 is supposed to be used right now, or what "Zope 3" really is (and 
no-one fully agrees, as evidenced by other posts in this thread). Having 
to piece together that information from the mailing list is pretty dire.


Hi Martin. Today, zope is a superset of functionality. We are all using 
sets of packages from this superset for our own projects in different 
ways. It may be hard for someone new to understand that you can have a 
framework by combining components and the functionality you want from a 
variety of packages (that may not packaged neatly for you). On the other 
hand, it is evolution that we are not confined by this also. In fact, it 
is analogous to python. It provides capability while you provide the 
imagination and effort to create what you want.


I believe that the folks attracted to zope seek something more from it. 
Zope's has a history of stability, scalability and innovation in python. 
While I appreciate that django, turbogears, and pylons have their own 
appeal, zope offers a mature and hardened code base with great 
strengths. This is not to say zope cannot provide a friendly and 
welcoming introduction for the python newcomer. I believe Grok provides 
this while opening the door to the potential of zope in a way that can 
simplify development.


I haven't yet seen the new documentation effort for zope but hope to 
contribute in some way to help explain what zope is today. I think Tres 
is accurate and pragmatic in his estimate of the current situation. 
Since eggs were introduced, strategies to cope with the frustration and 
growing pains encountered with eggs and setup tools had to be created.


Packaging indexes and pinning egg versions were the response to the 
changes of the last year or so. I understand the desire for continued 
releases of the monolithic zope. On the other hand I have seen the Grok 
community respond by pinning its egg versions, Jim Fulton work to 
facilitate a mirror for distributions, and Stephan assert leadership to 
create and document a system for kgs to bring sets of eggs under control.


The pattern for others working with the older monolithic zope exists in 
these examples. I believe that sets, indexes, and pinning versions 
provides the migration path for others. kgs is well documented. The 
notion of identifying versions in a buildout has been documented too. I 
believe Tres is spot on. I realize this will mean that projects using 
the old style releases with need to evolve their development and 
deployment approaches and do a bit more work to keep their eggs in 
order. In fact, this is happening all over in the python community at 
large - not just zope. I was surprised recently to see that even 
wxPython is working to eggify its releases also.


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: [Zope-dev] Zope 3.4.0 candidate 1 Released

2008-02-01 Thread David Pratt
Hi Martijn. I am familiar with grok and the fun and welcoming community 
you have created. With the perspective I have suggested, releases are 
only sets with different names giving meaning to each set for developer 
groups.


As a project, grok is currently pinning eggs but can also provide a kgs 
for the set known as grok. The full story of zope is about the assembly 
of packages into projects. It need not be only one thing or the other 
which is the point. It is really up to individual developers to 
determine their flavor of zope and what it means to their own projects 
and style of development.


My thinking though is that we can create a more cohesive community if 
the code base were all known as 'zope' and developers are all working 
from the superset of zope (which is in essence just the code base of 
packages we all use).


Regards,
David

Martijn Faassen wrote:

Hey,.

On Feb 1, 2008 4:09 PM, David Pratt <[EMAIL PROTECTED]> wrote:
[snip]

It might be nice for the marketing of zope to give each set of eggs a
nice name. Just using familiar mozilla names as an illustration, see how
nice zope-thunderbird or zope-firefox look. So do away with the kgs in
the name and create a brand where zope 2 doesn't look like the lesser
version of zope and zope3 isn't a library. They are only sets of the
packages we generally refer to as zope :-)


There is this little community project called "Grok" which among other
things aims at better marketing of Zope 3 technologies:

http://grok.zope.org

We've been at it for over a year. Now with all new website!

I realize that Grok isn't to the tastes of everybody in this
community. They may wish to market non-Grok Zope 3 better. My
suggestion is for them to contribute to the Zope website project:

http://www.openplans.org/projects/zorg-redux

(appears down at the moment, but I think that this is the correct URL)

Regards,

Martijn


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: [Zope-dev] Zope 3.4.0 candidate 1 Released

2008-02-01 Thread David Pratt
I would say so also. Since z2, z3 both be released in future as eggs, I 
I expect the only difference to be in kgs that ensures a working set of 
packages (whether it is zope3, zope2, or for that matter any other project).


Any sort of release in the future should only reflect a state of a 
working collection of packages. Certainly calling the collection of 
packages that produces a working zope3 installation a library would be 
inappropriate in my view.


One approach might be calling the releases something zope-kgs-2 and 
zope-kgs-3 so it is all branded 'zope' - just refer to the *set* of eggs 
we are taking about. While this is more explicit, it does not sound very 
nice. kgs looks like kilograms to me any time I look at it :-)


It might be nice for the marketing of zope to give each set of eggs a 
nice name. Just using familiar mozilla names as an illustration, see how 
nice zope-thunderbird or zope-firefox look. So do away with the kgs in 
the name and create a brand where zope 2 doesn't look like the lesser 
version of zope and zope3 isn't a library. They are only sets of the 
packages we generally refer to as zope :-)


Regards,
David



Tom Hoffman wrote:


Or if not, it would seem like there would be a better argument for the
new approach having a new name than the old one.

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout and custom python

2007-12-21 Thread David Pratt

Jim Fulton wrote:


On Dec 20, 2007, at 8:03 PM, David Pratt wrote:

Hey Darryl. Our minds were in a similar place today. I finally had 
decided to move away from my system python starting on my mac and also 
having a spot of trouble. I put something simple together below to 
illustrate what happened in my instance.


Here the eggs built with the python would not install. I initially 
though it was the lxml I was compiling, but it was just happened to be 
the first part requiring the custom-python. Eggs were made, and I 
could see the temp folder also, but when was finalizing the install, 
it threw the error and without much verbosity, the tempfolder it was 
installing into disappeared.


Note, I did not include the custom-python as a part in the buildout. I 
tend to like the python24:location type of notation since it is fairly 
explicit when you have a number of pieces of software you are building.


Regards
David

[buildout]
develop = .
parts = python24
   interpreter
index = http://download.zope.org/ppix
log-level = DEBUG

[python24]
recipe = zc.recipe:cmmi
url = http://python.org/ftp/python/2.4.4/Python-2.4.4.tgz

[custom-python]
executable = ${python24:location}/bin/python

[interpreter]
recipe = zc.recipe.egg
interpreter = interpreter
eggs = Cheetah==1.0
python = custom-python


Here are the highlights:


Having *just* highlights makes it difficult to follow what's going on.




Some verification it is using the right python...

Getting distribution for 'Cheetah==1.0'.
We have the best distribution that satisfies 'setuptools'.
Picked: setuptools = 0.6c7
Running easy_install:
/Users/davidpratt/Desktop/Buildouts/osxdeploy2/parts/python24/bin/python 
"-c" "from setuptools.command.easy_install import main; main()" 
"-mUNxd" 
"/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/tmprQq-MH" "-v" 
"/Users/davidpratt/Desktop/Buildouts/download-cache/dist/Cheetah-1.0.tar.gz" 

path=/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/setuptools-0.6c7-py2.4.egg 



Processing Cheetah-1.0.tar.gz

Last few lines of output.. some time later.

changing mode of 
/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/tmprQq-MH/Cheetah-1.0-py2.4-macosx-10.3-ppc.egg/EGG-INFO/top_level.txt 
to 755
changing mode of 
/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/tmprQq-MH/Cheetah-1.0-py2.4-macosx-10.3-ppc.egg/EGG-INFO/scripts/cheetah 
to 755
changing mode of 
/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/tmprQq-MH/Cheetah-1.0-py2.4-macosx-10.3-ppc.egg/EGG-INFO/scripts/cheetah-compile 
to 755


Installed 
/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/tmprQq-MH/Cheetah-1.0-py2.4-macosx-10.3-ppc.egg 



Because this distribution was installed --multi-version, before you can
import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to one of
these examples, in order to select the desired version:

   pkg_resources.require("Cheetah")  # latest installed version
   pkg_resources.require("Cheetah==1.0")  # this exact version
   pkg_resources.require("Cheetah>=1.0")  # this version or higher


Note also that the installation directory must be on sys.path at 
runtime for
this to work.  (e.g. by being the application's script directory, by 
being on

PYTHONPATH, or by being added to sys.path by your code.)

While:
 Installing interpreter.
 Getting distribution for 'Cheetah==1.0'.
Error: Couldn't install: Cheetah 1.0
[mac-pg:~/Desktop/Buildouts/osxdeploy2] davidpra%


That's very odd.  It feels like something is missing in the output.


Hi Jim. Yeah, I know. Weird huh ... the folder was there, then 
disappeared and no other clue why it bailed when finalizing. I did 
buildout -vvv to give me some good verbosity for debugging also.  Thing 
is when run with system python, it does the right stuff. Anything more 
you could suggest I check out?


I am glad I decided to stick with 10.4 for a little while longer. I am 
still on a PPC platform. I have had my own trouble nasty experience with 
a 10.4.9 --> 10.4.10 upgrade a couple of months ago and ended up 
reinstalling the os and leaving it at 10.4.9 until I get a new machine. 
Did not need the os interfering with my work. Odd for apple to have this 
issue, but I was not alone at the time.


Regards,
David


I tried reproducing this. I didn't have the contents of your directory, 
so I had to comment out "develop = .".  You have a typo in the recipe 
specification for the python24 part. After fixing that, I ran the 
buildout above using the system Python on Mac OS X 10.5.1.  Worked 
great. The interpreter script uses the custom Python.


The interpreter runs, but when I try to import cheeta, I get a bus 
error..  Unfortunately, there is a problem with using cmmi to install 
Python on Mac OS X 10.5.  There 

Re: [Zope3-Users] Buildout and custom python

2007-12-21 Thread David Pratt

Benji York wrote:

David Pratt wrote:
Hi Benji. This is exactly what I have been doing up till now and has 
been working well for quick work on a local development machine. My 
current thinking though is to take control of as much of the software 
as possible so that development == deployment on my local machine to 
mitigate the risk of breaking things even if it means more disk. I am 
doing this in conjunction with stripping the deployment server to it's 
barest bones and bringing as much of the software into the buildout as 
possible.


I really would like to see a two stage buildout that does the python 
construction with a python.cfg and then the main buildout with 
buildout.cfg file as part of the standard fare. I'm trying a few 
things today to see if a simple event class and callback can be used 
to create the python first and have the callback's handler run the 
main buildout as an experiment.


Where you draw the boundary line between the "environment" and the 
"application" has a big impact on how you make these types of decisions.


You want to find the optimum place to draw that line so you end up 
getting the most benefit from the least amount of work (it's kind of 
analogous to the max-flow min-cut theorem from graph theory).


Hi Benji. You are absolutely right about this. Also I have to say the 
amount of software going into things was sort of freaking me out over 
the last year or so, particulary when all the eggified packages were 
just rolling out. What I am coming to learn is that the set of software 
that I am using, while relatively large is also reasonably finite. And I 
mean the essential server software starts looking small in relation to 
two or three hundred eggs after a while :-)  Secondly, a buildout.cfg is 
pretty readable - I like knowing I don't have to guess about how 
something was built, its all in black and white with setting I no longer 
need to look up or remember. In this way packaging systems like ports 
and yum make you a little lax about a distribution and its settings.


I have a buildout recipe for gcc also, how ironic :-) Crazy thing was 
that pyLucene up until recently would only work on certain platforms 
with gcc-3.4.6, so I have had to go this route to construct a compiler 
that would allow pyLucene to be built also.


I get your point though, and ports and yum are nice and easy to work 
with. The way I am attempting to mitigate issues with buildouts and 
servers is specialization. The fact that a server in as much as possible 
is reliably the same is what I want for administration.


Regards,
David



Let me use an example to illustrate.  Say you decided to build Python 
with your buildout.  After all, your app uses Python, so to have good 
reproducibility you want to make sure Python is perfectly clean and 
built repeatably so you don't get any surprises.  Makes sense.


Your app is enjoying increased success and one day you need to add some 
new servers to your cluster.  You buy a few new machines, put your OS on 
them, and build your app.  You then run your tests and they fail.


Darn.

You investigate and find that your Python was built without support for 
zip compression because the zlib development libraries aren't included 
in your base OS install.  Now you have a decision to make, do you add 
zlib to your buildout, or do you add the zlib development package to 
your OS?


If Python is part of the environment you add the zlib development 
package to your OS.  Of course that means you need a good way of 
controlling what is in the OS (environment).  Conveniently, there are 
ways to do that (RPM, APT, ports, etc.).


At this point if you draw the app/environment boundary to include Python 
in your app, you should add zlib to your buildout, right?  What happens 
if you hit a bug in GCC when compiling Python?  Do you include GCC in 
your buildout to make sure you get the right version?  It gets worse the 
deeper you go. :)



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout and custom python

2007-12-21 Thread David Pratt
Hi Jim. I like this idea. I then makes it trivial to identify impacts of 
using different pythons on your application also since you can just 
change a single line in your buildout. For example, below, just change 
the ${python24:location}/bin/python to whatever python you want to 
evaluate another python including pointing to your system python if you 
wish.


Regards,
David

[python24]
recipe = zc.recipe:cmmi
url = http://python.org/ftp/python/2.4.4/Python-2.4.4.tgz
... more stuff

[python25]
recipe = zc.recipe:cmmi
url = http://python.org/ftp/python/2.5.1/Python-2.5.1.tgz
... more stuff

[active-python]
executable = ${python24:location}/bin/python

[interpreter]
recipe = zc.recipe.egg
interpreter = interpreter
eggs = zc.buildout
   Cheetah==1.0
python = active-python


Jim Fulton wrote:


On Dec 20, 2007, at 8:58 PM, David Pratt wrote:

Right. Thanks for this, there are couple of solutions here and shell 
script is a reasonable solution but these methods seems counter to the 
simplicity of buildout. I had also seen a rebootstrap package in svn. 
I wonder if something similar could not be accomplished this way using 
python with a means of producing a callback. I really don't want 
anything too messy to accomplish this. Many thanks.



I'll note that much of the pain here (or at least in the distutils-sig 
thread)  arises from the fact that the system
Python and the custom Python have the same version but are built in 
incompatible ways. :(  Unfortunately, binary egg names don't capture 
enough information about the ways the eggs were built.


I'm pondering an option to provide different egg directories for 
different Python interpreters.  So, maybe something like:


  [buildout]
  parts = python24 ...

  [python24]
  recipe = zc.recipe.cmmi
  url = ...
  executable = ${buildout:parts-directory}/bin/python
  eggs-directory = ${buildout:directory}/eggs
  develop-eggs-directory = ${buildout:parts-directory}/develop-eggs

The idea is that egg-aware recipes would use the egg locations specified 
in the Python section.  I think this would provide a fairly clean way to 
build and use a custom Python.


Of course, it would be nice to have a recipe to build python that set 
the various variables.


I can see the benefit of building a custom Python as part of the 
buildout when you don't want users of a buildout to build a clean Python 
of their own.  However, if you can require your users to do this, for 
example, if you are your user, then life is much simpler when a clean 
Python is managed separately.


Jim

--
Jim Fulton
Zope Corporation



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout and custom python

2007-12-21 Thread David Pratt
Hi Benji. This is exactly what I have been doing up till now and has 
been working well for quick work on a local development machine. My 
current thinking though is to take control of as much of the software as 
possible so that development == deployment on my local machine to 
mitigate the risk of breaking things even if it means more disk. I am 
doing this in conjunction with stripping the deployment server to it's 
barest bones and bringing as much of the software into the buildout as 
possible.


I really would like to see a two stage buildout that does the python 
construction with a python.cfg and then the main buildout with 
buildout.cfg file as part of the standard fare. I'm trying a few things 
today to see if a simple event class and callback can be used to create 
the python first and have the callback's handler run the main buildout 
as an experiment.


Regards,
David

Benji York wrote:

Darryl Cousins wrote:

I'm trying to created an isolated environment using buildout. I had
understood that defining a custom build python would ensure that all
eggs are installed and compiled with the custom python.


An alternative to building Python with buildout is to build a single 
"clean" Python and use it for all their buildouts.


Some advantages of this approach are that your buildouts take less time 
to build from scratch (no building Python every time), and are a bit 
smaller (by about 115MB on my system).  I keep lots of buildouts around 
(a few dozen), so those advantages add up.


Of course it also lets you stay away from the generally "dirty" system 
Python (just as the Python-per-buildout strategy does as well).

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout and custom python

2007-12-20 Thread David Pratt
Right. Thanks for this, there are couple of solutions here and shell 
script is a reasonable solution but these methods seems counter to the 
simplicity of buildout. I had also seen a rebootstrap package in svn. I 
wonder if something similar could not be accomplished this way using 
python with a means of producing a callback. I really don't want 
anything too messy to accomplish this. Many thanks.


Regards,
David


Darryl Cousins wrote:

Hi David,

I've tried out the methods described here:
http://mail.python.org/pipermail/distutils-sig/2007-November/008489.html

and have plumped for the buildout.sh shell script which builds python
and then uses that to bootstrap and re-continue the buildout. It is
working well and I see that all eggs are then compiled with the compiled
python.

I had already begun using a Makefile to build/test/run the project so I
find it convenient to use a shell script in the mix.

Regards,
Darryl

On Thu, 2007-12-20 at 21:03 -0400, David Pratt wrote:
Hey Darryl. Our minds were in a similar place today. I finally had 
decided to move away from my system python starting on my mac and also 
having a spot of trouble. I put something simple together below to 
illustrate what happened in my instance.


Here the eggs built with the python would not install. I initially 
though it was the lxml I was compiling, but it was just happened to be 
the first part requiring the custom-python. Eggs were made, and I could 
see the temp folder also, but when was finalizing the install, it threw 
the error and without much verbosity, the tempfolder it was installing 
into disappeared.


Note, I did not include the custom-python as a part in the buildout. I 
tend to like the python24:location type of notation since it is fairly 
explicit when you have a number of pieces of software you are building.


Regards
David

[buildout]
develop = .
parts = python24
 interpreter
index = http://download.zope.org/ppix
log-level = DEBUG

[python24]
recipe = zc.recipe:cmmi
url = http://python.org/ftp/python/2.4.4/Python-2.4.4.tgz

[custom-python]
executable = ${python24:location}/bin/python

[interpreter]
recipe = zc.recipe.egg
interpreter = interpreter
eggs = Cheetah==1.0
python = custom-python


Here are the highlights:

Some verification it is using the right python...

Getting distribution for 'Cheetah==1.0'.
We have the best distribution that satisfies 'setuptools'.
Picked: setuptools = 0.6c7
Running easy_install:
/Users/davidpratt/Desktop/Buildouts/osxdeploy2/parts/python24/bin/python 
"-c" "from setuptools.command.easy_install import main; main()" "-mUNxd" 
"/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/tmprQq-MH" "-v" 
"/Users/davidpratt/Desktop/Buildouts/download-cache/dist/Cheetah-1.0.tar.gz"

path=/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/setuptools-0.6c7-py2.4.egg

Processing Cheetah-1.0.tar.gz

Last few lines of output.. some time later.

changing mode of 
/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/tmprQq-MH/Cheetah-1.0-py2.4-macosx-10.3-ppc.egg/EGG-INFO/top_level.txt 
to 755
changing mode of 
/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/tmprQq-MH/Cheetah-1.0-py2.4-macosx-10.3-ppc.egg/EGG-INFO/scripts/cheetah 
to 755
changing mode of 
/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/tmprQq-MH/Cheetah-1.0-py2.4-macosx-10.3-ppc.egg/EGG-INFO/scripts/cheetah-compile 
to 755


Installed 
/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/tmprQq-MH/Cheetah-1.0-py2.4-macosx-10.3-ppc.egg


Because this distribution was installed --multi-version, before you can
import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to one of
these examples, in order to select the desired version:

 pkg_resources.require("Cheetah")  # latest installed version
 pkg_resources.require("Cheetah==1.0")  # this exact version
 pkg_resources.require("Cheetah>=1.0")  # this version or higher


Note also that the installation directory must be on sys.path at runtime for
this to work.  (e.g. by being the application's script directory, by 
being on

PYTHONPATH, or by being added to sys.path by your code.)

While:
   Installing interpreter.
   Getting distribution for 'Cheetah==1.0'.
Error: Couldn't install: Cheetah 1.0
[mac-pg:~/Desktop/Buildouts/osxdeploy2] davidpra%

Jim Fulton wrote:

On Dec 20, 2007, at 6:03 PM, Darryl Cousins wrote:

I'm trying to created an isolated environment using buildout. I had
understood that defining a custom build python would ensure that all
eggs are installed and compiled with the custom python.

But when the buildout comes to install ZODB it is being compiled agains
the system python headers. (-I/usr/include/python2.4). Which is not what
I want, and at that point the custom python has not even been built.


Re: [Zope3-Users] Buildout and custom python

2007-12-20 Thread David Pratt
Hey Darryl. Our minds were in a similar place today. I finally had 
decided to move away from my system python starting on my mac and also 
having a spot of trouble. I put something simple together below to 
illustrate what happened in my instance.


Here the eggs built with the python would not install. I initially 
though it was the lxml I was compiling, but it was just happened to be 
the first part requiring the custom-python. Eggs were made, and I could 
see the temp folder also, but when was finalizing the install, it threw 
the error and without much verbosity, the tempfolder it was installing 
into disappeared.


Note, I did not include the custom-python as a part in the buildout. I 
tend to like the python24:location type of notation since it is fairly 
explicit when you have a number of pieces of software you are building.


Regards
David

[buildout]
develop = .
parts = python24
interpreter
index = http://download.zope.org/ppix
log-level = DEBUG

[python24]
recipe = zc.recipe:cmmi
url = http://python.org/ftp/python/2.4.4/Python-2.4.4.tgz

[custom-python]
executable = ${python24:location}/bin/python

[interpreter]
recipe = zc.recipe.egg
interpreter = interpreter
eggs = Cheetah==1.0
python = custom-python


Here are the highlights:

Some verification it is using the right python...

Getting distribution for 'Cheetah==1.0'.
We have the best distribution that satisfies 'setuptools'.
Picked: setuptools = 0.6c7
Running easy_install:
/Users/davidpratt/Desktop/Buildouts/osxdeploy2/parts/python24/bin/python 
"-c" "from setuptools.command.easy_install import main; main()" "-mUNxd" 
"/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/tmprQq-MH" "-v" 
"/Users/davidpratt/Desktop/Buildouts/download-cache/dist/Cheetah-1.0.tar.gz"

path=/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/setuptools-0.6c7-py2.4.egg

Processing Cheetah-1.0.tar.gz

Last few lines of output.. some time later.

changing mode of 
/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/tmprQq-MH/Cheetah-1.0-py2.4-macosx-10.3-ppc.egg/EGG-INFO/top_level.txt 
to 755
changing mode of 
/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/tmprQq-MH/Cheetah-1.0-py2.4-macosx-10.3-ppc.egg/EGG-INFO/scripts/cheetah 
to 755
changing mode of 
/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/tmprQq-MH/Cheetah-1.0-py2.4-macosx-10.3-ppc.egg/EGG-INFO/scripts/cheetah-compile 
to 755


Installed 
/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/tmprQq-MH/Cheetah-1.0-py2.4-macosx-10.3-ppc.egg


Because this distribution was installed --multi-version, before you can
import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to one of
these examples, in order to select the desired version:

pkg_resources.require("Cheetah")  # latest installed version
pkg_resources.require("Cheetah==1.0")  # this exact version
pkg_resources.require("Cheetah>=1.0")  # this version or higher


Note also that the installation directory must be on sys.path at runtime for
this to work.  (e.g. by being the application's script directory, by 
being on

PYTHONPATH, or by being added to sys.path by your code.)

While:
  Installing interpreter.
  Getting distribution for 'Cheetah==1.0'.
Error: Couldn't install: Cheetah 1.0
[mac-pg:~/Desktop/Buildouts/osxdeploy2] davidpra%

Jim Fulton wrote:


On Dec 20, 2007, at 6:03 PM, Darryl Cousins wrote:

I'm trying to created an isolated environment using buildout. I had
understood that defining a custom build python would ensure that all
eggs are installed and compiled with the custom python.

But when the buildout comes to install ZODB it is being compiled agains
the system python headers. (-I/usr/include/python2.4). Which is not what
I want, and at that point the custom python has not even been built.

Any thoughts.

[buildout]
python = custom-python
parts = python
custom-python


[python]
recipe = zc.recipe.cmmi
url = http://www.python.org/ftp/python/2.4.4/Python-2.4.4.tar.bz2
extra_options = --with-threads
   --with-readline
   --enable-unicode=ucs2

[custom-python]
executable = ${buildout:parts-directory}/python/bin/python



Your buildout doesn't mention ZODB3 or anything that uses it, so it is 
hard to comment.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Geospatial packages with a demo application

2007-12-19 Thread David Pratt
Hi Sean. This is very exciting news. The BSD licensing also makes this 
very practical for use in any project. Many thanks for making for these 
great resources available.


Regards,
David

Sean Gillies wrote:

Hi all,

I've been making geographic/GIS applications with Plone and recently
made the time to distill Zope packages with no dependence on Plone. The
one I am most eager to promote is zgeo.geographer

http://trac.gispython.org/projects/PrimaGIS/wiki/zgeo.geographer

because it seems unfortunate for people to keep reinventing
geospatial/location metadata for Zope/Plone.

To help get people started with the zgeo.* packages, I've made a Grok
project that builds out every dependency and configures every geo
component so that a programmer can build the app, create geo-located
content, and publish it for browsing in Google Maps or Google Earth in a
matter of minutes. Download directions are at

http://trac.gispython.org/projects/PrimaGIS/wiki/Knowhere

I have the application online at http://zcologia.com/kw/batlas and you
can see it now in Google Maps at http://tinyurl.com/2mamlx.

Cheers,
Sean



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Literal double quoted string within single quoted attribute in ZPT

2007-12-17 Thread David Pratt
Hi. Is there solution for create a single quoted attribute using 
tal:attributes containing literal double quoted items. I am using a 
python method for generating the string. I understand structure will 
unquote but it does not work with an attribute. I see there is a new 
z3c.tal package based on lxml.  Will I have to go as far as customizing 
tal to do this? I realize this may be best on the zpt list but it it 
rarely if ever used these days. Many thanks.


Regards,
David

tal:attributes="attribute python:method()"

attribute='"a","b","c","d"'

instead of:

attribute=""e;a"e;,"e;b"e;,"e;c"e;"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] formlib vs z3c.form

2007-12-06 Thread David Pratt
Chris. There are two demo packages in svn. I'd recommend reading the doc 
tests which are very complete. Doc tests are the common place to look 
for package documentation besides the generally basic README.txt. I 
would not recommend developing with formlib.


Regards,
David

Chris Withers wrote:

Chris Withers wrote:

I need "something like" formlib so want to give it a spin.

Is there a good how-to or example anywhere?


Kapil rightly pointed out off-list that z3c.form is the latest and 
greatest.


Which one is "best" and where do I go for docs/examples?

cheers,

Chris


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: [Zope3-dev] Re: [Zope] Static Zope 3 APIDOC available!

2007-09-28 Thread David Pratt

Very nice. Many thanks for this.

Regards,
David

Baiju M wrote:

Stephan Richter wrote:

 Hi everyone,

 I am happy to announce that the second Foliage sprint task is
 completed. Julian Bonilla, Graham Stratton and I worked on the
 outstanding issues on creating a functional version of the APIDOC,
 which comes with Zope.

 Thanks to Jens Vagelpohl, the static APIDOC is now available at:

 http://apidoc.zope.org

 I have also uploaded a TGZ archive to:

 http://download.zope.org/distribution/static-apidoc.tgz

 I hope that this development will spark renewed interest in the tool.
 In the future I plan to make more packages available in APIDOC and
 make it work with eggs. If you are interested, please let me know!


Great news !
Congratulations to you all !!

Regards,
Baiju M


___
Zope3-dev mailing list
[EMAIL PROTECTED]
Unsub: 
http://mail.zope.org/mailman/options/zope3-dev/fairwinds%40eastlink.ca



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] best way to get started nowadays?

2007-09-22 Thread David Pratt
Hi Chris. Phillip has put together a zopeproject package to give folks a 
start, you may want to check this out. Best advice is to study the 
sources for the patterns prevalent in zope packages - they are your best 
guide to see how pretty much anything modern is done. There is plenty of 
supplemental reading in the doc tests.  My recommendation for skins and 
layers is to use providers including viewlets and pagelets working with 
Minimal or PageletBrowser layers. These integrate well with the 
excellent form packages that Stephan has created. Lastly, get 
comfortable with zc.buildout to manage the resources for your 
application and configuration. Hope that helps.


Regards,
David


Chris Withers wrote:

Jens Vagelpohl wrote:

I was talking about normal, straight Zoep 3 here...


Look at Phillip's book?


I suspect even the 2nd edition of that is out of date w.r.t. current 
practice, hence why I'm asking on the list ;-)


Chris


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Cheeseshop very flakey today

2007-08-02 Thread David Pratt
Hi Benji. Looks like its back. Thanks for this for future reference. 
Many thanks.


Regards,
David

Benji York wrote:

Jeff Shell wrote:

Today was the first day I was going to try
out buildout by watching it run on z3c.formdemo. But, alas, it's been
very flakey.


You can put "index = http://download.zope.org/ppix"; in the [buildout] 
section of the config and it'll work.  That URL (ppix) is Jim's project 
to create setup_tools-friendly PyPI mirrors.

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Cheeseshop very flakey today

2007-08-02 Thread David Pratt
Hi Jeff. I've run into this a few times but just for some minutes at a 
time. Today is the worst it has ever been in my recollection. I been 
waiting for packages for more than half an hour and still nothing. Just 
getting internal server errors when attempting to browse also - not a 
good sign. :( Python site seems good to go though.


Regards,
David

Jeff Shell wrote:

Anyone else noticing the Cheeseshop is operating very poorly today. It
just sucks. :( I guess I should really be storing more egg content
locally since the service just seems to be getting worse as time goes on.


Yes! I'm noticing it too. Today was the first day I was going to try
out buildout by watching it run on z3c.formdemo. But, alas, it's been
very flakey.

How common is this problem?


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Cheeseshop very flakey today

2007-08-02 Thread David Pratt
Anyone else noticing the Cheeseshop is operating very poorly today. It 
just sucks. :( I guess I should really be storing more egg content 
locally since the service just seems to be getting worse as time goes on.


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] z3c.recipe.runscript

2007-08-02 Thread David Pratt
Thank you Stephan for z3c.recipe.runscript. I am just going through some 
recipe's and was also thinking about something like this. I'll be 
checking it out in the next day or so. Many thanks.


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form 1.4.0, z3c.formui 1.1.0, and z3c.formdemo 1.2.0 released!

2007-07-03 Thread David Pratt
Many thanks Stephan for these great improvements and the new 
functionality. I have been away for a bit since I am taking a bit of a 
break for a month. Could not help checking out the new group demo though 
- its just excellent! The package and demos are truly the kind of help 
that was needed for form development. Your work has brought significant 
clarity and a pattern for something we all have to tackle.


Roger, also wanted to add my congratulations and best wishes on your new 
family member. Children are a wonderful gift.


Regards,
David


Stephan Richter wrote:

Hello everyone,

again thanks to the great feedback we received -- especially from David Pratt, 
Roy Mathew, and Joachim Werner -- we were able to fine-tune our new form 
framework even more to make it as robust of a foundation as possible for your 
projects! New features include group support, fully internationalized widgets 
for number and calendar fields, a richer select widget, refined form 
templates, and of course a new demo!


BTW, congratulations to Roger who became father for the third time last 
weekend!


Again for the curious and impatient ...
---

There is also a new demo, of course! The "Questionnaire" demo provides a form 
for filling out a simple questionaire about someones Zope community 
involvement and then provides a very simple results page. Technically this 
demo (available for the DIV- and Table-based layouts) demonstrates the usage 
of groups, a new feature of this release, as well as writing attribute value 
adapters.


To run the demos do the following::

  $ svn co svn://svn.zope.org/repos/main/z3c.formdemo/trunk formdemo
  $ cd formdemo
  $ python bootstrap.py
  $ ./bin/buildout -N
  $ ./bin/demo fg

Now you can access the demo under:

  http://localhost:8080/


On the Javascript Front
---

Paul has made some great progress recently and we have now two demos working, 
including a fully Javascript-driven calculator. I'll leave it up to Paul to 
decide whether he wants to make an announcement, but he will be definitely 
promoting his work at EuroPython!


To see the demos: Replace "formdemo" with "formjsdemo" and follow the 
instructions above.



Changes
---

z3c.form


- Feature: The select widget grew a new ``prompt`` flag, which allows you to
  explicitely request a selection prompt as the first option in the selection
  (even for required fields). When set, the prompt message is shown. Such a
  prompt as option is common in Web-UIs.

- Feature: Allow "no value message" of select widgets to be dynamically
  changed using an attribute value adapter.

- Feature: Internationalized data conversion for date, time, date/time,
  integer, float and decimal. Now the locale data is used to format and parse
  those data types to provide the bridge to text-based widgets. While those
  features require the latest zope.i18n package, backward compatibility is
  provided.

- Feature: All forms now have an optional label that can be used by the UI.

- Feature: Implemented groups within forms. Groups allow you to combine a set
  of fields/widgets into a logical unit. They were designed with ease of use
  in mind.

- Feature: Button Actions -- in other words, the widget for the button field
  -- can now be specified either as the "actionFactory" on the button field or
  as an adapter.

- Bug: Recorded all public select-widget attributes in the interface.


z3c.formui
~~

- Feature: Registered all defined macros for each form template. Also, added
  more slots to the templates providing more hooks for customization.

- Feature: Added a macro/slot for the "required info", which explains how
  required fields are marked.

- Feature: Added support for form labels.

- Feature: Added support for groups to templates.


z3c.formdemo


- Feature: Added new field "promptChoiceField" to the "All Widgets" demo
  demonstrating the prompt message of the select widget.

- Feature: Increased the integer default value of "All Widgets" demo to show
  off our new internationalized converter.

- Feature: Made ``bytesField`` and ``passwordField`` non-required, since they
  do not show their default values prohibiting the form to successfully
  submit, which can be annoying when playing around.

- Feature: New "Questionnaire" demo shows how to use groups effectively. It
  also demonstrates how the label of buttons and widgets can be changed using
  attribute value adapters.


Enjoy!

Regards,
Stephan

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: z3c.form now has group support

2007-06-27 Thread David Pratt
Woo hoo! This is excellent Stephan and an easy way to handle this common 
scenario (and much more elegant than Django for sure). Many thanks for 
your great work on this!


Regards,
David

Stephan Richter wrote:

Hi David,

I just wanted to let you know that I just checked in some group support for 
z3c.form. I am quite happy how it turned out. I have not done any formui work 
or wrote an example, but there is a group.txt document explaining how it 
works.


Regards,
Stephan

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: [Zope] z3c.form 1.3.0, z3c.formui 1.0.1, and z3c.formdemo 1.1.0 released!

2007-06-22 Thread David Pratt
Hi Stephan. This is some really awesome work and some great new examples 
 as well. There is more to explore and to anticipate with ajax - it is 
all really very excellent. When running the demo, I needed to add 
zope.rdb to the setup.py and its corresponding meta and configuration 
files to site.zcml. Other than this, everything worked great and some 
more things to learn for sure. :-) Many thanks for this fine work to 
help us all with forms!


Regards,
David

Stephan Richter wrote:

Hello everyone,

Roger and I have received a great deal of feedback about the z3c.form* 
packages. Several people reported that they immediately started using it for 
their development. Thanks to those people, we were able to identify many bugs 
and determined new features. The result is a new round of releases!


Again for the curious and impatient ...
---

We have added two more demos:

* An "Address Book" implements a non-trivial example of an address book,
  including multiple addresses and E-mails. It demonstrates the use of
  sub-forms, writing custom widgets and composite content.

* An "SQL Message" demo reimplemnets the simple "Hello World!" demo only using
  queries to the Gadfly database. The example adds to the original demo by 
  also providing a message overview screen, since the ZMI is not helpful for 
  pure SQL data.


To run the demos do the following::

  $ svn co svn://svn.zope.org/repos/main/z3c.formdemo/trunk formdemo
  $ cd formdemo
  $ python bootstrap.py
  $ ./bin/buildout -N
  $ ./bin/demo fg

Now you can access the demo under:

  http://localhost:8080/

Note: Python's Cheeseshop seems to be extremely slow today, so this might take 
a while. Alternatively, you can use Zope's distribution server: 
http://download.zope.org/distribution.



On the Javascript Front
---

Paul Carduner, as part of his GSOC project, is developing a super-cool 
extension to the z3c.form* packages that will make it very easy for the 
Python developer to write AJAX-driven applications. My hope is that Paul will 
have the first iteration and a demo done in a few weeks! So stay tuned...



Changes
---

z3c.form


- Feature: In an edit form applying the data and generating all necessary
  messages was all done within the "Apply" button handler. Now the actual task
  of storing is factored out into a new method called "applyChanges(data)",
  which returns whether the data has been changed. This is useful for forms
  not dealing with objects.

- Feature: Added support for ``hidden`` fields. You can now use the ``hidden``
  mode for widgets which should get rendered as .

  Note: Make sure you use the new formui templates which will avoid rendering
labels for hidden widgets or adjust your custom form macros.

- Feature: Added ``missing_value`` support to data/time converters

- Feature: Added named vocabulary lookup in ``ChoiceTerms`` and
  ``CollectionTerms``.

- Implemented support for ``FileUpload`` in ``FileWidget``.

  * Added helper for handling ``FileUpload`` widgets:

+ ``extractContentType(form, id)

  Extracts the content type if ``IBytes``/``IFileWidget`` was used.

+ ``extractFileName(form, id, cleanup=True, allowEmtpyPostFix=False)``

  Extracts a filename if ``IBytes``/``IFileWidget`` was used.

  Uploads from win/IE need some cleanup because the filename includes also
  the path. The option ``cleanup=True`` will do this for you. The option
  ``allowEmtpyPostFix`` allows you to pass a filename without
  extensions. By default this option is set to ``False`` and will raise a
  ``ValueError`` if a filename doesn't contain an extension.

  * Created afile upload data converter registered for
``IBytes``/``IFileWidget`` ensuring that the converter will only be used
for fiel widgets. The file widget is now the default for the bytes
field. If you need to use a text area widget for ``IBytes``, you have to
register a custom widget in the form using::

  fields['foobar'].widgetFactory = TextWidget

- Feature: Originally, when an attribute access failed in Unauthorized or
  ForbiddenAttribute exceptions, they were ignored as if the attribute would
  have no value. Now those errors are propagated and the system will fail
  providing the developer with more feedback. The datamanager also grew a new
  ``query()`` method that returns always a default and the ``get()`` method
  propagates any exceptions.

- Feature: When writing to a field is forbidden due to insufficient
  priviledges, the resulting widget mode will be set to "display". This
  behavior can be overridden by explicitely specifying the mode on a field.

- Feature: Added an add form implementation against ``IAdding``. While this is
  not an encouraged method of adding components, many people still use this
  API to extend the ZMI.

- Feature: The ``IFields`` class' ``select()`` and ``omit()`` method now
  support two ketword arguments "

Re: [Zope3-Users] Using global utilities when creating an global utility

2007-06-19 Thread David Pratt
Hi Jan-Wijbrand, you may wish to look at z3c.configurator since this may 
help with the issue you are having. It seems to solve the issue of 
configuration with that depends on the need for other things to be setup 
first. The doc test explains its capabilities.


Regards,
David

Jan-Wijbrand Kolman wrote:

Hi,


I'm trying to implement a global utility that makes use of other
global utilities when it is created. In other words, the __init__ of
my utility class, tries to get to other utilities.

This does not work however, as the utilities I'd like to get are not
registered yet when my own utility is created - even if I made sure
the registrations for the other utilities would've been performed
before "my" utility is registered.

I tried to find the reason and I think I found it: when the zcml
directive for a utility is read, an action object is created. Somewhat
later in the configuration process these action objects are executed
and the actual utility registration takes place.

It is when the action object is created that "my" utility is
instantiated. And of course, no other actual registrations were made
yet at that point, because no actions have been executed yet, so not
utilities are available to make use of.

Is there a way to overcome this? (or to put it differently, why is
"my" utility created when the action object is created and not just
before the actual registration?)


kind regards,
jw


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form 1.0.0 released!

2007-06-03 Thread David Pratt
One form demo might be a simple form that relates the input from one 
field to another in the form. For example two dropdown lists where 
second dropdown is based on what choice in first dropdown. The need for 
something like this is fairly common for apps I believe.


Regards
David


Stephan Richter wrote:

On Wednesday 30 May 2007 12:27, David Pratt wrote:

Another form related demo might show how to effectively use a data
source with a large number of choices in a select list (like choosing a
  user in a select list from all users on the site) using an ajax widget
where you can start typing and it will begin narrowing the choices -
much like the way live search works (and without generating all options
in the form).


Yeah, there are some demos related to AJAX-features that could be done. Roger 
is already working on AJAX-related demos, including live search and input 
validation.


Regards,
Stephan

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-dev] Re: [Zope3-Users] z3c.form 1.0.0 released!

2007-05-31 Thread David Pratt

Hi Stephan. First of all, thank you for the change to the wizard.

On the points below, despite the code structure, the resulting groups 
are good for making logical separations. It provides another alternative 
for making these. It also provides a simple means to tuck some fields 
away as well.


Zope code is certainly easier on the eyes :-) and to also to read doc 
tests. This makes it much more easily understood. Demos simply make 
design patterns clear for folks. This is where I feel that this can make 
the difference between recognizing package functionality and actually 
deploying the package in the way it was designed.


Looks like I missed the other buttons so I am happy they are there. Many 
thanks for your effort on this excellent package.


Regards,
David

Stephan Richter wrote:

On Wednesday 30 May 2007 15:07, David Pratt wrote:

class Admin:
 fields = (
 (None, {'fields': ('question',)}),
 ('Date information', {'fields': ('pub_date',)}),
 )


This is s lame! We have this great OO language and they do such 
simple C-like structures.


I also disagree with their motivations for totally auto-generated forms. They 
say that admin interfaces are usually just simple forms. In my opinion this 
is bad UI design. In fact, I found admin interfaces often the biggest 
challenge, because people do not think them through, but users then complain 
if the admin UI is not efficient.



class Admin:
 fields = (
 (None, {'fields': ('question',)}),
 ('Date information', {'fields': ('pub_date',), 'classes':
'collapse'}),
 )


This is just flat-out lame. I could never use django and be happy.


I very much like the suggestion of defining groups on the field manager.
What you are suggesting is intuitive. In the django code, the group can
be named, which provides an optional title for the field set for the
form. Additionally, a class is passed in so you can use it for with some  
js to be initially collapsed when rendered. Similarly, these optional

parameters would be useful to pass on.


Yeah, except that we will do that sensibly using a class. Then we can do as 
much as we want to with a group.



values() seems logical for iterating over groups for the widget manager.
I guess some thought on how the group (field set) itself may be
integrated into a widget so a bit of js can be used to collapse and
expand it would be the otherpart.


I am not willing to change the widget manager API. This is silly, since very 
few use cases require groups. I think an extension to the widget manager API 
would be appropriate. So, I would create this iface:


class  IGroupsWidgetManager(IWidgetManager):

  groups = zope.interface.Attribute('Group Mapping')

Then groups is an ordered mapping from name to group. A group in return is 
just an extended widget manager:


class IGroupWidgetManager(IWidgetManager):
  title = zope.schema.TextLine(u'Ttile of the group used for the legend.')
  css = zope.schema.TextLine(u'CSS class set of the fieldset.')
  ...

Now I am just thinking about the best way to define the groups in the fields 
manager. Specifically, whether I am going to extend the existing 
implementations or write new ones. Probably write new ones, since I am pretty 
happy with the current API.



Unrelated to this is another small addition for the demo. This is to
show a form with a couple of additional useful form buttons (another
nice feature integrated in django forms)

Save and add another
Save and continue editing


I did that already. The message demo shows "Apply" and "Apply and View", the 
former is the same as "Save and continue editing". The "Save and add another" 
case I demonstrate in the spreadsheet/table demo. I also have a comment in 
the code what to do different, when wanting to add just one entry.


Regards,
Stephan

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-dev] Re: [Zope3-Users] z3c.form 1.0.0 released!

2007-05-30 Thread David Pratt
Hi Stephan. Thanks for your reply. For #2, the following excerpt from 
django's documentation located here:


http://www.djangoproject.com/documentation/tutorial02/


And speaking of forms with dozens of fields, you might want to split the 
form up into fieldsets:


class Admin:
fields = (
(None, {'fields': ('question',)}),
('Date information', {'fields': ('pub_date',)}),
)

The first element of each tuple in fields is the title of the fieldset. 
Here’s what our form looks like now:


... image

You can assign arbitrary HTML classes to each fieldset. Django provides 
a "collapse" class that displays a particular fieldset initially 
collapsed. This is useful when you have a long form that contains a 
number of fields that aren’t commonly used:


class Admin:
fields = (
(None, {'fields': ('question',)}),
('Date information', {'fields': ('pub_date',), 'classes': 
'collapse'}),

)

... image



I haven't thought of the best way of implementing this at this point 
since I am just coming up to speed with your package.


I very much like the suggestion of defining groups on the field manager. 
What you are suggesting is intuitive. In the django code, the group can 
be named, which provides an optional title for the field set for the 
form. Additionally, a class is passed in so you can use it for with some 
js to be initially collapsed when rendered. Similarly, these optional 
parameters would be useful to pass on.


values() seems logical for iterating over groups for the widget manager. 
I guess some thought on how the group (field set) itself may be 
integrated into a widget so a bit of js can be used to collapse and 
expand it would be the otherpart.


Unrelated to this is another small addition for the demo. This is to 
show a form with a couple of additional useful form buttons (another 
nice feature integrated in django forms)


Save and add another
Save and continue editing

Regards,
David



Stephan Richter wrote:

On Wednesday 30 May 2007 11:06, David Pratt wrote:

1) An iteration of the wizard that will not allow show submit button or
allow submit until the end of all steps.


I have implemented this feature. The "Finish" button will now only show up 
when all required fields are filled out. You can update your z3c.formdemo 
checkout or download version 1.1.0.



2) A demo to show how fields can be grouped. Something like Django forms
with grouping would be really nice.


My two standard answers for this are usually:

1. Use sub-forms. That's what they are for.

2. Grouping fields does not make much sense, since in projects you want to lay 
out widgets/fields manually anyways.


However, the first answer does not seem to fit your use case well and the 
second is a bummer for beginners. So, how would *you* like to see grouping of 
fields working?


There are several options here. For one, one could claim that interfaces 
already group fields, so I could use them to define groups:


  >>> fields = field.Fields(interfaces.IPerson)
  >>> fields.groups[IPerson].title = u'Person'

Another option would be to define groups on the fields manager:

  >>> fields = field.Fields(interfaces.IPerson, group='person')
  >>> fields.groups['person'].title = u'Person'

We could also reuse the prefex:

  >>> fields = field.Fields(interfaces.IPerson, prefix='person')
  >>> fields.groups['person'].title = u'Person'

Some other approaches could include making multiple "field.Fields" instances 
or have different "field.Field" implementations, similar to buttons.


The next question would then be how to iterate through the groups in the 
widget manager. Would this be okay?


  >>> widgets.groups['person'].values()
  [...]

Anyways, let me know hoe it could be done and I think about it some more. A 
django example would be nice too.


Regards,
Stephan

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form 1.0.0 released!

2007-05-30 Thread David Pratt
Another form related demo might show how to effectively use a data 
source with a large number of choices in a select list (like choosing a 
 user in a select list from all users on the site) using an ajax widget 
where you can start typing and it will begin narrowing the choices - 
much like the way live search works (and without generating all options 
in the form).


Regards
David


David Pratt wrote:

Hi Stephan and Roger. This is a great package. Thank you for this work.

As far as other demos, I'd like to see a couple of things:

1) An iteration of the wizard that will not allow show submit button or 
allow submit until the end of all steps.
2) A demo to show how fields can be grouped. Something like Django forms 
with grouping would be really nice.


Regards,
David


Stephan Richter wrote:

On Friday 25 May 2007 02:55, Darryl Cousins wrote:

Congratulations Stephan and Roger.


Thanks.


I've only read through 3 of the 5 'must read' doctest files. I remember
my first reading of formlib/form.txt and being overwhelmed. This has
been the opposite experience.


Great! That's good to hear! I always hope that me doctests read like a 
book while still ensuring full test coverage.



The demos are impressive, to say the least.


Thanks. BTW, I am still looking for 1-2 demos to write but I am out of 
ideas. Do have anything related to forms that you would like to see 
demoed?



There is much by way of example in the writing of your doctests. Thanks
for this effort.


You are welcome.

Regards,
Stephan

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form 1.0.0 released!

2007-05-30 Thread David Pratt

Hi Stephan and Roger. This is a great package. Thank you for this work.

As far as other demos, I'd like to see a couple of things:

1) An iteration of the wizard that will not allow show submit button or 
allow submit until the end of all steps.
2) A demo to show how fields can be grouped. Something like Django forms 
with grouping would be really nice.


Regards,
David


Stephan Richter wrote:

On Friday 25 May 2007 02:55, Darryl Cousins wrote:

Congratulations Stephan and Roger.


Thanks.


I've only read through 3 of the 5 'must read' doctest files. I remember
my first reading of formlib/form.txt and being overwhelmed. This has
been the opposite experience.


Great! That's good to hear! I always hope that me doctests read like a book 
while still ensuring full test coverage.



The demos are impressive, to say the least.


Thanks. BTW, I am still looking for 1-2 demos to write but I am out of ideas. 
Do have anything related to forms that you would like to see demoed?



There is much by way of example in the writing of your doctests. Thanks
for this effort.


You are welcome.

Regards,
Stephan

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Blog naming proposals

2007-05-28 Thread David Pratt

Florian Lindner wrote:

Hello,
some people might have noticed I am developing a Blog package for Zope3.
Since it slowly becomes functional (an older version is working at 
http://xgm.de) I want to release it (under an free and open source licence).


Hi Florian. I hope this means ZPL so that it can be incorporated with 
other z3 code. How about 'blogz' as name.


Regards,
David



One thing still missing is a good name. A name that quickly comes to my mind 
is zBlog but which is not very fancy.


What ideas have you for Zope3 blog package, what would you choose?

Regards,

Florian
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Remote authentication

2007-05-14 Thread David Pratt
Hi Maciej. I'm putting up a project today. If there is anyone else that 
has been following this thread that would like to contribute to a CAS 
solution for z3 please let me know.


Just a side note that the PHP client for CAS uses sessions. I'm going to 
contact Martijn on the ldappas work and see if he has any advice to 
offer on this in the interim. Chris Withers had also put a solution 
together a few years back for z2 under mit license so will also likely 
see if there is some interest in advising or helping considering his 
experience.


Regards,
David

Maciej Wisniowski wrote:

Hi Maciej. Thank you for your reply and outlining the authentication
process. This does make things clearer. There are a variety of backends,
I read that something as simple as reading fom a file is possible. 
ldappas and dl.ldapauth provide some good hints for plugins and user

management from infrae's documentlibrary. I became aware of these
packages working on documentlibrary recently.

I don't know documentlibrary but with cas you'll get only the user
name and with this it is necessary to
get user roles/permissions from specific backend.



I want to be clear that https enters into the picture as soon as
authentication is required or someone were to click on a login link. I
am seeing links such as this in the docs I have been reading:

https://secure.its.yale.edu/cas/login?service=http://my/url

Reading the plone code, I noticed a replacement for login portlet (to
replace it with a link to CAS server) so I am assuming at this point
folks would be coming to portal unauthenticated and no https until you
were to login or attempt to gain access to an area where you need
authorization (then you are redirected - and now https on CAS server)
Have I got this right?

CAS authentication will work with http, but single sing on will not.
I mean if you have CAS server like:

https://secure.its.yale.edu/cas

and applications:
http://my/url
http://my/url2

then you'll have to login while trying to acces http://my/url2
even thought you already are logged in to http://my/url. With
https you'll be automatically logged into url2 via SSO.

There were discussions about turning off https on CAS users
list but I don't know if it is possible in recent CAS versions.

Also you may send 'service url' as https one. This way users
accesses http site but after successfull login at CAS user is
redirected to https one.



I thought sessions should be used but maybe there are some other
opinions. I realize there were some issues with sessions some years back
with z2. I have not heard anything negative about sessions in z3.

Hm... I'm not sure about session implementation in zope3 but
I had some issues with sessions with zope 2 (conflicts).
I think that accessing session with every request is not too good as
this causes session buckets to be moved in oobtree because of
expiration, starts garbage collections etc. But I'm not sure how
this exactly goes.



I was also thinking to some extent about the url redirection etc for
this CAS activity and it made me wonder whether some of this should not
be occurring as part of a WSGI middleware (but this is just a random
thought at the moment).

I have no experience with that but like to get to know more :)


I am interested in setting up a project for this shortly. I'll likely
get this going in the next day or so and will be grateful for your help
since you have experience with this. I'll provide details for the
project as soon as I have them but will likely put it in zif collective
on sourceforge in svn.

OK, but possibly I will have no internet access for few days so I may
answer with delays.



BTW, I recently noticed that the authentication server need not be java
so long as it complies with the CAS protocol. In fact I was reading code
for rubyCAS server earlier today. It makes me wonder why the
authentication server itself could not be written in python and served
using zope or twisted. Gives me something to think about for later if
things work. Many thanks,

Would be great to have this server in python :)


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Remote authentication

2007-05-12 Thread David Pratt
Hi Maciej. Thank you for your reply and outlining the authentication 
process. This does make things clearer. There are a variety of backends, 
I read that something as simple as reading fom a file is possible.


ldappas and dl.ldapauth provide some good hints for plugins and user 
management from infrae's documentlibrary. I became aware of these 
packages working on documentlibrary recently.


I want to be clear that https enters into the picture as soon as 
authentication is required or someone were to click on a login link. I 
am seeing links such as this in the docs I have been reading:


https://secure.its.yale.edu/cas/login?service=http://my/url

Reading the plone code, I noticed a replacement for login portlet (to 
replace it with a link to CAS server) so I am assuming at this point 
folks would be coming to portal unauthenticated and no https until you 
were to login or attempt to gain access to an area where you need 
authorization (then you are redirected - and now https on CAS server)

Have I got this right?

I thought sessions should be used but maybe there are some other 
opinions. I realize there were some issues with sessions some years back 
with z2. I have not heard anything negative about sessions in z3.


I was also thinking to some extent about the url redirection etc for 
this CAS activity and it made me wonder whether some of this should not 
be occurring as part of a WSGI middleware (but this is just a random 
thought at the moment).


I am interested in setting up a project for this shortly. I'll likely 
get this going in the next day or so and will be grateful for your help 
since you have experience with this. I'll provide details for the 
project as soon as I have them but will likely put it in zif collective 
on sourceforge in svn.


BTW, I recently noticed that the authentication server need not be java 
so long as it complies with the CAS protocol. In fact I was reading code 
for rubyCAS server earlier today. It makes me wonder why the 
authentication server itself could not be written in python and served 
using zope or twisted. Gives me something to think about for later if 
things work. Many thanks,


Regards,
David


Maciej Wisniowski wrote:

Hi Maciej. I have been reading quite a bit about CAS today. It looks
like a good way to go. Couple of questions with how you having it
working in z2. Are you using LDAP as a user store with CAS. 

We're not using LDAP. We have propertiary system to manage user
accounts in our applications (user data and permissions in
specific applications). This system uses RDBMS to store its data so
for CAS it is just external database with user names and passwords.
Our CAS server authenticates users against this database with just one
simple select statement I think.



I have downloaded a few of the z2 products to study the code
in the interim since a plugin for z3 would be a good thing. I've got to
look at how this works with users and groups code particular with
additional info you need for an app.

In fact i think that default plugin for CAS can't do more than just
authentication.
So first step should be to rewrite CAS4PAS to zope3 PAU which should be
rather easy. Only thing I'm not sure obout is if this should use session
or maybe cookies? Sessions are nasty in Zope...

Another thing is a second plugin for user management. But this depends
on where
your user database is. This plugin may enumerate users, set roles for users
etc. Depending on specific solution this plugin may connect to LDAP
or RDBMS to get user data, roles and permissions from and map them to
Zope ones.
In our system we have a special permission in database that is mapped into
user role in Zope. In fact our plugin has parameter that says what is
the name
for this role so it is easy to customize that via ZMI.

Not sure if you already realised how CAS works (I had some problems to
realise that at the begining) so a quick description is at the bottom of my
post. Important thing to note is that all addresses have to be https ones.


Anybody out there interested in helping with something like this? I'm
likely to start a project for this for z3 package but with zpl or mit
licensing since something this generic should have few barriers to
anyone using Yale's system. Many thanks.


I'm interested in helping you with that.



Order of actions in CAS authentication

1. User tries to enter into Zope application via url like https://xyz/myapp

2. CAS4PAS checks if there is a special object in session
that says user is already authenticated

3. If there is no object in session CAS4PAS checks if there is a 'ticket'
parameter in request

4. If there is neither special object in session nor 'ticket' in request
CAS4PAS
redirects user to CAS login page with 'service' parameter in redirect URL
which is address of zope application itself (CAS4PAS has to know address
of CAS login page)
https://casserver/login?service=https://xyz/myapp

5. User authenticates at CAS login page

6. CAS checks credenit

Re: [Zope3-Users] Re: Remote authentication

2007-05-12 Thread David Pratt
Hi Maciej. I have been reading quite a bit about CAS today. It looks 
like a good way to go. Couple of questions with how you having it 
working in z2. Are you using LDAP as a user store with CAS. I have 
downloaded a few of the z2 products to study the code in the interim 
since a plugin for z3 would be a good thing. I've got to look at how 
this works with users and groups code particular with additional info 
you need for an app.


Anybody out there interested in helping with something like this? I'm 
likely to start a project for this for z3 package but with zpl or mit 
licensing since something this generic should have few barriers to 
anyone using Yale's system. Many thanks.


Regards,
David



Maciej Wisniowski wrote:

Hi!

For single sign on there is also CAS (Central Authentication Service).
We're sucessfully using this in our Zope2 apps. It has plugin for PAS
in Zope2 (CAS4PAS). CAS also works with other systems - plugins for
java, php and other exists.

Important thing here is to distinguish between authentication and
authorization. For example SSO like CAS can only tell you if your
user is authenticated. It won't tell you if he has some permissions
and/or roles to do something. But with PAS you can write another plugin
that will set proper roles for user etc.



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Remote authentication

2007-05-11 Thread David Pratt
Hi Maciej. I'll definitely check this out and look for docs on the 
plugin. It sounds very promising since it is a working solution for Z2 
:-) On top of it, there ought to be good hints in Z2's PAS for doing 
something in Z3. Hopefully it can be worked in to some functionality for 
users/groups for z3. Many thanks.


Regards,
David

Maciej Wisniowski wrote:

Hi!

For single sign on there is also CAS (Central Authentication Service).
We're sucessfully using this in our Zope2 apps. It has plugin for PAS
in Zope2 (CAS4PAS). CAS also works with other systems - plugins for
java, php and other exists.

Important thing here is to distinguish between authentication and
authorization. For example SSO like CAS can only tell you if your
user is authenticated. It won't tell you if he has some permissions
and/or roles to do something. But with PAS you can write another plugin
that will set proper roles for user etc.



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Remote authentication

2007-05-11 Thread David Pratt
Hi thanks Raphael, thanks for this. I also managed to find an OpenId 
server in python also so this part is looking quite doable. There is 
also an example implementation for django. The unanswered question for 
me on the OpenId concept is how one manages user public and private 
context. For example, if I am an employee in a an org would I have an 
OpenId here as well as one for myself privately - need to do some more 
reading and perhaps subscribe to their list. I have to read a bit more 
on what this means as far as security, trust or whether there is any 
loss of autonomy for closely managing users as a result. Many thanks.


Regards,
David


Raphael Ritz wrote:

David Pratt wrote:
Hi Hermann. Thanks for your reply. Haven't quite decided on this but 
I've got things to try that might be more efficient than xmlrpc.


I'm likely to attempt an authentication server with web service style 
SSO at this point though OpenId is attractive. I don't know if anyone 
has made a plugin yet for z3 for OpenId but I might try this.


Wiggy has written a PAS plugin for OpneId support in Plone

  http://svn.plone.org/svn/plone/plone.openid/trunk/

which may serve as a starting point if you are interested.

Raphael

I am not sure how OpenId handles different contexts for users at this 
point (for example being a user at a worksite, and then a public user) 
though but I will be experimenting with it regardless. Many thanks.


Regards,
David


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Remote authentication

2007-05-11 Thread David Pratt
Hi Hermann. Thanks for your reply. Haven't quite decided on this but 
I've got things to try that might be more efficient than xmlrpc.


I'm likely to attempt an authentication server with web service style 
SSO at this point though OpenId is attractive. I don't know if anyone 
has made a plugin yet for z3 for OpenId but I might try this. I am not 
sure how OpenId handles different contexts for users at this point (for 
example being a user at a worksite, and then a public user) though but I 
will be experimenting with it regardless. Many thanks.


Regards,
David

Hermann Himmelbauer wrote:

Am Donnerstag, 10. Mai 2007 18:13 schrieb David Pratt:

Hi. Has anyone got a bit of a blueprint for a remote authentication in
zope 3. I wish to authenticate on a z3 site (site 1) using credentials
stored on a different z3 site (site 2) over the Internet (otherwise
would likely use LDAP). I do not want to maintain users on site 1. I
only want users from a couple of groups on site 2 to be able to access
site 1.

I was thinking of using xmlrpc but will likely use a different transport
with better security and encryption. 


To my mind, xmlrpc can also be transported via HTTPS. At a quick glance, I 
therefore cannot see any security issues. I'd rather think about performance 
problems.


If HTTPS is no option, a VPN connection between the two servers would probably 
also be a secure solution.


Regards,
Hermann


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Remote authentication

2007-05-10 Thread David Pratt
Hi Bernd. Yes, this should give me something similar to examine. Many 
thanks.


Regards
David

Bernd Dorn wrote:
as a plugin example you may want to take a look at 
http://svn.zope.org/ldappas/


regards, bernd

On 10.05.2007, at 18:13, David Pratt wrote:

Hi. Has anyone got a bit of a blueprint for a remote authentication in 
zope 3. I wish to authenticate on a z3 site (site 1) using credentials 
stored on a different z3 site (site 2) over the Internet (otherwise 
would likely use LDAP). I do not want to maintain users on site 1. I 
only want users from a couple of groups on site 2 to be able to access 
site 1.


I was thinking of using xmlrpc but will likely use a different 
transport with better security and encryption. Anyone doing anything 
similar at the moment that could share their experience. I am reading 
through the zope.app.authentication to refresh my memory on plugins in 
the meantime. Many thanks.


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Remote authentication

2007-05-10 Thread David Pratt
Hi. Has anyone got a bit of a blueprint for a remote authentication in 
zope 3. I wish to authenticate on a z3 site (site 1) using credentials 
stored on a different z3 site (site 2) over the Internet (otherwise 
would likely use LDAP). I do not want to maintain users on site 1. I 
only want users from a couple of groups on site 2 to be able to access 
site 1.


I was thinking of using xmlrpc but will likely use a different transport 
with better security and encryption. Anyone doing anything similar at 
the moment that could share their experience. I am reading through the 
zope.app.authentication to refresh my memory on plugins in the meantime. 
Many thanks.


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] ZODB? PostgreSQL?

2007-04-23 Thread David Pratt
Hi. You do not have to have to sacrifice an object database to use 
postgres. You may wish to look at pgstorage for your backend and have 
best of both worlds. See:


http://sourceforge.net/projects/pgstorage

I am hoping to eggify this before long and bring it into a namespace 
package to make it easier to use in the new buildout system.


Regards,
David

Ariel Eduardo Morales Malpica wrote:

Hi. I'm working on a project and I'm using ZODB but my mentor advices me
that this model of database will be so big after one or two years. He
consider that because ZODB works with transactions and it's added to
ZODB frequently. My mentor mentioned me PostgreSQL, but I don't want it,
because is better for me use Objet Oriented Database than Relational
Database. 
I don't know what to do.

Is true that ZODB can be so big in few years? I'm implementing a Project
Management System and I fear that it could be a problem after a few
years. (use ZODB).
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Including overrides in buildout in site.zcml for zc.zope3recipes:app

2007-04-20 Thread David Pratt

My bad. This seems to do the trick.



I incorrectly assumed includeOverrides would pick up the overrides file.

Regards,
David


David Pratt wrote:
Hi. Tried putting overrides.zcml in my app package. To site.zcml in my 
buildout I added and includeOverrides to link to the overrides.zcml in 
the app package with something like this.




I have the same packages working a regular zope with a global overrides 
in /etc. In the buildout, adding the overrides to site.zcml this way 
does not produce same result. Any thing else I should try?


Many thanks

Regards,
David




David Pratt wrote:
I am wondering what to do about including overrides that would have 
normally gone into my /etc to be used in a globally. I am using the 
zope3recipes. It defines an app part with an explcit site.zcml.


site.zcml is used verbatim in the buildout but is also need it a layer 
to run functional tests. So the placement of the global overrides.zcml 
is the question. I am guessing that the only way to really deal with 
it would be to put it in one of the app packages and do




and put it in the site.zcml but that does not seem right.  I also 
normally also put a paste.ini in /etc in a regular zope as well. So 
what to do with these things so they have the same net effect as a 
plain zope.


Many thanks.

Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users




___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Including overrides in buildout in site.zcml for zc.zope3recipes:app

2007-04-20 Thread David Pratt
Hi. Tried putting overrides.zcml in my app package. To site.zcml in my 
buildout I added and includeOverrides to link to the overrides.zcml in 
the app package with something like this.




I have the same packages working a regular zope with a global overrides 
in /etc. In the buildout, adding the overrides to site.zcml this way 
does not produce same result. Any thing else I should try?


Many thanks

Regards,
David




David Pratt wrote:
I am wondering what to do about including overrides that would have 
normally gone into my /etc to be used in a globally. I am using the 
zope3recipes. It defines an app part with an explcit site.zcml.


site.zcml is used verbatim in the buildout but is also need it a layer 
to run functional tests. So the placement of the global overrides.zcml 
is the question. I am guessing that the only way to really deal with it 
would be to put it in one of the app packages and do




and put it in the site.zcml but that does not seem right.  I also 
normally also put a paste.ini in /etc in a regular zope as well. So what 
to do with these things so they have the same net effect as a plain zope.


Many thanks.

Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Including overrides in buildout in site.zcml for zc.zope3recipes:app

2007-04-20 Thread David Pratt
I am wondering what to do about including overrides that would have 
normally gone into my /etc to be used in a globally. I am using the 
zope3recipes. It defines an app part with an explcit site.zcml.


site.zcml is used verbatim in the buildout but is also need it a layer 
to run functional tests. So the placement of the global overrides.zcml 
is the question. I am guessing that the only way to really deal with it 
would be to put it in one of the app packages and do




and put it in the site.zcml but that does not seem right.  I also 
normally also put a paste.ini in /etc in a regular zope as well. So what 
to do with these things so they have the same net effect as a plain zope.


Many thanks.

Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: zope.intid and UUIDs

2007-04-17 Thread David Pratt
Thanks Derek. I think perhaps there may be a better response to this on 
zope3-dev list.


Regards,
David

Derek Richardson wrote:
I have no principled objection to a ZPL license. And I would like the 
code to make it into the core, if appropriate. So, the answer is, a ZPL 
license is likely.


David Pratt wrote:
I like this idea of abstracting the code for ids myself. It will be 
interesting to hear what others have to say. Can you advise whether 
the UUID utility will be ZPL licensed since this is important if you 
are talking about something with generic functionality for z3. Many 
thanks.


Regards,
David

Derek Richardson wrote:

All,

I've decided to go ahead and write an RFC 4122 UUID utility based on 
zope.intid (this is for a Plone SoC project, but this bit is pure 
Zope 3). I wrote most of it today and there is more code shared 
between the two than is different. The main differences are:


* OOBTrees, instead of an IOBTree and an OIBTree
* Different events are fired when an object is registered and 
unregistered (they could be merged, but this is easy 
backwards-compatibility)

* _generateId() is, of course, different

The rest is pretty much copied and pasted, even most of the tests.

My question is: should the common parts be abstracted out into a 
framework for id utilities, of which intid and uuid will be two 
instantiations? I know this is a small amount of code but:


* I hate copy and paste
* I hate the idea of bugs in two places (implicit coupling, from a 
bug fixer's perspective)
* Larger codebases mean more to read to understand what is going on 
for newbies, like me


Of course, the duplication rule is "If you do it three times, you're 
doing it wrong" and I've only done it the second time. So, part of 
this question is whether anyone can see a future need for any id 
utilities other than intid and uuid. If so, I think this would 
definitely be a good move. Otherwise, I'm up in the air.


Of course, this would be a change to zope core, which is the main 
reason I'm leery. I will be sending in my contributor agreement 
tomorrow. So, I'm really wondering whether this is worth changing in 
the core or whether we shouldn't bother.


Thanks,

Derek

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zope.intid and UUIDs

2007-04-17 Thread David Pratt
I like this idea of abstracting the code for ids myself. It will be 
interesting to hear what others have to say. Can you advise whether the 
UUID utility will be ZPL licensed since this is important if you are 
talking about something with generic functionality for z3. Many thanks.


Regards,
David

Derek Richardson wrote:

All,

I've decided to go ahead and write an RFC 4122 UUID utility based on 
zope.intid (this is for a Plone SoC project, but this bit is pure Zope 
3). I wrote most of it today and there is more code shared between the 
two than is different. The main differences are:


* OOBTrees, instead of an IOBTree and an OIBTree
* Different events are fired when an object is registered and 
unregistered (they could be merged, but this is easy 
backwards-compatibility)

* _generateId() is, of course, different

The rest is pretty much copied and pasted, even most of the tests.

My question is: should the common parts be abstracted out into a 
framework for id utilities, of which intid and uuid will be two 
instantiations? I know this is a small amount of code but:


* I hate copy and paste
* I hate the idea of bugs in two places (implicit coupling, from a bug 
fixer's perspective)
* Larger codebases mean more to read to understand what is going on for 
newbies, like me


Of course, the duplication rule is "If you do it three times, you're 
doing it wrong" and I've only done it the second time. So, part of this 
question is whether anyone can see a future need for any id utilities 
other than intid and uuid. If so, I think this would definitely be a 
good move. Otherwise, I'm up in the air.


Of course, this would be a change to zope core, which is the main reason 
I'm leery. I will be sending in my contributor agreement tomorrow. So, 
I'm really wondering whether this is worth changing in the core or 
whether we shouldn't bother.


Thanks,

Derek

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] ZEO security examples

2007-04-13 Thread David Pratt
Hi Thierry. There is a basic means of authentication built in to ZEO but 
it is not terribly secure. You can read about it in the zeo source. You 
may wish to look as Fred's zc.sshtunnel package to help you secure your 
communication.


Regards,
David

Thierry Florac wrote:

  Hi,

Maybe I'm wrong, but it seems that ZEO protocol is, by default,
unauthenticated.
I've read here and there a few references to an authentication mechanism
which could be setup in ZOPE/ZEO, but can't find any valuable
implementation example for Zope3.
So, any link to define this for Zope3 would be very nice.

Thanks for any help,

  Thierry Florac

___
Zope3-users mailing list
[EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] handling a mass of images/files

2007-04-11 Thread David Pratt
Hi Dominique. Tramline pkg provides this capability with Apache and 
mod_python. Alernatively, you could likely construct a paste package to 
handle the data as middleware. Blobs are good and data will be saved 
within the transaction.


Regards,
David

Dominique Lederer wrote:

hi

i´m just thinking about, how to handle a lot of images within my zope3 
application.

what would you recommend to do:
a) save all images into the zodb
b) use z3c.extfile

i looked a bit into z3c.extfile´s documentation, an found, that i returns
file-data from the filesystem, which are stored there in a hashdir.

i wonder if this would be quicker than accessing the images from the zodb?

a third approach, similar to b) would be to serve the hashdir with apache, and
let the z3c.extfile just return the path to the image. i just did not find out
how to achieve that with the package. maybe someone could give me a hint on 
this?

i would be glad, if you could give me your option on this.

thanks a lot
regards, Dominique
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: execution time of a request?

2007-04-07 Thread David Pratt

Hi Cristophe. Found it and it looks helpful for sure. Many thanks.

Regards,
David

Christophe Combelles wrote:

You can find interesting things on his blog:
http://mg.pov.lt/blog/benchmarking-zope3-apps.html

Christophe

David Pratt a écrit :
Hi Jurgen and Marius. Can you advise whether the profiling library is 
generally available and if so where to find it. Many thanks.


Regards,
David


Jürgen Kartnaller wrote:

By the way, marius, thanks for your great profiling library.

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users




___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: execution time of a request?

2007-04-07 Thread David Pratt
Hi Jurgen and Marius. Can you advise whether the profiling library is 
generally available and if so where to find it. Many thanks.


Regards,
David


Jürgen Kartnaller wrote:

By the way, marius, thanks for your great profiling library.

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Performace production with squid

2007-04-06 Thread David Pratt
Hi. I guess I have pretty much always used to putting apache and zope 
together. Lately, I am trying to learn a bit more about squid. 
Particularly how squid, apache2 and zope3 can play together to create a 
high performance site. It's a big topic I realize, but I am hoping 
especially on the squid side, that some folks in the know may share some 
tips on what their basic working setup looks like - and perhaps provide 
a starting point configuration for squid. I know that the plone folks 
with cachefu are seeing about a 10x speedup using cachefu alone and 50x 
with cachefu plus squid - definitely impressive.


I realize this is one of these topics that could probably be discussed 
elsewhere but this is really about getting performance out of a z3 site 
- something that is likely to be of interest to others besides myself I 
hope.


To that end, I found a couple of good articles on this at tomster.org 
first of all advocating some core decisions on a caching restrictions



In order to achieve effective caching, that's also easy to implement 
we've imposed the following restrictions:


* Only public (i.e. anonymously viewable) content will be cached
* All authenticated traffic will be encrypted (good idea, anyway!)
* All anonymous traffic will be unencrypted (not ideal, but that's 
why it's called a compromise)

* No dynamic content on the public pages.



then paying particular attention to the construction of cacheable 
objects as described in the article.


http://tomster.org/blog/archive/2004/10/30/making-plone-cacheable/

Another interesting article:

http://tomster.org/blog/archive/2006/10/29/proposal-for-a-zope3-based-caching-strategy

So clearly, I am seeking the performance magic of squid with some 
guidance on a starting configuration but also there is much about 
fundamental decisions in how you are constructing views and objects that 
are important to effective caching. Many thanks.


Regards
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Repozo and events

2007-04-05 Thread David Pratt
Hi. I am interested in maintaining the zope object database in a way 
that I can have it back up quickly and without loss if needed (locating 
the backup files to another machine for restoration if needed in a 
failure situation).


I realize the normal way to use repozo is using cron to create 
incremental files and merge them to reassemble the zodb. I also use 
pgstorage. Postgres's write ahead logs can currently be used to 
reassemble a relational database to the point in time of failure without 
any loss of transactions.


In the repozo case, transactions can still be lost depending on the time 
interval set in cron. Would using object events in zope be a better way 
to have repozo keep pace with each transaction in zodb so that there is 
no loss. A time method could then be used to merge the small files over 
a regular interval into a larger file so rebuilding the db would not 
involve so many files. I was thinking something like this could be put 
in a package for automated backup of zodb. Not to replace Repozo as a 
command line utility, just as a help for backup. Perhaps there are 
better ideas. Many thanks.


Regards,
David

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: RFC 4122 UUIDs

2007-04-05 Thread David Pratt
I also like the idea of UUIDs the way they are meant to be - which 
should be independent of the instance. I can imagine a further 
possibility to synchronize objects from independent zodb sources if this 
 existed.


The UUID generator that I have been looking at is with the Chandler 
project (currently under Apache license) that could be easily wrapped:


http://svn.osafoundation.org/chandler/trunk/internal/chandlerdb/chandlerdb/util/uuid.c

Regards,
David


Marius Gedminas wrote:

On Wed, Apr 04, 2007 at 03:12:26PM -0400, Stephan Richter wrote:

On Wednesday 04 April 2007 14:34, Derek Richardson wrote:

I believe that that will not guarantee a *universally* unique id, but
only an id unique within that ZODB. Am I wrong?
Well, intid guarantees to be unique for this Zope instance, even accross 
multiple databases conencted to this Zope instance. All you have to do is to 
id the Zope instance, for example, ip+port should suffice.


I'd imagine collisions are likely when ip+port is 192.168.1.1:8080.

Marius Gedminas




___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] zope.app namespace packages

2006-12-26 Thread David Pratt
With the latest changes to config files to zope.app package, will each 
zope.app package be available soon with its own setup from the 
repository and released as an egg?


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Zope SVN

2006-12-22 Thread David Pratt
I noticed differences in package structures in the zope repository while 
trying to automate a couple of repository tasks. I have worked around 
these already (and don't know if it really matters to anyone else). If 
it does, I thought I ought to communicate these - but not sure if this 
is the right place to discuss this.


A second issue I noticed is checking out dotted namespace folder on my 
Mac. I have been following some well established z3 patterns and package 
structures. What I have discovered in checking out a hierarchy from svn, 
folders with dotted names with .app and .menu will have Mac thinking 
they are part of a native Mac application. Needless to say, one doesn't 
normally need to check out a hierarchy - but it had me wondering if 
consideration ought be given to renaming the dotted folders to include 
an underscore ie. ( zope.app_ or namespace.menu_) to potentially avoid 
the Mac issue.


I had two issues using pysvn to export sources that resulted in an error 
of 'inconsistent newlines Code: 00020f58'.


http://svn.zope.org/Zope3/trunk/src/zope/i18n/locales/data/hi.xml
http://svn.zope.org/zc.selenium/trunk/src/zc/selenium/resources/iedoc.xml

I will have to look into this further to see if a setting in pysvn can 
correct this. Many thanks.


Regards,
David


Some differences in Zope SVN package structures:

zope packages
-
Typical zope package structured as follows:
pattern: namespace.package/trunk/src/namespace/package

zope.paste
pattern: namespace.package/trunk/namespace/package

zope.timestamp
pattern: namespace.package/trunk/src/namespace

zope.webdev
pattern: namespace.package/trunk


zc packages
---
Typically zc package structured as follows:
pattern: namespace.package/trunk/src/namespace/package

zc.multiform
pattern: namespace.package/branches/dev/src/namespace/package
(no trunk for package)


zc recipe packages
--
Typical zc.recipe package structured as follows:
pattern: zc.recipe.package/trunk/src/zc/recipe/package

zc.recipe.cmmi
zc.recipe.filestorage
pattern: zc.recipe.package/trunk/zc/recipe/package

zc.recipe.deployment
pattern: zc.recipe.package/trunk/src/zc/recipe

zc.recipe.zeo
pattern: namespace.package/branches/dev/src/zc/recipe/package
(no trunk for package)


z3c packages


z3c.multiform
pattern: namespace.package/Sandbox/src/namespace/package

z3c.zodbbrowser
pattern: namespace.package/sandbox/src/namespace/package




___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout query

2006-11-25 Thread David Pratt
I was looking at buildout again this morning. First of all it seems that 
apps would be easier use cases since you likely have some finished and 
registered eggs. It occurred to me for development, that there are a 
couple of good possibilities though for making good use of buildout.


For a package or two you could check out your local repository packages 
into sandbox and symlink the resources you wish to use to a src folder 
or use the find-links feature to find the packages. The buildout would 
use the src path or directly find the packages to create develop eggs of 
the resource packages.


Alternatively, I could see this being a hassle when you are dealing with 
a few or more packages. In reading the documentation, it seems that 
changes to files in recipes could cause buildout to be more responsive 
to code changes. This makes me believe it might be the best bet for a 
number of checked out packages. So likewise if you've checked out your 
recipes to a certain location, you can offer buildout a path to find these.


I guess the question of omitting packages in zope would come down to 
utilizing a custom recipe and using this to leave out the unwanted 
packages (by only co the packages you want). Adding in the new packages 
would be done by adding another recipe to the part (or incorporating 
this action into the original custom recipe).


I think this could be done fairly easily now by modifying the existing 
zope recipe to take a list, dict or .ini file to provide more 
granularity in what you want to co (instead of getting all of zope3 by 
default). This way, one would only need to add or remove package names 
(depending on how it is set up) in a config file for the generic custom 
zope recipe. You would then just rename the recipe and use it in the 
buildout. I guess we need a customzope.recipe :-) I'll be trying this 
today in any case.


I would be great if someone could advise whether I am on the right 
track. Many thanks.


Regards,
David


David Pratt wrote:
Hi there. I downloaded documentlibrary to experiment a bit. Though I got 
a traceback on zc.recipe.egg during the process, it is is clear to me 
the power of buildout - thanks Jim! It also raised a few questions for me:


1. For zope3 recipe, how would one omit certain packages from [zope3] 
part of the buildout
2. How could one omit replace a package with a customized version of 
same stored in a private svn for [data] part
3. How can one pull from private svn repository for the [instance] part 
where you don't have an egg registered with PyPI?


It strikes me that this is great way to package a finished app, and also 
try different things out without concern for your system site-packages. 
But I am of course interested in sandbox scenario just as much or more 
since I am always working with more that a single package at a time that 
are in a changing state always. It definitely looks at though I need to 
improve my egg lingo due to the different ways of describing eggs :-) 
Many thanks.


Regards,
David


David Pratt wrote:
Hi Kapil. Many thanks for your reply. I will be sure to look at this. 
Examining a few real applications that make use of buildout should 
definitely help make things clearer.


Regards,
David

Kapil Thangavelu wrote:


infrae's documentlibrary looks like a good example of using the 
buildout machinery for a custom application.


-k

On Fri, 24 Nov 2006 13:57:25 -0600, David Pratt 
<[EMAIL PROTECTED]> wrote:


It is perhaps a bit too early for this discussion. All I can say is 
that it is getting tougher to keep track of packages and 
dependencies when you want to mix and match for different instances 
with packages of different versions coming from private and public 
repository sources. Given that there are packages I want to remove 
(packages I don't use), replace (like a custom zodb so that I don't 
need to change zodb imports all over the place) or add in z3 just 
adds to the mix. It would be great if someone could paint a clear 
picture of the best way to deal with this so the packaging is more 
transparent and less of a distraction for development. Many thanks.


Regards,
David

David Pratt wrote:
I am just beginning to look at buildout. I want to be able to 
combine my z3 packages with some of z3's, also replacing some of 
z3's packages for customized versions of the same package. Is 
anyone doing this or similar yet that they might comment on how 
useful buildout is on anything more complicated. Many thanks.

 Regards,
David

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
htt

Re: [Zope3-Users] Buildout query

2006-11-24 Thread David Pratt
Hi there. I downloaded documentlibrary to experiment a bit. Though I got 
a traceback on zc.recipe.egg during the process, it is is clear to me 
the power of buildout - thanks Jim! It also raised a few questions for me:


1. For zope3 recipe, how would one omit certain packages from [zope3] 
part of the buildout
2. How could one omit replace a package with a customized version of 
same stored in a private svn for [data] part
3. How can one pull from private svn repository for the [instance] part 
where you don't have an egg registered with PyPI?


It strikes me that this is great way to package a finished app, and also 
try different things out without concern for your system site-packages. 
But I am of course interested in sandbox scenario just as much or more 
since I am always working with more that a single package at a time that 
are in a changing state always. It definitely looks at though I need to 
improve my egg lingo due to the different ways of describing eggs :-) 
Many thanks.


Regards,
David


David Pratt wrote:
Hi Kapil. Many thanks for your reply. I will be sure to look at this. 
Examining a few real applications that make use of buildout should 
definitely help make things clearer.


Regards,
David

Kapil Thangavelu wrote:


infrae's documentlibrary looks like a good example of using the 
buildout machinery for a custom application.


-k

On Fri, 24 Nov 2006 13:57:25 -0600, David Pratt 
<[EMAIL PROTECTED]> wrote:


It is perhaps a bit too early for this discussion. All I can say is 
that it is getting tougher to keep track of packages and dependencies 
when you want to mix and match for different instances with packages 
of different versions coming from private and public repository 
sources. Given that there are packages I want to remove (packages I 
don't use), replace (like a custom zodb so that I don't need to 
change zodb imports all over the place) or add in z3 just adds to the 
mix. It would be great if someone could paint a clear picture of the 
best way to deal with this so the packaging is more transparent and 
less of a distraction for development. Many thanks.


Regards,
David

David Pratt wrote:
I am just beginning to look at buildout. I want to be able to 
combine my z3 packages with some of z3's, also replacing some of 
z3's packages for customized versions of the same package. Is anyone 
doing this or similar yet that they might comment on how useful 
buildout is on anything more complicated. Many thanks.

 Regards,
David

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout query

2006-11-24 Thread David Pratt
Hi Kapil. Many thanks for your reply. I will be sure to look at this. 
Examining a few real applications that make use of buildout should 
definitely help make things clearer.


Regards,
David

Kapil Thangavelu wrote:


infrae's documentlibrary looks like a good example of using the buildout 
machinery for a custom application.


-k

On Fri, 24 Nov 2006 13:57:25 -0600, David Pratt <[EMAIL PROTECTED]> 
wrote:


It is perhaps a bit too early for this discussion. All I can say is 
that it is getting tougher to keep track of packages and dependencies 
when you want to mix and match for different instances with packages 
of different versions coming from private and public repository 
sources. Given that there are packages I want to remove (packages I 
don't use), replace (like a custom zodb so that I don't need to change 
zodb imports all over the place) or add in z3 just adds to the mix. It 
would be great if someone could paint a clear picture of the best way 
to deal with this so the packaging is more transparent and less of a 
distraction for development. Many thanks.


Regards,
David

David Pratt wrote:
I am just beginning to look at buildout. I want to be able to combine 
my z3 packages with some of z3's, also replacing some of z3's 
packages for customized versions of the same package. Is anyone doing 
this or similar yet that they might comment on how useful buildout is 
on anything more complicated. Many thanks.

 Regards,
David

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout query

2006-11-24 Thread David Pratt
It is perhaps a bit too early for this discussion. All I can say is that 
it is getting tougher to keep track of packages and dependencies when 
you want to mix and match for different instances with packages of 
different versions coming from private and public repository sources. 
Given that there are packages I want to remove (packages I don't use), 
replace (like a custom zodb so that I don't need to change zodb imports 
all over the place) or add in z3 just adds to the mix. It would be great 
if someone could paint a clear picture of the best way to deal with this 
so the packaging is more transparent and less of a distraction for 
development. Many thanks.


Regards,
David

David Pratt wrote:
I am just beginning to look at buildout. I want to be able to combine my 
z3 packages with some of z3's, also replacing some of z3's packages for 
customized versions of the same package. Is anyone doing this or similar 
yet that they might comment on how useful buildout is on anything more 
complicated. Many thanks.


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Buildout query

2006-11-22 Thread David Pratt
I am just beginning to look at buildout. I want to be able to combine my 
z3 packages with some of z3's, also replacing some of z3's packages for 
customized versions of the same package. Is anyone doing this or similar 
yet that they might comment on how useful buildout is on anything more 
complicated. Many thanks.


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Utilities naming convention

2006-11-17 Thread David Pratt
Hi Frank, I guess I have just seen more Utilities named this way than 
not - so just confirming things for myself. I am also using zapi all 
over the place. Perhaps I should stop... I am not seeing deprecation 
warnings yet. Many thanks.


Regards
David

FB wrote:

Hi,

On Thu, Nov 16, 2006 at 04:09:52PM -0400, David Pratt wrote: Probably should

have clarified - I am referring to Utility container names not anything to
do with Python coding standards.


None that I'm aware of. Only the title of the utility's registration matters
for your application - which is '' in very often.
The contained-name is fully independent from the registration's title.
Choose whatever you want. Whenever a part of your application has to link
to a utility of yours, it should use
   zapi.absoluteURL(zapi.getUtility(IMyUtility),request)
which makes knowing the URL unneccessary.

Regards,

Frank

PS: I know, zapi is deprecated - but it's so convenient :-) ...
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Utilities naming convention

2006-11-16 Thread David Pratt
Probably should have clarified - I am referring to Utility container 
names not anything to do with Python coding standards.


David Pratt wrote:
Just a simple question of style for naming utilities. I don't like caps 
in urls. Is there a general convention of using CamelCase for utility 
names or is it just my imagination. Should I use what I prefer? Would 
just like to know what others do. Thanks


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Utilities naming convention

2006-11-16 Thread David Pratt
Just a simple question of style for naming utilities. I don't like caps 
in urls. Is there a general convention of using CamelCase for utility 
names or is it just my imagination. Should I use what I prefer? Would 
just like to know what others do. Thanks


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Field sets in zope3

2006-10-15 Thread David Pratt
Hi. One thing I like about django's admin interface is the ability to 
easily group fields in a form with dozens of fields into field sets that 
expand or collapse a portion of the form making it more usable. Has 
anyone done anything similar using formlib at this point or have any 
pointers on accomplishing this functionality with least pain. Many thanks.


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.extfile and ZEO ?

2006-09-06 Thread David Pratt
Thierry, you may want to consider blobs when they become generally 
available through zodb. It takes care of the management details for ZEO 
and files.


Regard,
David

Bernd Dorn wrote:


On 01.09.2006, at 15:36, Thierry Florac wrote:



  Hi,

I just discovered the "z3c.extfile" package that I'd like to use in my 
current Zope3 development.
My question is simple : what are the requirements to use this package 
in a ZEO context with several servers ?


no problem, as stephan said you just have to share the directory which 
contains the files


the files are immutable by implementation because their name is the sha 
digest of the file, so you never get a write conflict 


regards, Bernd



Thanks for any advise,

  Thierry Florac
--
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : [EMAIL PROTECTED] 
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85

___
Zope3-users mailing list
Zope3-users@zope.org 
http://mail.zope.org/mailman/listinfo/zope3-users





___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zc.tables integration with Zope3

2006-08-23 Thread David Pratt
Hi Jim. This approach is completely new to me. It is interesting and 
I'll keep an eye on your blog. How expensive is updating indexes with 
data modification. You are talking about sqlite, does this mean you 
figure the indexes would be a significant drag on the ZODB due their 
size or is this idea a performance consideration. Many thanks.


Regards,
David


Jim Washington wrote:
This is probably a bit premature, but I have been doing some thinking 
about reordering/batching of large sets.


My current (not-quite-ready-for-prime-time) solution involves 
factoradics, and I have done a bit of a write-up on my blog, 
http://blog.hill-street.net/?p=5 .


The idea is that you can have indexes to several permutations 
(first-name-sort, last-name sort, last-modified-date-sort, etc) of a 
set, and refer to those permutations by name, which refers to an integer 
index.  The factoradic representation of that integer can be used in a 
quick algorithm to make a list of the ids in the set in that specific 
order, and simply slicing that list would give easy batching capability 
without needing to access the objects at all.  There would, however, be 
a need to update all of the permutation indexes when the data change.


One thing I have not dealt with yet to make this really useful would be 
a utility that memoizes the factorials and factoradics, which are 
expensive to calculate, probably using an sqlite database.


The big trade-off is doing a sort each time the data is accessed vs. 
doing all of the named sorts each time the data is changed.


I am not sure at the moment whether this solves a real need yet, but I 
thought I would bring it up since we are discussing batching.  I think 
it is just at the "interesting idea" stage for right now.


-Jim Washington


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zc.tables integration with Zope3

2006-08-22 Thread David Pratt
Hi Stephan. Could a Zope3 branch be set up in the zope repository so 
that your enhanced tables code can be added to the branch (so contents 
view refactored using it)? The contents view class could be the model 
for using the tables package in zope3. In fact, it could be become the 
base class with overrides to columns for custom views to provide sorting 
and batching (with the capability of displaying DC data).


I like the idea of using divs to create generic presentation structures 
with batching and sorting capability. I had similar thoughts of 
modifying zc.tables to do something similar (after reading the code).


Has anyone an opinion about Boston vs Rotterdam as default skin and
the need for a generic batching utility? I think at some point, it is 
time to say out with the old and in with the new - particularly since 
viewlets factor largely in skinning (and skinning flexibility). I think 
if this is what is advocated for skinning, Zope3 ought to be presented 
with a default skin that uses this approach. Many thanks.


Regards,
David

Stephan Richter wrote:

On Monday 21 August 2006 15:14, David Pratt wrote:

Hi. I am wondering if zc.tables could not be incorporated into Zope3
trunk. My rational for its inclusion is so that the contents views may
be refactored to use it. The current contents view makes little sense
without batching and sorting. The ZMI could really use this basic face
lift to bring it in line with the fundamental views provided in its
Zope2 counterpart. I'd also suggest that the Boston skin be given
preference over rotterdam as the default skin for zope.


zc.table still needs an iteration or two before it is ready for the trunk. I 
have started a branch for another iteration, but it will take me a while to 
complete. My goal is to cleanly include some of my enhancements (already 
checked in for demonstration), to generalize the code and make a "div" based 
alternative.


Regards,
Stephan


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] zc.tables integration with Zope3

2006-08-21 Thread David Pratt
Hi. I am wondering if zc.tables could not be incorporated into Zope3 
trunk. My rational for its inclusion is so that the contents views may 
be refactored to use it. The current contents view makes little sense 
without batching and sorting. The ZMI could really use this basic face 
lift to bring it in line with the fundamental views provided in its 
Zope2 counterpart. I'd also suggest that the Boston skin be given 
preference over rotterdam as the default skin for zope.


Beyond this, a batching utility package is really needed in the way that 
ZTUtils provided this support in Zope2. While schooltool has this 
support, its GPL status does not make it accessible to non GPL 
developers (that might anticipate this generic utility in the code 
base). There are some really complex packages out there but this basic 
utility is still not available in our toolset. Many thanks.


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Blog package

2006-08-17 Thread David Pratt

Hi Stephan. Many thanks for this excellent example! :-)

Regards,
David

Stephan Richter wrote:

On Thursday 17 August 2006 10:32, David Pratt wrote:

Hi Stephan. Yes, I have seen this added recently with great interest.

:-) I'm hoping to experiment with this shortly to see how this works.

Can you point to any code using this at the moment that I may see a
practical demonstration of its integration. Many thanks.


Here is the basic idea:

  
  

  
  

  
  

In Python something like that:

import zope.interface
from zope.location import location
from zope.publisher.interfaces import NotFound
from z3c.traverser import interfaces

class YearTraverser(object):
zope.interface.implements(interfaces.ITraverserPlugin)

def __init__(self, context, request):
self.context = context
self.request = request

def publishTraverse(self, request, name):
yearNumber = int(name)
if yearNumber < 2000:
raise NotFound(name)
year = YearProxy()
location.locate(year, self.context, name)
return tag

Regards,
Stephan


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Blog package

2006-08-17 Thread David Pratt
Hi Stephan. Yes, I have seen this added recently with great interest. 
:-) I'm hoping to experiment with this shortly to see how this works. 
Can you point to any code using this at the moment that I may see a 
practical demonstration of its integration. Many thanks.


Regards,
David


Stephan Richter wrote:

On Thursday 17 August 2006 09:37, David Pratt wrote:

I have looked at it and thought it would be a nice package to finish
however I haven't yet got how to perform the nice traversal tricks for
nice urls for entries (I had written to the five list in July). Any
pointers or an explanation would be appreciated. From my post to five list:


Null problemo with z3c.traverser. :-)

Seriously, the pluggable traverser and the plugins are the way to go. We use 
them for the lovely package heavily to do logic paths.


Regards,
Stephan

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Blog package

2006-08-17 Thread David Pratt
Hi Florian. There is the beginning of something in the codespeak 
repository - but it had not been finished. One of the folks from Nuxeo 
started it but the schema's etc are there etc.


http://codespeak.net/svn/z3/zblog/trunk/

I have looked at it and thought it would be a nice package to finish 
however I haven't yet got how to perform the nice traversal tricks for 
nice urls for entries (I had written to the five list in July). Any 
pointers or an explanation would be appreciated. From my post to five list:



On another note, one thing I have appreciated with django is a means to 
construct urls in a sensible way. I'd like to better understand an 
approach to constructing urls in zope 3 that are not necessarily based 
on objects not being in a specific container. A blog url example is a 
good one to use for this. For a blog you may have a container for blog 
entries and then the blog entries themselves but you may want the 
articles to be reached like:


*  Accessing /blog/ will show a list of all posts by reverse date order
* Accessing /blog//, eg /blog/2006/ will show a listing of 
posts for just that year.
* Accessing /blog///, eg /blog/2006/12/ will show a 
listing of posts for that month.
* Accessing /blog, eg /blog/2006/12/20/ will 
show all postings on that particular day
* Accessing /blog will show a 
particular article.


Can you explain an approach to accomplish something similar in zope3. 
Many thanks.



Certainly, the new tag package that has just come into the zope svn 
would fit nicely into this at this point to moving this forward.


Regards,
David

Florian Lindner wrote:

Hello,
is there a blog package for Zope3 around?

Thanks,

Florian
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zalchemy integration

2006-08-14 Thread David Pratt

Roger Ineichen wrote:

Hi David

[...]
Hi Roger. This is really interesting. It would be good to see 
a very small demo of these nice packages you have been 
contributing - something
  that would put together the minimal layer, menu package, 
and a few basic viewlets just to give folks a basic idea of 
what can be acheived 'minimally'. Also a clearer 
understanding of where to use trusted over the basic layer. I 
would seem that this is the road to some very dynamic 
skinning flexibility.


That whould be nice, but right now I don't have time for doing
such a *how to* sample. Let me know if somebody likes to doing
this. Perhaps I can help a little bit.


Hi Roger. I'd be willing to give this a try. Perhaps the Boston skin can 
be broken into smaller viewlets as a means of providing this howto so 
that I don't have to create everything. I you are happy with this, I 
will keep in touch offlist.




The one thing perhaps missing from this is a mechanism for 
storing and manipulating viewlets and selecting a template on 
a container. Perhaps a template manager is also needed. What 
I am missing from Zope2 is the simple ability to drop an 
index.html or different template into a folder as a simple 
way to make folder views that are based on site context. 
Sites can be pretty terrible otherwise if they are not 
sensitive to where you are and display the same organization 
of viewlets. If viewlets/viewlet managers and a template can 
be maintained as annotations on a container and the weighting 
of viewlet managers manipulated through a form instead of 
zcml then we'd be cooking with gas. :-)


I agree on that, at least on the functionality. Stephan and I 
will implement a portlet like concept some time in the future.
Such a concept will support to build standalone applications 
as viewlets with own urls and states etc. This should be enough 
base for all future concepts where I can think about.


CPSSkins does this from a portlet perspective but its implementation is 
not yet complete. I not clear of how viewlets fit into CPSSkins at this 
point as a result. Perhaps this will come to light. I have made crude 
themes and portlets but have not yet been able to assign the theme/theme 
page to a path. This will be part of the Site Manager functionality. JM 
has been away for a bit but I have been following this closely for some 
time.


It can create a theme and a theme page but the css is very tightly 
integrated into the WYSIWYG interface and auto-generates the css classes 
and ids. Though it has all sorts of potential, I am much more at home 
writing and testing stylesheets than going back to my days with 
Dreamweaver. The autogeneration of classes and ids would make it 
difficult to style writing your own css in resource files. I'd rather 
just hang the css on the structures, breaking it only into a small 
number of files and be done with it.


Regards
David




Regards
Roger Ineichen


Regards,
David

Roger Ineichen wrote:

Hi Jeff

[...]
With the ZMI, I end up asking "is this the UI I want to 
deliver to my customer?" And the answer is rarely "yes!" I 
feel like I have to arm wrestle a lot more to turn off and 
hide features. I still don't really understand how the 'Add' 
menu works.
Did you see the layer package I commited to the z3c repos the 
last days?
There is now a minimal layer which allows you to build 
very easy a own administration interface.


This isn't a criticism of the ZMI skin. It just hasn't been a 
fit for any of our customers or applications, which makes it 
very hard to support. Fortunately, it's fairly easy to do 
away with. But it also feels very hard to migrate away from 
if that's where ones initial work is.

We really should use the Boston skin which offers much more
flexibility for such customized ZMI's because of it's
viewlet/manager concept and drop the Rotterdam skin.

[...]
Having developed on and for Zope for nearly ten years now, I 
can say that there is no such thing as "traditional zope 
development" :).

There are a lot of ways to get things done.

;-)

Regards
Roger Ineichen
_
Projekt01 GmbH
 

--
Jeff Shell
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users




___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zalchemy integration

2006-08-13 Thread David Pratt
Hi Roger. This is really interesting. It would be good to see a very 
small demo of these nice packages you have been contributing - something 
 that would put together the minimal layer, menu package, and a few 
basic viewlets just to give folks a basic idea of what can be acheived 
'minimally'. Also a clearer understanding of where to use trusted over 
the basic layer. I would seem that this is the road to some very dynamic 
skinning flexibility.


The one thing perhaps missing from this is a mechanism for storing and 
manipulating viewlets and selecting a template on a container. Perhaps a 
template manager is also needed. What I am missing from Zope2 is the 
simple ability to drop an index.html or different template into a folder 
as a simple way to make folder views that are based on site context. 
Sites can be pretty terrible otherwise if they are not sensitive to 
where you are and display the same organization of viewlets. If 
viewlets/viewlet managers and a template can be maintained as 
annotations on a container and the weighting of viewlet managers 
manipulated through a form instead of zcml then we'd be cooking with 
gas. :-)


Regards,
David

Roger Ineichen wrote:

Hi Jeff

[...]
With the ZMI, I end up asking "is this the UI I want to 
deliver to my customer?" And the answer is rarely "yes!" I 
feel like I have to arm wrestle a lot more to turn off and 
hide features. I still don't really understand how the 'Add' 
menu works.


Did you see the layer package I commited to the z3c repos the 
last days?
There is now a minimal layer which allows you to build 
very easy a own administration interface.


This isn't a criticism of the ZMI skin. It just hasn't been a 
fit for any of our customers or applications, which makes it 
very hard to support. Fortunately, it's fairly easy to do 
away with. But it also feels very hard to migrate away from 
if that's where ones initial work is.


We really should use the Boston skin which offers much more
flexibility for such customized ZMI's because of it's
viewlet/manager concept and drop the Rotterdam skin.

[...]
Having developed on and for Zope for nearly ten years now, I 
can say that there is no such thing as "traditional zope 
development" :).

There are a lot of ways to get things done.


;-)

Regards
Roger Ineichen
_
Projekt01 GmbH
 

--
Jeff Shell
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users




___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zalchemy integration

2006-08-12 Thread David Pratt
Hi Jeff. Good points. I can really add anything more to this other than 
I believe there are great possibilities working with Zope 3 in something 
that is more tightly bound or not. Zope 3's architecture will be become 
as flexible as python itself and it future packaging choices will only 
underscore this. I believe it will not be long before we will see newer 
skinning approaches taking advantage of the ui frameworks as resources 
in Zope3 in a big way.


We are coming into the .3 mark of Zope 3. Typically the stability of the 
api's at this point are going to permit all sorts of interesting and 
exciting developments - to build on something that has been in fact 
solidifying for years now.


Regards,
David


Jeff Shell wrote:

On 8/12/06, David Pratt <[EMAIL PROTECTED]> wrote:

Hi Jeff. Your approach is very interesting. There is lots room in Zope
for differences in the way applications are tackled to deliver on
requirements. My feeling is that explicit object metadata and some of
the content-management-esque concepts in Zope fit prominently into the
future of the web.


I think it may fit with _a_ future, but I don't know if there's _the_
future. Applications with very dynamic web UI's are as much of a piece
of that 'future web' as structured semantic content. And I think that
those kinds of applications can have slightly or wildly different
requirements than CMS style systems. I've played a little bit with
'Seaside', and it's absolutely outstanding how it works and how very
little code one has to write to maintain very stateful web apps.


Zope's interfaces and adapters facilitate benefits that can be derived
from hybridization with any form of storage. As much as the ZMI may
hinder, I believe it plays a role in visualizing incremental development
and utilizing what is already there. Unfortunately, time and budgets are
also business considerations and this same infrastructure allows for
some fairly quick development.


We've been building up our own basic structure that just has less
distractions, so we can get started up pretty easily. This web page /
'admin screen' structure is usually copied and pasted into each
application. The downside is that it's more work to share the
benefits. But the upside is that it's really easy to start tailoring
to the requirements and scenarios of a particular application.

With the ZMI, I end up asking "is this the UI I want to deliver to my
customer?" And the answer is rarely "yes!" I feel like I have to arm
wrestle a lot more to turn off and hide features. I still don't really
understand how the 'Add' menu works.

This isn't a criticism of the ZMI skin. It just hasn't been a fit for
any of our customers or applications, which makes it very hard to
support. Fortunately, it's fairly easy to do away with. But it also
feels very hard to migrate away from if that's where ones initial work
is.

This is why I'm really looking forward to `zc.buildout`, the
egg-ifying of Zope, etc. I look forward to the day when it's much
easier to build and re-destribute -- even if it's only internally -- a
custom configuration that leaves unwanted bits behind. I regret that I
haven't had the time to test and experiment with some of these new
developments.


It sounds that the ZMI and browser views hasn't been an impediment but a
distraction to what you describe (since you were able to find a path
with Zope). This is a demonstration that successful outcomes less
tightly bound to more traditional zope development can be achieved also.
:-)  Many thanks.


Having developed on and for Zope for nearly ten years now, I can say
that there is no such thing as "traditional zope development" :).
There are a lot of ways to get things done.

I think it's a testament to the architectures of both Zope 3 and
SQLAlchemy that we've been able to do this latest project in this
style - and with the cleanest application/business code we've ever
had. But it took a lot of work and time and experience from prior
engagements to filter out the parts of Zope 3 that we wanted, the
parts that were crucial, and all of the fluff we could leave out. Once
we got to that point (and started building up some new libraries and
frameworks of our own), our experience with Zope 3 took a turn back
towards the positive.


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zalchemy integration

2006-08-12 Thread David Pratt
Hi Jeff. Your approach is very interesting. There is lots room in Zope 
for differences in the way applications are tackled to deliver on 
requirements. My feeling is that explicit object metadata and some of 
the content-management-esque concepts in Zope fit prominently into the 
future of the web.


Zope's interfaces and adapters facilitate benefits that can be derived 
from hybridization with any form of storage. As much as the ZMI may 
hinder, I believe it plays a role in visualizing incremental development 
and utilizing what is already there. Unfortunately, time and budgets are 
also business considerations and this same infrastructure allows for 
some fairly quick development.


It sounds that the ZMI and browser views hasn't been an impediment but a 
distraction to what you describe (since you were able to find a path 
with Zope). This is a demonstration that successful outcomes less 
tightly bound to more traditional zope development can be achieved also. 
:-)  Many thanks.


Regards,
David

Jeff Shell wrote:



So yes, it is possible to have good SQLAlchemy integration. But
'integration' may mean different things to different people. Some may
want invisible or near invisible integration with conventional Zope
content-management-esque concepts, integration with the ZMI, the
dublin core, etc. That's overkill for my needs, which is why I've
stayed away from those implementations. Having Location, Security,
Adapter binding (which yields views and URL traversal) is just about
what we need. The rest we provide through our own business logic as
Views, Utilities, and plain old Python classes and functions. And only
one new ZCML directive (yay!).


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] ZCML updating question

2006-08-10 Thread David Pratt
Hi. I am trying to update an old package. Can someone suggest an updated 
equivalent for the following:


  



  

Many thanks.

Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zalchemy in ZMI

2006-08-09 Thread David Pratt

Hi Carlo.

As a workaround to get objects into the db you can comment out the 
following lines in checkName like this:


def checkName(self, name, container):
if isinstance(name, str):
name = unicode(name)
elif not isinstance(name, unicode):
raise TypeError("Invalid name type", type(name))

#unproxied = removeSecurityProxy(container)
#if not name.startswith(unproxied._class.__name__+'.'):
#  raise UserError("Invalid name for SQLAlchemy object")
return True

If you plan on using it, the container implementation needs some work 
and there is currently no adapter for deleting objects (see TODO.txt) I 
am grateful though for the efforts to get the package this far along and 
for the transaction integration work particularly.


Regards,
David

Carlo Cardelli wrote:

Hi all,
I have an error trying to get zalchemy working in the ZMI.

- I created an SQLAlchemyContainer named cCustomer;
- In its "class" attribute I put the path to my content class 
"Customer", marked with the ISQLAlchemyObject interface and 
as-far-as-i-can-see well mapped with a 'customerTable' db-model;
- When trying to add a Customer object (just submitting the name of the 
new object in the 'adding' form, not in the subsequent 'edit' form), I 
get an error from zalchemy.container.SQLAlchemyNameChooser in the method 
'checkName':


 object has no attribute '_class'

Looking at the code, seems like the method wants to be given the 
'container' object, but get instead the 'contained' one.


I am working with the 'trunk' version of zalchemy and Zope 3.3.0b1.

I am still a newbie, so it is very likely I am getting something wrong.

Any hint?


Thank you in advance.


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Generations and sql

2006-07-22 Thread David Pratt
Hi Chris. This is really great to know. I haven't yet experimented with 
z3 generations this way but hoping for the same success. Many thanks.


Regards,
David

Chris McDonough wrote:
I use the Zope 2 generations machinery to manage SQL DDL for Postgres.  
It works pretty good.


- C

On Jul 19, 2006, at 2:48 PM, David Pratt wrote:

I am interested in hearing from anyone who may be using generations in 
conjunction with relational database storages in zope3 as a means of 
maintaining their schemas. Does anyone have any experience with this 
to indicate how well this works for rdb's. Many thanks.


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users




___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Getting SOFTWARE_HOME

2006-07-22 Thread David Pratt
Can someone advise how get a handle of SOFTWARE_HOME on a running zope3 
instance. Many thanks.


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Generations and sql

2006-07-19 Thread David Pratt
I am interested in hearing from anyone who may be using generations in 
conjunction with relational database storages in zope3 as a means of 
maintaining their schemas. Does anyone have any experience with this to 
indicate how well this works for rdb's. Many thanks.


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] ImportError when calling runzope.

2006-07-19 Thread David Pratt
Hi Luke. It seems that you may have copied package-includes files from 
an instance of an older distribution to your newer one or perhaps your 
are trying to use an older zope instance for your newer zope version.


The error is pointing to sendmail-meta.zcml as the source of your 
trouble. In this distribution you should not have a sendmail-meta.zcml 
or sendmail-configure but a mail-meta.zcml and mail-configure.zcml since 
mail is in zope.app.mail.


So you can compare name what you have in your instance to what is in the 
distribution you downloaded and fix this accordingly or alternatively, 
follow the instructions for making a new zope instance. This should also 
give you a working zope instance.


Regards,
David

Luke Benstead wrote:

Hi,

I'm new to Zope and I'm having trouble getting the instance I have 
created to run. I'm using Zope 3.2.0 on Windows 2000.


When I call 'runzope' I get the following python traceback:

Traceback (most recent call last):
 File "bin/runzope", line 48, in ?
   run()
 File "bin/runzope", line 44, in run
   main(["-C", CONFIG_FILE] + sys.argv[1:])
 File "C:\Python24\Lib\site-packages\zope\app\twisted\main.py", line 74, 
in main

   service = setup(load_options(args))
 File "C:\Python24\Lib\site-packages\zope\app\twisted\main.py", line 
139, in setup

   zope.app.appsetup.config(options.site_definition, features=features)
 File "C:\Python24\Lib\site-packages\zope\app\appsetup\appsetup.py", 
line 110, in config

   context = xmlconfig.file(file, context=context, execute=execute)
 File "C:\Python24\Lib\site-packages\zope\configuration\xmlconfig.py", 
line 554, in file

   include(context, name, package)
 File "C:\Python24\Lib\site-packages\zope\configuration\xmlconfig.py", 
line 490, in include

   processxmlfile(f, context)
 File "C:\Python24\Lib\site-packages\zope\configuration\xmlconfig.py", 
line 345, in processxmlfile

   parser.parse(src)
 File "C:\Python24\Lib\xml\sax\expatreader.py", line 107, in parse
   xmlreader.IncrementalParser.parse(self, source)
 File "C:\Python24\Lib\xml\sax\xmlreader.py", line 123, in parse
   self.feed(buffer)
 File "C:\Python24\Lib\xml\sax\expatreader.py", line 207, in feed
   self._parser.Parse(data, isFinal)
 File "C:\Python24\Lib\xml\sax\expatreader.py", line 348, in end_element_ns
   self._cont_handler.endElementNS(pair, None)
 File "C:\Python24\Lib\site-packages\zope\configuration\xmlconfig.py", 
line 326, in endElementNS

   self.context.end()
 File "C:\Python24\Lib\site-packages\zope\configuration\config.py", line 
544, in end

   self.stack.pop().finish()
 File "C:\Python24\Lib\site-packages\zope\configuration\config.py", line 
690, in finish

   actions = self.handler(context, **args)
 File "C:\Python24\Lib\site-packages\zope\configuration\xmlconfig.py", 
line 490, in include

   processxmlfile(f, context)
 File "C:\Python24\Lib\site-packages\zope\configuration\xmlconfig.py", 
line 345, in processxmlfile

   parser.parse(src)
 File "C:\Python24\Lib\xml\sax\expatreader.py", line 107, in parse
   xmlreader.IncrementalParser.parse(self, source)
 File "C:\Python24\Lib\xml\sax\xmlreader.py", line 123, in parse
   self.feed(buffer)
 File "C:\Python24\Lib\xml\sax\expatreader.py", line 207, in feed
   self._parser.Parse(data, isFinal)
 File "C:\Python24\Lib\xml\sax\expatreader.py", line 348, in end_element_ns
   self._cont_handler.endElementNS(pair, None)
 File "C:\Python24\Lib\site-packages\zope\configuration\xmlconfig.py", 
line 326, in endElementNS

   self.context.end()
 File "C:\Python24\Lib\site-packages\zope\configuration\config.py", line 
544, in end

   self.stack.pop().finish()
 File "C:\Python24\Lib\site-packages\zope\configuration\config.py", line 
689, in finish

   args = toargs(context, *self.argdata)
 File "C:\Python24\Lib\site-packages\zope\configuration\config.py", line 
1381, in toargs

   args[str(name)] = field.fromUnicode(s)
 File "C:\Python24\Lib\site-packages\zope\configuration\fields.py", line 
141, in fromUnicode

   raise schema.ValidationError(v)
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File 
"C:\ZopeInstance\etc\site.zcml", line 3.2-3.50
   ZopeXMLConfigurationError: File 
"C:\ZopeInstance\etc\package-includes\sendmail-meta.zcml", line 1.0-1.51
   ConfigurationError: ('Invalid value for', 'package', 'ImportError: 
Module zope has no global sendmail')


Any help in resolving this error would be appreciated,

Thanks

Luke Benstead.
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Security alert: use of Through-the-Web reStructuredText

2006-07-19 Thread David Pratt

Benji York wrote:

David Pratt wrote:
What about the idea of maintaining a text file in the distribution 
specific to possible security issues. Is this worth considering for 
historical purposes so they do not get lost over time or implicitly 
understood by only a handful of people.


Exactly.  Any package that needs security-related things verified should 
have a test (doctest in a text file) describing the problem and 
verifying that it has been fixed.


I don't think we want a single file to hold them though, tests 
(including these) should normally live near the package that they test.


Ok this all makes perfect sense. The doctest is the right place for this 
for sure. Just took me a while to see that everthing was already there 
to deal with this as consistently as all other parts of zope3. It's all 
good :-)


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Security alert: use of Through-the-Web reStructuredText

2006-07-19 Thread David Pratt

Benji York wrote:

David Pratt wrote:
You are probably right but just the same I'd rather see the patched 
version for z3 also since I am certain this will become less obvious 
over time if it is left the way it is.


Instead of maintaining a fork of docutils, Zope 3 should (and may 
already, I haven't been keeping up with this issue) include tests to 
make sure we're using docutils appropriately.  Best of both worlds: we 
have continued assurance we don't regress, and we don't have to maintain 
a fork/patches.


Hi Benji. Fair enough. What about the idea of maintaining a text file in 
the distribution specific to possible security issues. Is this worth 
considering for historical purposes so they do not get lost over time or 
implicitly understood by only a handful of people. Many thanks.


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Security alert: use of Through-the-Web reStructuredText

2006-07-19 Thread David Pratt

Jim Fulton wrote:


On Jul 18, 2006, at 2:55 PM, David Pratt wrote:


Hi Jim. I was noticing a 0.4.0-zope in distutils


I don't know what you mean by this.

that looks patched with  NotImplementedErrors for the offending code 
in docutils.parsers.rst.directives.misc.  Can you when this will land 
in the Zope3 trunk?


Hi Jim.

Yes, I mean docutils, sorry.



If you mean patching the docutils, then as far as I'm concerned, it will 
never land in the Zope 3 trunk.


The right solution to this problem is to write applications that use 
docutils correctly, not to patch docutils.


You are probably right but just the same I'd rather see the patched 
version for z3 also since I am certain this will become less obvious 
over time if it is left the way it is.


Alternatively, perhaps a text file for these security issues could be 
included in the distribution so it is not forgotten with any 
recommendations for a programmer to avoid known security issues.


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Security alert: use of Through-the-Web reStructuredText

2006-07-18 Thread David Pratt
Hi Jim. I was noticing a 0.4.0-zope in distutils that looks patched with 
 NotImplementedErrors for the offending code in 
docutils.parsers.rst.directives.misc.  Can you when this will land in 
the Zope3 trunk?


Regards,
David


Jim Fulton wrote:


On Jul 8, 2006, at 11:49 AM, David Pratt wrote:



Jim Fulton wrote:
Recently, a serious security flaw was found in Zope 2 due to it's 
improper support for allowing reStructuredText to be edited 
through-the-web.  reStructuredText has directives that allow 
inclusion of any file a Zope process could read and inclusion of data 
obtained from fetching arbitrary URLs.  In a trusted environment, 
these directives have legitimate uses.  The feature of including 
files and URL results should not be enabled for text entered from 
untrusted sources, which applies to most through-the-web interactions.


Hi Jim. In the case of a wiki, it is the nature of a wiki that folks 
are able to edit through the web.


But a wiki can be edited in other formats that restructured text. 
(Personally, I think

wikis should use tools like Epoz or Kupu to allow direct HTML editing, but
that's a different matter.


Wouldn't data validation and any necessary alterations to the 
directives some sense as opposed to removing it from the zope3 mix?


Sure, if someone is willing to do it and take responsibility.  Note that 
I'm not removing these from the release, because they've never been in 
the release.  I didn't even remove them from the repository, I just 
removed them from the Zope 3 tree.


I'm convinced that TTW reST can be safe with suitable attention to detail.
So far though, that hasn't happened.  No one has come forward yet and said
"I'll maintain this and be responsible for making sure we're secure wrt 
reST".



The recent hotfix:
  http://www.zope.org/Products/Zope/Hotfix-2006-07-05/Hotfix-2006-07-05
addresses the problem for Zope 2.


Perhaps. We don't know for sure. We don't have tests.  We don't know if 
it can
be defeated using a reload product.  It is also a very crude fix. It 
prevents people

from creating add-ons that make legitimate use of file-inclusion or the raw
directive.  It was a great fix in an emergency -- and this was a serious 
emergency,

but I don't want to use such a fix in Zope 3.


It is safe to allow reStructuredText through the web with care.  The 
inclusion of files or URL results can be disabled, but the programmer 
must explicitly disable the feature.  It is not disabled by default. 
It is also critical that a developer who exposes through-the-web 
reStructuredText have tests to verify that the file/url inclusion 
feature has been disabled.
Zope 3 itself, as released, doesn't have this problem because it 
doesn't allow reST entry through the web.  There are third-party 
applications, however, including 2 packages in the Zope 3 subversion 
tree that do have this problem.  I strongly urge you to avoid using 
any Zope package that allows through-the-web input of 
reStructuredText unless you can verify that file/url has been 
properly disabled.
The zwiki and bugtracker packages do not currently disable file/url 
inclusion and should not be used in situations in which users who are 
not highly trusted have access to these applications.


Can you be explicit about the process of disabling file/url inclusion 
for zope3 (if this is the critical point you are making ). The use of 
restructured text is valuable in zope and obviously it is important to 
understand security measures that would allow its continued use.


The reStructuredText documentation gives instructions for disabling it.

But something this risk needs people to be responsible.  I'm not seeing 
that. I expect someone to come forward eventually.  Part of being 
responsible is writing reasonably extensive tests.


If this can be done, why remove the products from the repository tree? 
Would it not be better to apply the necessary fixes?  Many thanks.


Because their presence in the Zope 3 tree put people at serious risk.  
If someone

wants to work on them, great, and they can release them as add-on packages.

Jim

--
Jim Fultonmailto:[EMAIL PROTECTED]Python Powered!
CTO (540) 361-1714http://www.python.org
Zope Corporationhttp://www.zope.comhttp://www.zope.org




___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Security alert: use of Through-the-Web reStructuredText

2006-07-08 Thread David Pratt


Jim Fulton wrote:
Recently, a serious security flaw was found in Zope 2 due to it's 
improper support for allowing reStructuredText to be edited 
through-the-web.  reStructuredText has directives that allow inclusion 
of any file a Zope process could read and inclusion of data obtained 
from fetching arbitrary URLs.  In a trusted environment, these 
directives have legitimate uses.  The feature of including files and URL 
results should not be enabled for text entered from untrusted sources, 
which applies to most through-the-web interactions.


Hi Jim. In the case of a wiki, it is the nature of a wiki that folks are 
able to edit through the web. Wouldn't data validation and any necessary 
alterations to the directives some sense as opposed to removing it from 
the zope3 mix?




The recent hotfix:

  http://www.zope.org/Products/Zope/Hotfix-2006-07-05/Hotfix-2006-07-05

addresses the problem for Zope 2.

It is safe to allow reStructuredText through the web with care.  The 
inclusion of files or URL results can be disabled, but the programmer 
must explicitly disable the feature.  It is not disabled by default. It 
is also critical that a developer who exposes through-the-web 
reStructuredText have tests to verify that the file/url inclusion 
feature has been disabled.


Zope 3 itself, as released, doesn't have this problem because it doesn't 
allow reST entry through the web.  There are third-party applications, 
however, including 2 packages in the Zope 3 subversion tree that do have 
this problem.  I strongly urge you to avoid using any Zope package that 
allows through-the-web input of reStructuredText unless you can verify 
that file/url has been properly disabled.


The zwiki and bugtracker packages do not currently disable file/url 
inclusion and should not be used in situations in which users who are 
not highly trusted have access to these applications.


Can you be explicit about the process of disabling file/url inclusion 
for zope3 (if this is the critical point you are making ). The use of 
restructured text is valuable in zope and obviously it is important to 
understand security measures that would allow its continued use.


If this can be done, why remove the products from the repository tree? 
Would it not be better to apply the necessary fixes?  Many thanks.


Regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


  1   2   >