Closed redstoneleo closed 7 months ago
The problem is:
from flask_peewee.db import Database
from peewee import *
You are importing the peewee.Database
which is shadowing the flask_peewee.db.Database
. This should fix it:
from peewee import *
from flask_peewee.db import Database
Thanks ! The code actually comes from http://docs.peewee-orm.com/projects/flask-peewee/en/latest/getting-started.html#adding-users-to-the-site so you should update the doc too.
Tested with the following code on win11 and
Python 3.9.15 (main, Oct 11 2022, 15:28:02) [MSC v.1929 64 bit (AMD64)] on win32
, got