This project is a CRUD (Create, Read, Update, Delete) API built using Django Rest Framework. This API will be extensively used in our Eyemate project to manage various database operations.
To get the project up and running, follow these instructions.
Make sure you have the following installed on your local machine:
- Python (version 3.6 or above)
- Django
- Django Rest Framework
- Clone the repository:
git clone https://github.com/yourusername/yourrepository.git
- Navigate to the project directory:
cd Django-CRUD-APIcd myapi - Create a virtual environment:
python -m venv env
- Activate the virtual environment:
- On Windows:
.\env\Scripts\activate
- On macOS and Linux:
source env/bin/activate
- On Windows:
- Install the required dependencies:
pip install -r requirements.txt
Run the following commands to set up the database:
- Make migrations:
python manage.py makemigrations
- Apply migrations:
python manage.py migrate
To start the development server, navigate to the myapi directory and run the following command:
python manage.py runserver