After the announcement for py.space, I noticed that the @anvil.server.route was also showing up in Anvil. In fact, when I added that, this also started appearing on the bottom of the screen
Thatās great! Didnāt know I had to switch to Python 3.10. I did that and now it works!
Since I use browser routing on my Anvil apps, this will be really helpful for me (since all my previous links had _/api in them making them really long.
I use the routing module from Anvil Extras in all my apps, so I can bookmark every page, I can send notification emails with links to a specific app state (page), and I can cache pages already visited (when it makes sense).
I donāt know if the native @anvil.server.route coming up soon will be as refined. Perhaps it will be targeting the SEO problem only and I will keep using the good old Anvil Extras, or perhaps it will include caching and even more options, and itās time for the Anvil Extras routing module to retire. We will see the details when it comes out.
Most of my apps are for internal use, so I donāt really miss a real routing, but in the past I have said āno, I canāt do thatā when I was asked to do anything searchable from Google.
For example we use OpenCart for our ecommerce site, which has limitations with the inventory management and the shipment cost calculation. The first idea was to remake the whole ecommerce site in Anvil, but we couldnāt, because Google wouldnāt see it. So I created an OpenCart extension in php, with enough php to call some Anvil endpoints, and created the shipment cost calculator, inventory management and shipment configurator apps in Anvil.
Actually, I will be releasing a dependency for Browser Routing soon (I have already built an internal dependency for my apps) which lessens the SEO problem. Seeing this feature get implemented makes things even better.
If this works on the client side forms itāll certainly be cleaner than hash based routing! And having the SEO benefit - Iāll be able to incorporate landing pages for my apps
Longer answer: Yes, it is absolutely our goal to make proper multi-URL apps with smooth, easy navigation and client side routing; this is a (big, but early) step along that road! (We also recognise that routing is never 100% one-size-fits-all, so we intend to expose the low-level building blocks to people who want to build their own.)
Just found this page as I too am getting the following error :
āAttributeError: module āanvil.serverā has no attribute ārouteāā. It appears the project is already on Python 3.10 - does anyone have any ideas why this may be occuring please?
Could I be missing any imports here, currently have
import anvil.server
This post is about a feature of py.space, nothing to do with an error.
If you are looking for help for an error, please create a new post with the subject that describes your question, rather than adding an answer to an old thread.