update password also while updating the record
No, `set_password` is a method on the `User` model, but once you call `.update()` you are working with a `Query` object which doesn't have that method.

You can do:

``` python
from flask_peewee.utils import make_password

(User
    .update(
        organization_name=organization_name,
        username=username,
        email=email,
        password=make_password(request.form['password']))
    .where(User.id == int(request.form['id']))
    .execute())
```
 Thanks, it was the solution
By the way I'm using flask-peewee as well in one of my project.
Great Works. cheers !!

I have a simple query e.g.
        user = User.update(organization_name=organization_name,
                    username=username,
                    email=email,
                    active=active,
                    admin=admin,
                    created_date=created_date,
                    role=role).where(User.id==int(request.form['user_id']))
    #     user.set_password(request.form['password'])
        user.execute(

Is there any way so that I can update the password. It says

AttributeError: "'UpdateQuery' object has no attribute 'set_password'"

BESIDE THAT,
everything is working fine. Just want to let the user change their password.
Great Thanks
