Anvil Documentation Suggestions [ON-GOING]

Great explanation, thanks @stucork

1 Like

It would be great that you could make the message here clearer since there are a lot of confusion:
https://anvil.works/docs/deployment/choosing-urls#using-your-own-domain-name

1 Like

I see a minor bug in the docs: The page for Custom Components has a link in the first paragraph to Custom HTML Forms, however this link incorrectly goes to the doc page for Custom HTML Templates.

I was going round in circles for a little while trying to understand why the docs were telling me everything except how to actually edit the HTML!

This is really more of a bug report, but I don’t think I can post it directly into the bug report thread. Is there a way to flag posts as things we want considered as bug reports?

@hannah Can I bump this as a request for updating the Stripe docs please? I’ve gone through the docs and several forum searches but this part of the Docs is still unhelpful, for two reasons:

https://anvil.works/docs/integrations/stripe/payments-and-subscriptions#charging-on-the-server

  1. Unlike stripe.checkout.charge() which returns a dict with useful things like id and url, it isn’t at all obvious how to get those same things from the (presumably preferred and more secure) stripe_customer.charge
  2. In the example server function def charge_user(token, email): the amount (999) is hard coded into the function. How can we ensure/enforce that the amount (and currency) entered as part of the client function token, info = stripe.checkout.get_token(amount=999, currency="USD") are the same as actually billed by the server function?!

Also, unless you’re using Stripe for pure ‘donations’ (i.e. no app functionality is payment-locked), it’s unclear to me why you would EVER use the client-side approach given in QUICKSTART - anyone could simply edit out the Stripe payment code and continue unhindered. Perhaps best to start with the client-server solution up front and make this the strongly recommended approach?

Final request for the updated documentation - stripe.checkout.is_live_mode() is given as a way of checking whether you’re in Live or Test mode programmatically but I think it only works client-side. Surely there’s a simple way of accessing the same directly from server-side code?

Best wishes,
Peter

1 Like

Noting that this is still an issue; including a screen grab of another location (“View full documentation” button):

Welcome @cdavis!

It’s not clear to me from your post what issue this is referring to. Can you please reference it so it’s clear?

1 Like

My apologies @david.wylie – I thought I was replying in thread. I’ve added a link to my post; I was referring to the first post regarding the link to authentication docs.

FYI: omission. `anvil.server.connect’ does not appear on page https://anvil.works/docs/api/anvil.server

I don’t think the unittest module is fully implemented in client-side code, and that seems important to mention here: https://anvil.works/docs/client/python#unit-tests-for-client-side-code The addition of a parenthetical “(partially)” may be sufficient.

“stopped” is misspelled as “stoped” at the end of this entry: https://anvil.works/docs/client/components/basic#youtube-video

2 Likes

I’m not able to find app_tables in the API Reference: Anvil Docs | anvil.tables

My reason for searching for it was trying to understand the details of how lazy search works: how it decides how many results to send at once.

1 Like

I think True and False should be added to the list of valid server function arguments and return values: Anvil Docs | Server Code

1 Like

In the page that talks about setting up development and production versions of apps: Anvil Docs | Apps in development and production

The General Workflow section implies that you don’t need to force the push after the first time. It would be worth adding a section that talks about when you migrate data table schema changes to the production version, you now have to force the push because the production anvil.yaml is out of sync with the development anvil.yaml.

2 Likes

On Anvil Docs | Communicating with Background Tasks it says See “Listing Background Tasks from code”, below., but the referred paragraph does not exist on that page or any other page that I could find with a quick search.

1 Like

Hi, @stefano.menci . Having looked for it recently, I found it here:
List Background Tasks from code. Which is definitely not “below.” It’s in a previous page.

Some examples on using plotly express on the server and adding to the documentation would be great please.

1 Like

https://anvil.works/learn/tutorials/http-apis-in-python#authentication
On the page linked above, in the blue box for “Want to do your own authentication” is says to pass require_auth=True
I believe this should say require_credentials=True based on testing and another reference doc linked below.
https://anvil.works/docs/http-apis/creating-http-endpoints/authentication

The link in the third paragraph here is broken:
https://anvil.works/docs/client/javascript/html-form should be changed to
https://anvil.works/docs/client/javascript/html-forms (that is, add an ‘s’ at the end)

1 Like

Add documentation of “Easier code navigation - you can hold down the Ctrl key and click on a function or variable to jump to its definition.” (currently noted only in a May 2018 blog post, I believe).

2 Likes