๐ UserNotes Django Application
๐ Description
This is a UserNotes application created using Django REST Framework. It provides APIs for managing notes.
๐ Setup Instructions
Without Docker
๐ Prerequisites
- Python 3.11
- pip (Python package manager)
๐ง Steps
- Clone the repository:
git clone https://github.com/cmaliwal/usernotes.git
- Navigate to the project directory:
cd usernotes
- Create a virtual environment:
python -m venv venv
- Activate the virtual environment:
- On Unix or MacOS:
source venv/bin/activate
- On Unix or MacOS:
- Install the requirements:
pip install -r requirements.txt
- Apply the migrations:
python manage.py makemigrations python manage.py migrate
- Run the server:
python manage.py runserver
With Docker
๐ณ Prerequisites
- Docker
- Docker Compose
๐ง Steps
- Clone the repository:
git clone https://github.com/cmaliwal/usernotes.git
- Navigate to the project directory:
cd usernotes
- Build and run the Docker container:
docker-compose up --build
- To access the bash shell:
docker-compose exec web bash
๐ Accessing the Application
The application will be accessible at http://127.0.0.1:8000.
๐ Swagger API Documentation
To access the Swagger API documentation, visit http://127.0.0.1:8000/api/schema/swagger-ui/.
๐งช Running Tests
To run tests, execute the following command:
python manage.py test
๐๏ธ Creating Migrations
To create new migrations based on the changes you've made to your models:
python manage.py makemigrations
With docker
docker-compose exec web python manage.py makemigrations
To apply the migrations to the database:
python manage.py migrate
With docker:
docker-compose exec web python manage.py migrate