tko22/flask-boilerplate

There shouldn't just be one file that holds all of the models.

tko22 opened this issue · 6 comments

tko22 commented

create a models folder, then move the Person and Email models into different files. Don't forget the init.py and create db instance!

can you provide me an example of how to do this ??

tko22 commented

right now, the path to models.py is api/models.py. It may be more modular if we moved it so we would have this structure:

  • api/
    • models/
      - __init__.py in which db is initialized here.
      - Person.py
      - Email.py

I should also be able to do from api.models import Person, Email and import the Person and Email object

Got it. Thank you

can you provide me examples to run test cases on post methods with authorization? that would be lot of help to my project.

tko22 commented
tko22 commented

fixed