The Notes Management Application is a Django web application that allows users to create, view, edit, and delete personal notes. The application enforces user authentication to ensure that users can only manage their own notes. Additionally, it provides a RESTful API for integration with frontend applications.
- User authentication (registration and login)
- Create, read, update, and delete (CRUD) functionality for notes
- Filtering of notes by title or creation date
- RESTful API for note management
- User-friendly interface using Bootstrap
- Backend: Django, Django REST Framework
- Database: SQLite (or PostgreSQL/MySQL depending on your configuration)
- Frontend: Bootstrap
- Testing: Django's test framework and DRF's test utilities
-
Clone the repository:
git clone https://github.com/yourusername/notes_management.git cd notes_management
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Run migrations:
python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
-
Run the development server:
python manage.py runserver
-
Access the application: Open your browser and go to
http://127.0.0.1:8000/
.
- Authentication: Users can register and log in to access the notes functionality.
- Creating Notes: Users can create new notes using the provided form on the home page.
- Viewing Notes: All notes created by the logged-in user will be displayed on the home page.
- Editing Notes: Users can click on the edit button to update the title and content of their notes.
- Deleting Notes: Users can delete their notes using the delete button.
The application exposes a RESTful API for managing notes. Below are the details of the API endpoints.
http://127.0.0.1:8000/api/
-
List All Notes
- URL:
/notes/
- Method:
GET
- Authentication: Required
- URL:
-
Create a Note
- URL:
/notes/
- Method:
POST
- Authentication: Required
- Request Body:
{ "title": "Note Title", "content": "Note content." }
- URL:
-
Retrieve a Note
- URL:
/notes/<id>/
- Method:
GET
- Authentication: Required
- URL:
-
Update a Note
- URL:
/notes/<id>/
- Method:
PUT
orPATCH
- Authentication: Required
- Request Body:
{ "title": "Updated Note Title", "content": "Updated content." }
- URL:
-
Delete a Note
- URL:
/notes/<id>/
- Method:
DELETE
- Authentication: Required
- URL:
Run the test suite to ensure all functionalities work as expected:
python manage.py test