$ DB_NAME=cleo_db DB_USER=user_00 DB_PASSWORD=user_00_pwd HOST=localhost PORT=3306 SECRET_KEY='PutYourSecretKeyHere' python3 manage.py runserver 0:5000
$ DB_NAME=cleo_db DB_USER=user_00 DB_PASSWORD=user_00_pwd HOST=localhost PORT=3306 SECRET_KEY='PutYourSecretKeyHere' python3 manage.py test service
$ DB_NAME=cleo_db DB_USER=user_00 DB_PASSWORD=user_00_pwd HOST=localhost PORT=3306 SECRET_KEY='PutYourSecretKeyHere' python3 manage.py test api
-
Family (references up to two users representing the parents)
- id
- created_at
- updated_at
- due_date (optional)
- birth_date (optional)
- baby_gender (optional)
- main_address
- company (foreign key)
- guide (foreign key)
-
User
- id
- created_at
- updated_at
- first_name
- last_name
- phone_number
- address
- activation_code (used when setting the password the first time, randomly generated when the user is first created)
- password (encrypted)
- family (foreign key)
-
Guide
- id
- created_at
- updated_at
- first_name
- last_name
- phone_number
-
Company
- id
- created_at
- updated_at
- name
- address
- Get a list of all users [GET]
- Get a specific user [GET]
- Create a new user [POST]
- http://127.0.0.1:5000/api/v1/users/
- User emails must be unique and return an error if user email is already in use.
- Delete a user [DELETE]
- Update a user [PUT]
- Activate a user [PUT]
- http://127.0.0.1:5000/api/v1/users/id/activate
- Takes an activation code and new password.
- Must check activation code before setting password. Returns error if activation code is invalid.
- Returns error if user is already activated.
- Get a list of all companies [GET]
- Get a specific company [GET]
- Create a new company [POST]
- Delete a company [DELETE]
- Update a company [PUT]
- Get a list of all families [GET]
- Get a specific family [GET]
- Create a new family [POST]
- Delete a family [DELETE]
- Update a family [PUT]
- Get a list of all guides [GET]
- Get a specific guide [GET]
- Create a new guide [POST]
- Delete a guide [DELETE]
- Update a guide [PUT]