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

appstruct values of None render as "None" #245

Open
ghost opened this issue Oct 16, 2014 · 5 comments
Open

appstruct values of None render as "None" #245

ghost opened this issue Oct 16, 2014 · 5 comments

Comments

@ghost
Copy link

ghost commented Oct 16, 2014

Would it be better to render values as "" when given an appstruct value of None, as opposed to "None"?

appstruct={
    'some_value': None,
}
<input value=""

as opposed to:

<input value="None"
@tisdall
Copy link
Contributor

tisdall commented Mar 23, 2015

This has to do with colander. For some types it blindly translates the values it's given into a string value (str(None) == "None"). You need to change your code to either give an empty string or a colander.null in the appstruct.

See: Pylons/colander@513d860

@delijati
Copy link
Contributor

delijati commented Apr 1, 2016

update Pylons/colander#258

@miohtama
Copy link
Contributor

miohtama commented Dec 6, 2016

@delijati Can we get your name on the contributors.txt and this move forward? :) Thanks!

@delijati
Copy link
Contributor

delijati commented Dec 6, 2016

@miohtama sure

@stevepiercy
Copy link
Member

See Pylons/colander#276 for path forward.

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

No branches or pull requests

4 participants