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

dmAlert component 'attributes' option gives a ValueError #59

Open
katstevens opened this issue Jan 31, 2020 · 1 comment
Open

dmAlert component 'attributes' option gives a ValueError #59

katstevens opened this issue Jan 31, 2020 · 1 comment

Comments

@katstevens
Copy link
Contributor

Using the attributes option in a template gives a Jinja error:

{{ dmAlert({
    "type": "error",
    "classes": "my-custom-class",
    "text": "I like writing error examples",
    "attributes": {"my-attribute": "my-value"}
  }) }}

Traceback:

{% for key, value in params.attributes %} {{ key }}="{{ value }}"{% endfor %}
ValueError: too many values to unpack (expected 2)
@katstevens
Copy link
Contributor Author

Changing the attributes value as follows gave the expected result:

"attributes": [("my-attribute", "my-value")]

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

No branches or pull requests

1 participant