Python Using Databases in Python Meet Peewee First Queries

Ryan McGuire
Ryan McGuire
3,755 Points

how do I import this model?

How do I import this model/class?

queries.py
from models.py import Challenge

#import app.models
#from app import models
#from app.models import mymodel

you don't need to include .py just writing models is enough as python knows you are working with .py files

from models import Challenge