I am upgrading an old app from Python 3.4 with Peewee 2.7.4 to Python 3.8 with Peewee 3.13.3.
The old code complains with AttributeError: Cannot use uninitialized Proxy.
The link mentioned in the old comment is now broken. Instead I found this page
that seems to be the one I'm interested on.
I changed the old code to this, it seems to be working well, but I would like a confirmation that it's the right thing to do:
png_page = peewee.DeferredForeignKey('PdfPageNumber', null=True)
pdf_file = peewee.ForeignKeyField(TempFile, backref='page_numbers')