Google indexing with route decorator

You don’t need to do anything in the form to have it respond to the URL:

Server Code:

@anvil.server.route("/dictionary")
def dictionary():
  return anvil.server.FormResponse("DictionaryForm")

and then you can add any necessary args or kwargs to the Form response that your form needs.

The only thing I do differently in my server/forms with the new routing is I tend to do the calls to the database within the router function itself rather than anvil.server.call in the form, but that is up to you.

Then you can just test your router with a debug environment link. See my post where I figured this out with help from Meredydd:

See here for the documentatiion:

3 Likes