Creating SQL content types with collective.tin

collective.tin is a library for creating RDBMS backed content types on top of SQLAlchemy. collective.lead is used for transaction integration. collective.mercury supports the autogeneration of interfaces, model and db files by introspecting the RDBMS schema. This approach does not require zodb stubs. Versioning is optional. Workflow status and history (if required) are stored in the database. (This tutorial is very much a work in progress, but I figured it may be useful to make it public now)

  1. Overview Over this tutorial we will develop a timesheet system to demonstrate the various features of collective.tin.
  2. Creating the database (1) Database creation and a users table
  3. Creating the content types (1) Building a product and using collective.mercury

All content on one page (useful for printing, presentation mode etc.)

 

help me

Posted by sanhtq at May 22, 2008 09:50 AM
hi all,
i have a proplem when run products this, the brower say:
Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module zope.formlib.form, line 769, in __call__
  Module Products.Five.formlib.formbase, line 55, in update
  Module zope.formlib.form, line 750, in update
  Module zope.formlib.form, line 594, in success
  Module zope.formlib.form, line 861, in handle_add
  Module zope.formlib.form, line 868, in createAndAdd
  Module zope.formlib.form, line 877, in add
  Module plone.app.content.browser.adding, line 13, in add
  Module Products.Five.browser.adding, line 76, in add
  Module OFS.ObjectManager, line 326, in _setObject
  Module zope.event, line 23, in notify
  Module zope.component.event, line 26, in dispatch
  Module zope.component._api, line 130, in subscribers
  Module zope.component.registry, line 290, in subscribers
  Module zope.interface.adapter, line 535, in subscribers
  Module zope.component.event, line 33, in objectEventNotify
  Module zope.component._api, line 130, in subscribers
  Module zope.component.registry, line 290, in subscribers
  Module zope.interface.adapter, line 535, in subscribers
  Module OFS.subscribers, line 107, in dispatchObjectWillBeMovedEvent
  Module zope.app.container.contained, line 181, in dispatchToSublocations
  Module OFS.subscribers, line 87, in sublocations
  Module collective.tin.objectmanager, line 88, in objectValues
  Module zope.app.component.hooks, line 96, in adapter_hook
  Module collective.tin.container, line 143, in __init__
TypeError: ('Could not adapt', <UserFolder at /plone/sanhtq>, <InterfaceClass collective.lead.interfaces.IDatabase>)

i don't know fix it!

please help me!!!

Check that configure.zcml is being loaded

Posted by Laurence Rowe at Jun 11, 2008 08:21 PM
Install the Timesheets product from subversion into your Products folder:

svn co https://svn.plone.org/[…]/Timesheets

It sounds like configure.zcml is not being picked up.

Include collective.lead

Posted by Asbjorn Andersen at Jun 26, 2008 06:16 AM
Did you remeber to add:

<include package="collective.lead" />

to your configure.zcml ?

Can't add because access is denied

Posted by Robert (Jamie) Munro at Sep 23, 2008 03:57 PM
When I tried this, adapting the names to my own product, I got the following error, even when logged in as a site manager:

Unauthorized: The object is marked as private. Access to 'getActionObject' of (FactoryTypeInformation at /plone/portal_types/KnowhowPersonFolder) denied.

Can't add because access is denied

Posted by Dorneles Tremea at Feb 25, 2009 10:57 PM
I had a problem similar to this and fixed it by making the 'edit' alias point to the right place, 'base_edit' on my case (or '@@edit' if you're following this tutorial).