This is going to be a paid tool. But let me know if you’re interested in trying it out and I’ll help you get set up. Just go to https://redwoodjsadmin.com and sign up for the newsletter, reply to this thread or send me a DM
You need to manually regenerate. I thought about having a watcher on the schema file, but it does take a little while to generate (just like RW’s scaffold generator), so I decided it’s better to manually trigger it for now.
Maybe in the future I can run a diff on the schema file and only regenerate the parts that changed and maybe then it’ll be fast enough to do it on the fly
One of my users wanted to be able to change how dates are formatted, so I’ve added that now.
Here’s a screenshot of where I’ve changed the default relative dates to a more common 2023-10-14 21:53 style
The /// @radmin-date tripple slash comment is new. As an “argument” to that comment you can pass either relative or a formatting string like yyyy-MM-dd HH:mm. You can also use single or double quotes if you want "relative", 'yyyy-MM-dd HH:mm'.
I’m using date-fns to format the date, so all their standard formatting options are available: https://date-fns.org/v2.30.0/docs/format.
Here’s one column with custom date formatting, and one column that uses the default relative setting
And if this doesn’t cover your needs you can define a custom component or formatting function to use instead when displaying your dates/times.
Would love to try this out @Tobbe – running into the constantly regenerating scaffolding issue and this is what I’m after. Seems like a Django admin of sorts!
I’d also like to try this out- hoping to get a more complete panel than what RW has out of the box. For my current application, a couple of features I would want include custom querysets for relations (to limit the options in the to relevant items) and some custom UI & actions based on some GIS concepts (eg. Point and click on a map to create new entities). Very curious how these requirements will mesh with your implementation.