Unfortunately that is not possible. The code you are writing is interpreted by the database. The web2py hash function is implemented in python and based on the pbkdf2 algorithm. I am not aware that it is even possible to implement it in postgresql.
On Monday, 22 January 2018 09:10:07 UTC-6, lucas wrote: > > hello one and all, > > I'm creating a bash script that creates the new db with indexes, > functions, etc. using Postgresql 9.2 for the DAL to use in web2py 2.16.1. > > as it stands now, the script works great and even creates the tables > properly as setup in db.py, etc. > > I would like to insert some users into auth_user under that bash script > like: > > #!/bin/bash > psql db postgres << EOF > insert into auth_user (first_name, last_name, email, password) values > ('Harry', 'Truman', 'htru...@gmail.com', w2p_hash_passwd('dude man')); > EOF > exit 1 > > the w2py_hash_passwd is obviously not real, but what would I replace it > with so that when harry types in the 'dude man' password, web2py hashes it > properly and logs in old harry? > > thank you in advance, lucas > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.