Closed tko22 closed 6 years ago
can you provide me an example of how to do this ??
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.
there are multiple ways of doing authentication so I can’t give you a specific example. Look into the test client api though. http://flask.pocoo.org/docs/1.0/api/#test-client
On Aug 14, 2018, at 5:30 AM, yashg5 notifications@github.com wrote:
can you provide me examples to run test cases on post methods with authorization? that would be lot of help to my project.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
fixed
create a
models
folder, then move the Person and Email models into different files. Don't forget the init.py and create db instance!