We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Thanks to this code:
datasette-enrichments/datasette_enrichments/views.py
Lines 172 to 173 in 33d0e4b
The config dictionary ends up full of things like {"template": ["this is the template"]} which means I have to write code like this:
config
{"template": ["this is the template"]}
datasette-enrichments/example-enrichments/jinja_sandbox.py
Lines 61 to 62 in 33d0e4b
I did this because I wanted to support the case of a multi-select style interface for selecting a list of items here:
datasette-enrichments/example-enrichments/uppercase.py
Lines 23 to 37 in 33d0e4b
But there should be a better way of doing this - I want config to mostly be single valued keys, with lists only for the keys that need it.
The text was updated successfully, but these errors were encountered:
Figured out the right pattern for this - it needs this change:
- config = post_vars._data.copy() - config.pop("csrftoken", None) + config = {field.name: field.data for field in form}
Plus this change to that multi column selecting form:
-class MultiCheckboxField(SelectField): +class MultiCheckboxField(SelectMultipleField): widget = ListWidget(prefix_label=False) option_widget = CheckboxInput()
Sorry, something went wrong.
211c2c6
Release 0.1a4
d9aa127
config now has {"values": "like this"} instead of {"values": ["like this"]}, refs #18
Switch to new config format
0e901f1
Refs datasette/datasette-enrichments#18
No branches or pull requests
Thanks to this code:
datasette-enrichments/datasette_enrichments/views.py
Lines 172 to 173 in 33d0e4b
The
config
dictionary ends up full of things like{"template": ["this is the template"]}
which means I have to write code like this:datasette-enrichments/example-enrichments/jinja_sandbox.py
Lines 61 to 62 in 33d0e4b
I did this because I wanted to support the case of a multi-select style interface for selecting a list of items here:
datasette-enrichments/example-enrichments/uppercase.py
Lines 23 to 37 in 33d0e4b
But there should be a better way of doing this - I want config to mostly be single valued keys, with lists only for the keys that need it.
The text was updated successfully, but these errors were encountered: