S
Solara12mo ago
Iftah

btw working with Layout and routes was a

btw, working with Layout and routes was a pain in my case. One problem was it didn't use the Layout from the __init__ file. I ended up writing autorouting.DefaultLayout = MyLayout and that worked
3 Replies
MaartenBreddels
MaartenBreddels12mo ago
how did you use the Layout? and how did you run solara?
Iftah
Iftah12mo ago
running with a path to the file solara run ui/main.py next to the main.py there is __init__.py I tried putting a Layout component there as the document suggest, but it wasn't used at all.
I tried looking into the code to identify the root reason, but it wasn't clear to me. Instead I found the workaround to overwrite the default layout, so that was what I did at the end, and this works
MaartenBreddels
MaartenBreddels12mo ago
ah, that means you are just running that file, it is not looking at any other file only if you run the directory (like ui) or the pacakge somepackage.ui it will take a look at init.py i'll check the docs if there is something that is unclear you could have put a Layout component in main though