[Zope] E-Market + SQL

steve steve@spvi.com
Sat, 23 Jun 2001 06:28:00 -0500


Hi George,

	Yes... I'm in the middle of a fairly major re-factoring of EMarket, but
the answer is yes. I can't explain all the details in a short email, so
for more ZPatterns info check:

http://www.zope.org/Members/pje/ZPatterns

In short, you create ZSQL Methods to retrieve the attributes needed to
display the objects you want to store in your SQL database. Then in the
Racks of those objects set the Storage tab to "load by accessing
attribute XXXX" where XXXX is the name of an attribute (like
market_item_id) that is not defined in the propertysheets of the ZClass
representing that object. Then, in the 'Plugins' tab of the Rack, create
a SkinScript like:

WITH YourZSQLMethod(market_item_id=self.id) COMPUTE market_item_id,
name, description, available

assuming that your returns attributes by those names. You can learn more
about SkinScript specifically at:

http://www.zope.org/Members/pje/Wikis/ZPatterns/SkinScriptSyntax

You might also find my DumbZPatternsExample helpful, though it doesn't
(yet) include database integration.

http://www.zope.org/Members/sspickle/DumbZPatternsExample

-steve

George Osvald wrote:
> 
> My question is simple:
> 
> Is it possible to use E-Market with my SQL database?
> If so how do I do that?
> 
> Regards,
> 
> George Osvald
> OK STUDIO
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )