Skip to content

value of BooleanField is cast to string #29

Description

@wengole

https://github.com/funkybob/django-sniplates/blob/master/sniplates/templatetags/sniplates.py#L350

This line here casts the value of a BooleanField to a string. This means if you try to do something like

<input type="checkbox"  {% if value %}checked{% endif %}>

it won't work as value will always evaluate to True.

Am I missing something here, or is this a bug?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions