I am trying to set up my own username (in a project quickstarted with
authentication and authorization.) I added a user through /admin but no
password is assigned when this is done.
What I have so far, after a bit of digging around and guesswork:
paster shell development.ini
In [1]:
u=model.DBSession.query(model.User).filter_by(user_name="alex").one()
In [2]: u.password="alex"
In [4]: model.DBSession.flush()
In [5]: model.DBSession.commit()
...
AssertionError: Transaction must be committed using the transaction manager
What is going wrong?
I suggest a couple of documentation updates:
1. The auth/authen documentation spends a lot of time on how auth is
plugable (which is good - I'd like to be able to use openID or LDAP in
future projects), but could give more detail on the how to quickly add
users to the default setup.
2. paster shell is mentioned as a convenient way to interact with the DB
in a couple of places, but it doesn't actually say how to commit changes
to the DB that I can see.
Cheers,
Alex
Just starting out with a TG2 project, and I would like to manipulate
data in my DB, from paster shell.
I am trying to set up my own username (in a project quickstarted with
authentication and authorization.) I added a user through /admin but no
password is assigned when this is done.