Brian
Brian
SSolara
Created by Brian on 11/20/2024 in #questions-issues
Localization of datetime
Hi there! I am trying to figure out how to localize a datetime object in my Solara application. I want to show a banner like:
solara.Success(f"Saved at {some_datetime}.")
solara.Success(f"Saved at {some_datetime}.")
Where some_datetime would be a datetime.datetime object that I would retrieve from a database. The datetime value would be saved in UTC, but I'd like to format it (and shift the timezone) to the user's locale. I know I can get the user's language preference from solara.lab.headers.value["accept-language"] but this doesn't give me the timezone info. I think this should be possible with JavaScript (with something like toLocaleDateString()), but I don't know how to run JavaScript in Solara. (I was poking around with solara.HTML, but coudn't quite figure it out and don't know how to insert that into the solara.Success message.) Any help or suggestions would be appreciated!
4 replies
SSolara
Created by Brian on 8/5/2024 in #questions-issues
Creating a form when I don't know how many user inputs there will be at development time
9 replies
SSolara
Created by Brian on 4/18/2024 in #questions-issues
PermissionError for nbextensions on startup with v1.29+
hi all, i've been trying out solara for the past month or so. i was using v1.28 with no issues. today i tried upgrading and i've been having trouble getting things running on any higher version. i know that there were significant changes to the packaging starting with v1.31, but at this point i can't even upgrade to v1.29. i'm getting a PermissionError on startup:
PermissionError: [Errno 13] Permission denied: '/usr/local/share/jupyter/nbextensions/jupyter-vuetify/extension.js'
PermissionError: [Errno 13] Permission denied: '/usr/local/share/jupyter/nbextensions/jupyter-vuetify/extension.js'
i'm creating a multi-page app, and i'm pip-installing in editable mode (since i'm actively developing) from a pyproject.toml file. i have an environment with solara v1.28.0 and one with v1.29.1. it works with v1.28, but i get the error with v1.29 (and v1.30). any help would be appreciated!
9 replies