Skip to content

A back-end API built with django rest framework that allows users to track and manage their medications.

License

Notifications You must be signed in to change notification settings

ManuelDelarosa1204/Django-Medication-Tracker-API

Repository files navigation

Django-Medication-Tracker-API

A back-end API built with django rest framework that allows users to track and manage their medications. Users can enter certain data related to their medications such as name, dosage, times taken per day, and other useful information.

Install and Setup

  1. Clone the repository
git clone https://github.com/ManuelDelarosa1204/Django-Medication-Tracker-API.git
  1. Create a virtual environment
python3 -m venv venv
  1. Activate the virtual environment

    Windows

    venv/Scripts/activate

    Unix

    source venv/bin/activate
  2. Install the required packages

pip install -r requirements.txt
  1. Apply database migrations
python3 manage.py migrate
  1. Create a superuser (admin) (Fill out information as prompted)
python3 manage.py createsuperuser
  1. Run the development server
python3 manage.py runserver
  1. Access the admin panel in your browser by navigating to localhost:8000/admin and logging in with superuser credentials.

  2. Obtain a User Token: In the admin panel, navigate to Tokens. Copy the token associated with a user to make authorized API calls.

API Endpoints

GET users/ : List all users of the application

POST users/ : Create a user

GET users/{user slug}/ : Retrieve user data

POST medications/create/ : Create medications (requires token)

GET *medications/{user slug}/ : List all medications for a specific user (requires token)

DELETE *medications/{user slug}/{medication id}/delete/ : Delete a medication for a user

About

A back-end API built with django rest framework that allows users to track and manage their medications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages