Skip to content

Conversation

arnaud-morvan
Copy link

As we want relationship's nodes ceated with the same type as parent node.

Here is an example of subclassing:

import colander
from colanderalchemy import SQLAlchemySchemaNode


@colander.deferred
def deferred_request(node, kw):
    return kw.get('request')


@colander.deferred
def deferred_dbsession(node, kw):
    return kw.get('dbsession')


class GeoFormSchemaNode(SQLAlchemySchemaNode):

    def __init__(self, *args, **kw):
        super().__init__(*args, **kw)
        self.request = deferred_request
        self.dbsession = deferred_dbsession

As we want relationship's nodes ceated with the same type as parent node.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant