Nazzcodek / person

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running the Django REST API Endpoint

This document provides step-by-step instructions on how to run and use the Django REST API endpoint for managing persons.

Prerequisites

Before you begin, ensure you have the following prerequisites installed on your system:

  • Python 3.x
  • Django
  • Django REST framework
  • Postman (optional, for testing)

Getting Started

  1. Clone the repository containing your Django project to your local machine.
git clone [<repository_url>](https://github.com/Nazzcodek/person.git)

# Navigate to the project directory.
cd person

# Create and activate virtualenv
python -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Make Migrations.
python manage.py makemigrations

# Apply database migrations.
python manage.py migrate

# Start the development server.
python manage.py runserver

Using the API

  1. Open your web browser or a tool like Postman.

  2. Access the API overview to see available endpoints:

  1. Perform CRUD operations:

Testing

You can use tools like Postman or use the API endpoints provided above.

Conclusion

successfully set up and run Django REST API endpoint for managing persons. This API can now be use to create, view, update, and delete person records.

About


Languages

Language:JavaScript 70.5%Language:CSS 26.2%Language:Python 2.7%Language:HTML 0.6%