Re: [Zope3-Users] newbie database adapter questions
> It seems like most of the examples only explain how to create forms by > using interfaces and objects. I've noticed this too. > I don't want a user within zope to create a form in the ZODB, I just > want to them to open up a location to url and see results from my > database. Currently I'm doing something like that. It it supposed to work this way: 1. You enter url like http://localhost:8080/manage_customer_form?in.customer_id=23 2. Form is displayed that contains data from underlying RDBMS 3. If you want another customer then you need to change in.customer_id parameter value There also other possiblities, eg. "Container/Folder that contains object from a database. The container is persistent. The container however loads the content from an SQL database" This is from David Johnson post to this list at: 2007.01.26 in thread: "Access to request in content object and object path in doctests". David declared that he may share his code but so far I don't have it. I'll try to remind him. My implementation is like: I've created content object that has two functions: 1. to get data from RDBMS (but this is not necessarily RDBMS) 2. to store data to RDBMS Typically these functions will do 'select ... from' and 'update ...' Then I've attached formlib view based on FormBase to this content object. My setUpWidgets function gets input parameters from request, passes them to get_data function of content object to receive data from RDBMS and then uses setUpDataWidgets to set up widgets. Save action causes to save_data function to be called. There are some drawbacks, eg. you need to remember input parameters somewhere etc. My code is not ready yet but should be soon. I'll try to publish it somwhere if somebody is interested. -- Maciej Wisniowski ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] newbie database adapter questions
Hi. You can use z3c.zalchemy or sqlos(sqlobject wrapper) for OR mapping. zalchemy http://svn.zope.org/z3c.zalchemy/trunk/src/z3c/zalchemy/ sqlos http://codespeak.net/z3/sqlos/ Thanks. -- Yusei TAHARA ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] newbie database adapter questions
Hi, I just started looking into Zope3 and I am unsure on how to create forms that interact with my database. I have the psycopg adapter installed and working. I just want to create a simple html form that will load some values into a couple text fields from my postgreSQL database and display the results. It seems like most of the examples only explain how to create forms by using interfaces and objects. I don't want a user within zope to create a form in the ZODB, I just want to them to open up a location to url and see results from my database. Can somebody point me in the correct direction for what I am looking for. Any help would be much appreciated, thanks. Tyson -- Tyson Wenger Computer Programmer V&L Tool,Inc. 2021 MacArthur Rd. Waukesha, WI 53188 (262)547-1226 x178 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users