Custom Field Type ignores `addon_label`
See original GitHub issueConsider the example below, I would expect the label to show the text “hi” but instead Lektor only prints “0”. If I replace the type “test” with “integer” it works as expected.
Model:
[fields.why]
type = test
addon_label = hi
Python custom lektor.types.base.Type
:
class TestType(Type):
widget = 'integer'
def value_from_raw(self, raw: 'RawValue') -> int:
return int(raw.value or '0')
[...]
self.env.add_type(TestType)
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Python: TypeError: required field "type_ignores" missing from ...
I think you should try these advices Basic Flask app not running (TypeError: required field "type_ignores" missing from Module).
Read more >Make custom field look like the Duration field - ServiceNow
Solved: I am wondering if there is a way to make a custom field look like the OOB Duration field. I have a...
Read more >Why is a custom field not appearing in forms after changing its ...
I found that if a Select field has options_per_line set in civicrm_custom_field , then it fails to render, as described. A workaround is...
Read more >Issue Collector: Can we add a field "Label" and cu...
I have tried the above option but unable to add a "Label" or Custom field of type "Label" to the Issue collector form....
Read more >Defining Custom Fields - AddSearch Documentation
A custom field meta tag with unrecognized data type value will be ignored. Search results can be filtered against custom fields in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
And also here https://www.getlektor.com/docs/api/db/type/, where the “wrong” type is used.
I’ve just opened lektor/lektor-website#357 to track this.
Closing this ticket…