Replies: 3 comments
-
You should extend sqla.fields.FileField, not the BaseField. Note: It's always best to extend the existing fields instead of overriding the BaseField. When you extend the BaseField you should follow all the steps described in the documentation Edit: |
Beta Was this translation helpful? Give feedback.
-
Alright, that worked, just had to I'd like to point out that it is not very obvious from the documentation! The docs say that there are tons of fields, but we can create our own, not really saying that by extending an existing field, but only by extending the Also, there is Anyway, the issue has been solved, this could be a discussion if you want to! Thanks! :) |
Beta Was this translation helpful? Give feedback.
-
Sometimes I import
Documentation requires some improvements, you're right about that.
Some fields are dedicated or further configured to the related contrib like |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
I am creating a custom field that renders an
<audio>
in the list view, I followed the instructions in the advanced guide. However, in the frontend, it seems that when mapping the urls, the script is passing the local storage path, instead of the url/cdn of the file. The console in the browser shows a message like this:Here are my custom classes:
And
audio_render.js
:To Reproduce
This issue is not just with the custom renderer. You can reproduce by passing any existing function key to the custom field and not use custom JS at all:
And still triggers the exception:
Environment (please complete the following information):
Edit
Bumped to
starlette-admin==0.12.2
and the bug persists.Beta Was this translation helpful? Give feedback.
All reactions