A Django web app for students to buy and sell used textbooks.
File → Open Folder → select the `bookstore` folder
- Python (Microsoft)
- Django (Baptiste Darthenay)
- Pylance (Microsoft)
Open Terminal in VS Code (`Ctrl + ``) and run:
# Create virtual environment
python -m venv venv
# Activate it (Windows)
venv\Scripts\activate
# Activate it (Mac/Linux)
source venv/bin/activatepip install -r requirements.txtpython manage.py makemigrations
python manage.py migratepython manage.py createsuperuserpython manage.py runserverVisit: http://127.0.0.1:8000 Admin panel: http://127.0.0.1:8000/admin
bookstore/
├── bookstore/ # Main Django project settings
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── books/ # Book listings app
│ ├── models.py # Book, Wishlist, Message models
│ ├── views.py # All book views
│ ├── forms.py # Book forms
│ ├── urls.py
│ └── admin.py
├── users/ # Custom user app
│ ├── models.py # CustomUser model
│ ├── views.py # Register, login, profile views
│ ├── forms.py # Auth & profile forms
│ ├── urls.py
│ └── admin.py
├── templates/ # HTML templates
│ ├── base.html # Navbar, footer, layout
│ ├── books/
│ └── users/
├── static/
│ ├── css/style.css # All styles
│ └── js/main.js
├── media/ # Uploaded images (auto-created)
├── requirements.txt
└── manage.py
| Feature | Description |
|---|---|
| 🔐 Auth | Register, Login, Logout with custom user model |
| 📖 List Books | Post books with image, price, condition, category |
| 🔍 Search & Filter | Search by title/author, filter by category/condition/price |
| 💬 Messaging | Buyers can message sellers directly |
| ❤️ Wishlist | Save books to wishlist |
| 👤 Profiles | Student profiles with college info |
| ✅ Mark as Sold | Sellers can mark books as sold |
| 🗂️ Categories | Engineering, Medical, Science, Commerce, Arts, etc. |
| 🛠️ Admin Panel | Manage all books, users, messages |
- Backend: Django 4.2
- Database: SQLite (dev) — switch to PostgreSQL for production
- Frontend: Bootstrap 5 + Custom CSS
- Image Handling: Pillow
- Press F5 to run the server using the launch config
- Use Ctrl+Shift+P →
Python: Select Interpreter→ choosevenv - Django HTML templates get syntax highlighting with the Django extension