A single-page application (SPA) that allows users to leave comments and replies. Each comment is stored in a relational database with identifying user information.
- Users can leave comments and replies.
- Top-level comments are displayed in a sortable table.
- Replies are displayed nested under their parent comments.
- CAPTCHA protection ensures only genuine users can leave comments.
comment_project/
│
├── comment_project/ # Django project settings
│ └── __init__.py
│ └── asgi.py
│ └── settings.py
│ └── urls.py
│ └── wsgi.py
│
├── comments/ # Django application
│ └── __init__.py
│ └── models.py
│ └── forms.py
│ └── views.py
│ └── urls.py
│ └── admin.py
│ └── templates/
│ └── comments/
│ └── comment_list.html
│ └── add_comment.html
│ └── reply_list.html
│ └── static/
│ └── comments/
│ └── styles.css
│ └── avatar.png
│
├── manage.py
├── requirements.txt
└── README.md
Features Comments and Replies 1. Top-level comments are displayed in a sortable table. 2. Replies are displayed in a nested manner under their parent comments.
CAPTCHA Protection CAPTCHA ensures that only genuine users can leave comments.
Getting Started Prerequisites Make sure you have the following software installed:
Python 3.8+ pip package manager Git
-
Clone the repository:
git clone https://github.com/eagle218/dzen-code.git
-
Change to the project directory:
cd comment_project -
Install dependencies:
pip install -r requirements.txt
-
Set up the database:
python manage.py makemigrations python manage.py migrate
-
Run the development server:
python manage.py runserver