[Zope3-Users] Required choice without default value in formlib

2007-01-12 Thread Thierry Florac

  Hi,

I use formlib to handle my forms.
In a AddForm, how can I have a required choice property, using a dynamic
vocabulary, without a default selected value ?

Thanks for any help,

  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] Customized NotFound-Page

2007-01-12 Thread Tom Gross

Hi,

   I created a customized 'NotFound'-Page which displays fine itself. 
Now the page should render in a skin with some security sensitive 
viewlets. These viewlets disappear when rendering the 'NotFound'-Page.


Is there a known solution to the problem?

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


Re: [Zope3-Users] recovering from a lost db connection

2007-01-12 Thread Brian Sutherland
On Thu, Jan 11, 2007 at 09:55:28PM -0500, Roy Mathew wrote:
 
 Brian Sutherland writes:
   On Wed, Jan 10, 2007 at 08:13:27PM -0500, Roy Mathew wrote:
What is the recommended way to recover from a db connection that is
held by a Psycopgda adapter instance? If for some reason postgres
goes down, I get the following error:

  File 
 /var/lib/zope3/instances/instance.barry2007/lib/python/sqlos/adapter.py, 
 line 83, in _runWithConnection
val = meth(conn, *args)
  File 
 /usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1814-py2.4.egg/sqlobject/dbconnection.p
  , line 351, in _queryOne
self._executeRetry(conn, c, s)
  File 
 /var/lib/zope3/instances/instance.barry2007/lib/python/sqlos/adapter.py, 
 line 77, in _executeRetry
raise DatabaseException(str(exc.args))
  DatabaseException: ('no connection to the server\n',).

I then have no recourse but to restart the zope server. In the Java
world one would put a try/catch around the the SQL operation and
attempt a reconnect, but I am wondering if there is a better way
(read: automatic recovery) in a z3 world.
   
   The way ZPsycopgDA does it is exactly that. But it can be a little
   complex when you look at the detail.
   
   In the Z3 case, I would:
   * If the error is a concurrent update error, raise a Retry
 exception. The same request gets tried again.
   * If the error is an OperationalError, close the connection and
 re-raise the error (perhaps as a Retry error, though I can think
 of cases where this is a bad idea). On the next request, the
 connection is re-opened.
 
 Brian, Thanks for your response.
 
 I am confused - that means that if this is being done *currently* in
 Psycopgda, I should simply be able to repeat my client request and
 succeed in the operation. Or is ZPsycopgda something other than plain
 old psycopgda?

ZPsycopgDA is the zope 2 Product:) didn't realise it would be confused
with the zope 3 version psycopgda. Since I don't do much Zope3/RDB work
anymore, I havn't had a good look inside psycopgda.

 I am essentially stuck once I get this error. The stacktrace above
 shows that a retry was attempted but did not succeed. Sorry that I am
 missing your point, but I don't get it!

Yeah, but that's a retry within the sqlobject/sqlos layer, which
probably is just confusing cruft.

It's because sqlobject is designed to directly manage connections, but
has been shoehorned into using zope.rdb for connections which also manages
connections. Things get a little complex after that.

 
   * On other errors, let the error propagate.
   
   All this stuff should probably be done at the zope.rdb level.
 
 -- 
 Thanks,
 Roy Mathew.
 ___
 Zope3-users mailing list
 Zope3-users@zope.org
 http://mail.zope.org/mailman/listinfo/zope3-users
 

-- 
Brian Sutherland

Metropolis - it's the first movie with a robot. And she's a woman.
  And she's EVIL!!
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zc.buildout with Zope 2

2007-01-12 Thread Jim Fulton

Martin Aspeli wrote:
...
This may not be the right place for this question, but I'm wondering if 
anyone has experience or examples using zc.buildout with Zope 2.


I don't.  I'm using the immediate predecessor of zc.buildout
for zope Zope 2 projects though.

It seems a useful solution and one that will increase in importance, 
though so far I've not yet fully grasped what it does or how I use it in 
my brief encounters with it.


buildouts are about automating application assembly and installation.
They are somewhat like make in that regard, although they tend to work
at a higher level.  (In fact, our earlier buildouts were built using
make.)

A secondary benefit of zc.buildout is that it provides tools for
leveraging eggs in a much more controlled way that is allowed
by easy_install.  This will be helpful to Zope 2 in the future
especially as Zope 3 is split into eggs.

I'm wondering whether it is something I should pursue further in the 
context of Plone development (targeting primarily Zope 2.10 for now), 
but I don't know if it's even relevant to that platform or if this is 
unchartered territory.


Suggestions?


The predecessors of zc.buildout have been used for Zope 2 applications
for several years at ZC.

BTW, if you want to learn more about zc.buildout, then a good way would
be to attend the minitutorial I'll be giving at PyCon nect month:

  http://us.pycon.org/TX2007/TutorialsAM#AM7

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zc.buildout with Zope 2

2007-01-12 Thread Martin Aspeli



Jim Fulton wrote:
 
 This may not be the right place for this question, but I'm wondering if 
 anyone has experience or examples using zc.buildout with Zope 2.
 
 I don't.  I'm using the immediate predecessor of zc.buildout
 for zope Zope 2 projects though.
 

Is this internal only?



 
 It seems a useful solution and one that will increase in importance, 
 though so far I've not yet fully grasped what it does or how I use it in 
 my brief encounters with it.
 
 buildouts are about automating application assembly and installation.
 They are somewhat like make in that regard, although they tend to work
 at a higher level.  (In fact, our earlier buildouts were built using
 make.)
 
 A secondary benefit of zc.buildout is that it provides tools for
 leveraging eggs in a much more controlled way that is allowed
 by easy_install.  This will be helpful to Zope 2 in the future
 especially as Zope 3 is split into eggs.
 

Would it be helpful at the moment as well? Or are there too many rough edges
in terms of lacking egg-ification $SOFTWARE_HOMEs and $INSTANCE_HOMEs that
make it non-trivial to use this in Zope 2 projects?



 BTW, if you want to learn more about zc.buildout, then a good way would
 be to attend the minitutorial I'll be giving at PyCon nect month:
 
http://us.pycon.org/TX2007/TutorialsAM#AM7
 

Bit far for me to travel, but good luck :)

Martin

-- 
View this message in context: 
http://www.nabble.com/zc.buildout-with-Zope-2-tf2962956.html#a8297926
Sent from the Zope3 - users mailing list archive at Nabble.com.

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


Re: [Zope3-Users] Re: selling zope to a CTO

2007-01-12 Thread David Johnson
I think the sell is going to be hard if the CTO wants to conform to a  
world dominated by J2EE and .NEt projects.  One chooses Zope 3  
because they are more concerned about productivity, quality, and  
scalability.  There are trend followers and trend setters and I  
believe Zope is going to be a part of the future.  Zope 3 is the best  
technology I've seen since Linux.   At the same time, that there are  
not any presentations sort of speaks for itself.  From my experience,  
the Zope community is more interested in building quality technology  
than selling it.  Sun and Microsoft push their technologies because  
they make money.  Keep in mind that neither Sun, Microsoft, or Oracle  
use J2EE for their core applications.  That should speak volumes.   
The only compelling information I've seen revolves around Python  
being roughly 5 times faster to develop in than Java, from an ROI  
perspective.


We recently bought Microsoft .NET CRM solution only to can it in  
favor a Zope solution.  It was quicker to create our own CRM from  
scatch then to install the Microsoft product, and our product is more  
robust.


I would be interested in anything you come up with our see, and I  
would be glad to offer more on our experiences.


--
David


On Jan 11, 2007, at 5:31 PM, Roy Mathew wrote:



Philipp von Weitershausen wrote:

|Christophe Combelles wrote:
| Roy Mathew a écrit :
| Hi all,
|
| Does anyone know of a canned presentation or slides/papers  
that would

| help convince an openminded CTO/CIO that Zope (z3) makes business
| sense in a world dominated by huge J2EE and .NET projects.
|
|
| yes :) but I guess everybody knows it
| http://oodt.jpl.nasa.gov/better-web-app.mov
|
|That's about Zope 2/Plone (which still makes it a great  
presentation,

|but I don't think it's what Roy's looking for)


Indeed, I like that presentation very much, and it helped convince our
technology managers that Zope made sense; however, it is too
technically focused - I was hoping for a 15-20 minute sort of thing
with some punch, for the higher level execs.

--
Thanks,
Roy Mathew.___
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.buildout with Zope 2

2007-01-12 Thread Benji York

Martin Aspeli wrote:

Jim Fulton wrote:
This may not be the right place for this question, but I'm wondering if 
anyone has experience or examples using zc.buildout with Zope 2.

I don't.  I'm using the immediate predecessor of zc.buildout
for zope Zope 2 projects though.



Is this internal only?


No, we put a version in the sandbox 
(http://svn.zope.org/Sandbox/zc/buildout/trunk/) a little over a year 
ago, and I could update that version if you want, but I doubt you will; 
 it is woefully under-documented and not that easy to get into.


You'd probably be better off digging into zc.buildout.
--
Benji York
Senior Software Engineer
Zope Corporation
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Zope 3.3.1

2007-01-12 Thread Robert Hicks
I read on the wiki that 3.3.1 is Delayed for a while. Can anyone in 
the know define a while? I know the Python 2.4.4 fix is in there and I 
really would like to get it on my OSX box so I can play with it 
(evaluation for work).


Robert

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