Re: [Zope3-Users] Generate edit form from user setting

2006-08-22 Thread Florian Lindner
Am Donnerstag, 17. August 2006 23:04 schrieb Fred Drake:
 On 8/17/06, Florian Lindner [EMAIL PROTECTED] wrote:
  I have a zope.app.preference.preference.PreferenceGroup based on an
  IUserSettings interface for which I want to generate an edit form.
  I've tried to do it with a class based on EditForm but that does not
  worked for me since the EditFrom changes the self.context object. If I
  simply replace self.context by the object I got from UserPreferences it
  complains about PreferenceGroup being not adaptable to IUserSettings (and
  it's right about that).

 Sounds like you want to create an adapter.  The adapter is what's used
 for getting/setting values.

I also thought about that. But if I write an adapter from PreferenceGroup to 
IUserSettings to all that the adapter would do is to assign values the values 
from the PreferenceGroup to IUserSettings. Ok it's more generic but at the 
end the same like assigned the values to the request itself.

Is it okay to change self.context in the __init__ method of the view class 
with a PreferenceGroup object? (I just didn't know it it's not confusing the 
something in the ComponentArchitecture...)


  Of course I need to initialize the from with the values from the the
  PreferenceGroup object. Is there a better way than modifying the request
  like request.form['form.max_size'] for each field? I couldn't find one in
  the documentation but I'm almost sure there is a more elegant solution
  (since it's Zope!).

 Did you look at the get_rendered argument to
 zope.formlib.form.FormField?  Though I suspect the adapter I suggested
 above would do the trick.

Mmmhh, that's also one call for each field. I think I'll try it with the 
adapter.

Regards,

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


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

2006-08-22 Thread Stephan Richter
On Tuesday 22 August 2006 09:27, David Pratt wrote:
 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).

Note that I am -1 for including zc.table at this stage. I feel that it needs 
some more thought and real-life usage. Note: I use zc.table *a lot*!

 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.

I personally do not care about the ZMI at all. For the customer I never base 
any code on those skins, since they are insanely complex. Of course, Boston 
is mainly so complex, because of all the slots that are required from 
Rotterdam. :-(

As for batching, it would be nice to have a utility, but I would like to see 
some out-of-core implementation first and see it evolve a couple 
iterations.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
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 Martijn Faassen

Benji York wrote:

Stephan Richter wrote:
Note that I am -1 for including zc.table at this stage. I feel that it 
needs some more thought and real-life usage. Note: I use zc.table *a 
lot*!


I'm +1 on your -1.  It's a bit early yet.  Plus the eggification of 3.4 
will hopefully reduce the need to put things in the core.


I'll note here that I've eggified zc.table before and it's in the Zope 
eggs directory here:


http://download.zope.org/distribution/

If you don't want to use it in the Zope 3 core (which I understand the 
original poster wants to do, so this won't help him), but just want to 
use it in your project, having an egg makes it easier.


Regards,

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


[Zope3-Users] looking for a tutorial for installing zope3 and psycopgda

2006-08-22 Thread bussiere maillist

it's been more tnah  two month that i'am trying to install zope3 and
make psycopgda working with it.

So if someone have a good tutorial explaining how to do that and if it
could work i'll be glad.

And i'am ready to pay about 40$ (by paypal if needed) if it works, i
really need it and i'am desesperate to find a solution.


i've already tried this tutorials here
http://dfwpython.org/Zope3Notes/PgConnectorInstall
with the psycopg2 version but it says to  me :

ZopeXMLConfigurationError: File
/Zope3/etc/package-includes/psycopgda-configure.zcml, line 1.0-1.31
   ZopeXMLConfigurationError: File
/Zope3/lib/python/psycopgda/configure.zcml, line 6.2
   ImportError: No module named psycopg


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


[Zope3-Users] Re: looking for a tutorial for installing zope3 and psycopgda

2006-08-22 Thread Philipp von Weitershausen
bussiere maillist wrote:
 it's been more tnah  two month that i'am trying to install zope3 and
 make psycopgda working with it.
 
 So if someone have a good tutorial explaining how to do that and if it
 could work i'll be glad.
 
 And i'am ready to pay about 40$ (by paypal if needed) if it works, i
 really need it and i'am desesperate to find a solution.
 
 
 i've already tried this tutorials here
 http://dfwpython.org/Zope3Notes/PgConnectorInstall
 with the psycopg2 version but it says to  me :
 
 ZopeXMLConfigurationError: File
 /Zope3/etc/package-includes/psycopgda-configure.zcml, line 1.0-1.31
ZopeXMLConfigurationError: File
 /Zope3/lib/python/psycopgda/configure.zcml, line 6.2
ImportError: No module named psycopg

You obvioulsy need to install psycopg (I'm guessting version 1.x). It's
a standard Python package that lets Python software interface with the
PostgreSQL database. psycopgda needs it.

Your Linux distribution most probably has psycopg. If you're on Mac OS
X, get darwinports, fink or something similar. They should all have it
(I know darwinports does).

Philipp

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


Re: [Zope3-Users] Re: looking for a tutorial for installing zope3 and psycopgda

2006-08-22 Thread bussiere maillist

yes but when i try to install psycop 1 it says to me :
checking PostgreSQL version... configure: error: missing PostgreSQL headers
when i make a ./configure

it's driving me crazy that's why i'am looking for a good tutorial for
making it (installing zope3 and psycop)

regards
i'am desesperate
Bussiere

On 8/22/06, Philipp von Weitershausen [EMAIL PROTECTED] wrote:

bussiere maillist wrote:
 it's been more tnah  two month that i'am trying to install zope3 and
 make psycopgda working with it.

 So if someone have a good tutorial explaining how to do that and if it
 could work i'll be glad.

 And i'am ready to pay about 40$ (by paypal if needed) if it works, i
 really need it and i'am desesperate to find a solution.


 i've already tried this tutorials here
 http://dfwpython.org/Zope3Notes/PgConnectorInstall
 with the psycopg2 version but it says to  me :

 ZopeXMLConfigurationError: File
 /Zope3/etc/package-includes/psycopgda-configure.zcml, line 1.0-1.31
ZopeXMLConfigurationError: File
 /Zope3/lib/python/psycopgda/configure.zcml, line 6.2
ImportError: No module named psycopg

You obvioulsy need to install psycopg (I'm guessting version 1.x). It's
a standard Python package that lets Python software interface with the
PostgreSQL database. psycopgda needs it.

Your Linux distribution most probably has psycopg. If you're on Mac OS
X, get darwinports, fink or something similar. They should all have it
(I know darwinports does).

Philipp

___
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: looking for a tutorial for installing zope3 and psycopgda

2006-08-22 Thread JPenny
Bussiere:

It would help a lot if you would specify exactly which operating system 
you are using, and
if linux, which distribution.

For example, in Debian linux (testing or unstable), you would need to 
install the appropriate
postgresql-server-dev-7.4, postgresql-server-dev-8.0, or 
postgresql-server-dev-8.1 depending
on which postgresql was being used as the back-end.

Note:  at one time Red Hat and its derivatives had another problem, they 
put the inlcude files
in an odd place. 
See http://initd.org/tracker/psycopg/wiki/PsycopgOne
See also http://initd.org/tracker/psycopg/wiki/PsycopgTwoInstall

You may have a similar problem with mxdatetime headers.

jim

[EMAIL PROTECTED] wrote on 
08/22/2006 06:37:46 PM:

 yes but when i try to install psycop 1 it says to me :
 checking PostgreSQL version... configure: error: missing PostgreSQL 
headers
 when i make a ./configure
 
 it's driving me crazy that's why i'am looking for a good tutorial for
 making it (installing zope3 and psycop)
 
 regards
 i'am desesperate
 Bussiere
 
 On 8/22/06, Philipp von Weitershausen [EMAIL PROTECTED] wrote:
  bussiere maillist wrote:
   it's been more tnah  two month that i'am trying to install zope3 and
   make psycopgda working with it.
  
   So if someone have a good tutorial explaining how to do that and if 
it
   could work i'll be glad.
  
   And i'am ready to pay about 40$ (by paypal if needed) if it works, i
   really need it and i'am desesperate to find a solution.
  
  
   i've already tried this tutorials here
   http://dfwpython.org/Zope3Notes/PgConnectorInstall
   with the psycopg2 version but it says to  me :
  
   ZopeXMLConfigurationError: File
   /Zope3/etc/package-includes/psycopgda-configure.zcml, line 
1.0-1.31
  ZopeXMLConfigurationError: File
   /Zope3/lib/python/psycopgda/configure.zcml, line 6.2
  ImportError: No module named psycopg
 
  You obvioulsy need to install psycopg (I'm guessting version 1.x). 
It's
  a standard Python package that lets Python software interface with the
  PostgreSQL database. psycopgda needs it.
 
  Your Linux distribution most probably has psycopg. If you're on Mac OS
  X, get darwinports, fink or something similar. They should all have it
  (I know darwinports does).
 
  Philipp
 
  ___
  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