Seems like something is not ok though, check it out:
>> d = web.insert('users', email='
bjorn....@foo.com',password=web.SQLLiteral('SHA1("foo")'),level=1,joindate=web.SQLLiteral('NOW()'),laston=web.SQLLiteral('NOW()'), _test=True)
>>> print d
INSERT INTO users (password, joindate, email, laston, level) VALUES
(SHA1("foo"), NOW(), '
bjorn....@foo.com', NOW(), 1)
now I copy and paste that string in MySQL:
mysql> INSERT INTO users (password, joindate, email, laston, level)
VALUES (SHA1("foo"), NOW(), '
bjorn....@foo.com', NOW(), 1)
Query OK, 1 row affected (0.06 sec)
mysql> select * from users;
+----+-------------------------
+------------------------------------------+---------------------
+---------------------+-------+
| id | email |
password | joindate |
laston | level |
+----+-------------------------
+------------------------------------------+---------------------
+---------------------+-------+
| 5 |
bjorn....@ask.com |
b3d27fe823942946dbbbc16e62537743a458131a | 2008-04-07 23:45:41 |
2008-04-07 23:45:41 | 1 |
+----+-------------------------
+------------------------------------------+---------------------
+---------------------+-------+
But if I use web.insert check it out:
d = web.insert('users',
email='
bjorn.t...@foo2.com',password=web.SQLLiteral('SHA1("foo")'),level=1,joindate=web.SQLLiteral('NOW()'),laston=web.SQLLiteral('NOW()'))
mysql> select * from users;
+----+-------------------------
+------------------------------------------+---------------------
+---------------------+-------+
| id | email |
password | joindate |
laston | level |
+----+-------------------------
+------------------------------------------+---------------------
+---------------------+-------+
| 5 |
bjorn....@foo.com |
b3d27fe823942946dbbbc16e62537743a458131a | 2008-04-07 23:45:41 |
2008-04-07 23:45:41 | 1 |
| 6 |
bjorn.t...@foo2.com | SHA1("foo")
| 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | 1 |
+----+-------------------------
+------------------------------------------+---------------------
+---------------------+-------+
It didn't create an SHA1 hash.