Skip to content

TemplateSyntaxError: Could not parse the remainder #153

@matiaschn

Description

@matiaschn

I'm trying to pass x-bind attribute from alpinejs using ternary operator but I get TemplateSyntaxError:

{% render_field form.password x-bind::type="show ? 'text' : 'password'" %}

Error:

django.template.exceptions.TemplateSyntaxError: Could not parse the remainder: '"show ? '' from '"show ? ''

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions