ianb
November 1, 2024, 1:29pm
3
Yes, you can do this yourself quite easily.
You could mash together some parts of this old example app, and this function:
https://anvil.works/build#clone:Z4O2BXJEL6TVJ4QK=2LL4HNW3TZQAG7FICS57W6JN
[csvexample]
I see many new anvil users struggling to load data sets into the data tables for the first time without having an example of how to avoid abusing the free resources while still loading your use case sample data under the 30 second limit provided by the server modules.
So I created this full example app.
Feel free to clone it and use it for testing, reference, ideas, or anything else.
It is not fast. That’…
import bcrypt
def change_user_pass(user_table_row, new_password):
user_pw_hash = bcrypt.hashpw(new_password.encode(), bcrypt.gensalt())
user_table_row['password_hash'] = user_pw_hash.decode('utf-8')
The example app is way more code than you need, you could probably just get away with a page with an upload button that takes your csv and then sends it to the server module to process.
2 Likes