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

FormattedString either doesn't work or is mis-documented. #348

Closed
acaird opened this Issue Dec 2, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@acaird

acaird commented Dec 2, 2015

I don't think FormattedString is working. Either that or the
example in the documentation is wrong:

import marshmallow as m
class UserSchema(m.Schema):
    name = m.fields.String()
    greeting = m.fields.FormattedString('Hello {name}')
user={'name':'Andy'}
ser = UserSchema()
print ser.dump(user)

results in:

MarshalResult(data={'name': u'Andy'}, errors={})

and I expect it to have be something like:

MarshalResult(data={'name': u'Andy', 'greeting':u'Hello Andy'}, errors={})

@sloria sloria added the bug label Dec 4, 2015

@sloria sloria closed this in 6a6eca2 Dec 4, 2015

@sloria

This comment has been minimized.

Member

sloria commented Dec 4, 2015

Thanks for reporting. This has now been fixed on the dev branch. I'm planning on releasing 2.4.0 this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment