Jocelin Hounon

Results 58 comments of Jocelin Hounon

You can create a custom field that inherit UrlField and customize the list & detail rendering. feel free to submit a PR

By default, starlette-admin will search in your *templates* directory. You can customize it by providing a custom *templates_dir* https://jowilf.github.io/starlette-admin/tutorial/configurations/admin/

Do we really need this? The current .gitignore seems to be sufficient for this project

Have you considered checking the `request.state.action`? For example: ```py async def validate(self, request: Request, data: Dict[str, Any]) -> None: if request.state.action == RequestAction.CREATE: ... else: # RequestAction.EDIT ... ```

Do you mean custom `file_id` in the storage? because you can customize the filename with ```py file = File(content="Hello World", filename="hello.txt", content_type="text/plain") ``` The`sqlalchemy_file.file.File.store_content` is used by processors to attach...

You can simply override the detail template for this specific field. You can find more information on https://jowilf.github.io/starlette-admin/advanced/custom-field/?h=custom#detail-page Also, I noticed that you are currently using an outdated version of...

> ```python > class ClientView(MyModelView): > fields = [ > NotesField("notes"), > Client.notes, > ] > ``` The field names must be unique per view

> I see https://github.com/jowilf/starlette-admin/blob/main/starlette_admin/templates/detail.html but copying/pasting the entire file just to customize a "footer" seems wrong. You can override the content block to add a footer ```jinja2 {% extends "detail.html"...

I think we need to [check the validity](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/checkValidity) of the form before submitting.

You can set the option `processing` to True in your datatables_options ```python class MyModelView(ModelView): datatables_options = { "processing": True } ``` But, I believe this should be enabled by default.