This is a Django web application implementing a platform for exchanging goods. Users can create ads, make exchange offers, filter listings, register, and interact visually with the site through a responsive interface.
-
User registration and authentication
-
Create, edit, and delete ads
-
Attach images via URLs
-
Browse all ads and filter by:
- category
- condition (new/used)
- keyword
-
Exchange offers:
- choose your item and another user's item
- add a comment
- track status (pending, accepted, rejected)
-
Modal window for enlarged image and description
-
Responsive Bootstrap 5 interface
git clone https://github.com/Kari230996/barter_project_task.git
cd barter_project_task- Before starting, rename
.env.exampleto.env - Open
.envand replaceSECRET_KEYwith your own:
SECRET_KEY=django-insecure-replace-with-unique-key- Generate a new key (Windows example):
python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"- Start the project:
docker-compose up --builddocker-compose exec web python manage.py migratedocker-compose exec web python manage.py createsuperuserThe project will be available at: http://localhost:8000
- Create a virtual environment:
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows- Install dependencies:
pip install -r requirements.txt- Run migrations and start the server:
python manage.py migrate
python manage.py runserver- Python 3.10+
- Django 5.x
- Django REST Framework
- drf-yasg (Swagger documentation)
- SQLite (default)
- Bootstrap 5 (responsive design)
Run all tests:
pytestTests cover:
- Creating an ad
- Editing an ad
- Deleting an ad
- Keyword search
- Creating an exchange offer
Automatic Swagger documentation available at:
http://localhost:8000/swagger/
/api/.
Example request: GET http://localhost:8000/api/ads/
Developed as part of a test assignment. Visual emphasis — simplicity, clarity, and usability.
📧 Contact: karina.apaeva96@gmail.com