Welcome to the Django CRUD (Create, Read, Update, Delete) project with pagination! This project is a web application built using Django that demonstrates how to perform CRUD operations on a database using function-based views with pagination. It's designed to help you understand how to create, retrieve, update, and delete records while efficiently managing large datasets through pagination.
- Create: Add new records to the database.
- Read: Retrieve and display records from the database with pagination.
- Update: Modify existing records in the database.
- Delete: Remove records from the database.
- Pagination: Efficiently manage and display a large number of records by dividing them into multiple pages.
Before you begin, make sure you have the following prerequisites:
- Python 3.x installed on your system.
- Django framework installed.
- A text editor or integrated development environment (IDE).
- Clone this repository to your local machine:
git clone https://github.com/yourusername/django-crud-pagination.git
- Create a Django superuser:
python manage.py createsuperuser
- Apply the database migrations:
python manage.py makemigrations
python manage.py migrate
- Start the development server:
python manage.py runserver
- Access the admin interface at
http://localhost:8000/admin/
and log in with your superuser credentials.
-
Open your web browser and go to
http://localhost:8000
to access the CRUD application. -
Click on the "Create" button to add new records to the database.
-
Use the pagination controls to navigate between pages when viewing records.
-
Click on the "Read" button to retrieve and display records with the option to update or delete them.
-
Choose the "Update" option to modify existing records in the database.
-
Select "Delete" to remove records from the database.