Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bypass title overwrite #183

Closed
wants to merge 2 commits into from
Closed

Conversation

gjo
Copy link
Contributor

@gjo gjo commented Aug 21, 2014

On SchemaNode's initialization, "title" that defined at class attribute is overwrited by auto-generate d one from "name" parameter.

example:

class SampleNode(colander.SchemaNode):
    schema_type = String
    title = 'Some Title'

class SampleSchema(colander.Schema):
    node = SampleNode()

schema = SampleSchema()
print schema.children[0].title

I want to use Some Title but shows Node.

@tseaver
Copy link
Member

tseaver commented Aug 21, 2014

Thanks for the patch! The behavior you want is documented to work.

We need to add a test which fails without your patch, but passes with it (probably in the 'TestDeclarative' testcase class).

@gjo gjo mentioned this pull request Aug 21, 2014
@gjo
Copy link
Contributor Author

gjo commented Aug 21, 2014

Sorry, I was mistake author signatures.
New commits are available #185.

@gjo gjo closed this Aug 21, 2014
@gjo gjo deleted the bypass_title_overwrite branch August 21, 2014 16:37
tisdall added a commit to tisdall/colander that referenced this pull request Jul 10, 2015
PR Pylons#183 and Pylons#185 tried to fix this but missed one aspect when
a schemanode is added as a child via class definitions.
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.

3 participants