This project is a classified ad system built with Python using the Django framework. The system allows users to create, view, and pay for classified ads using the Paystack API for payment processing.
- User registration and login system
- Classified ad creation with title, description, price, and image upload
- Ad listing page with pagination and search functionality
- Ad detail page with payment option using Paystack API
- Payment verification and ad activation upon successful payment
- Admin dashboard for managing ads and users
- Python 3.9+
- Django 3.2+
- Paystack API credentials (available at Paystack website)
- Database: SQLite (default) or any other database supported by Django
- Clone the repository:
git clone https://github.com/your-username/classified-ad-system.git - Install the required packages:
pip install -r requirements.txt - Create a new Paystack API credentials and update the
PAYSTACK_SECRET_KEYandPAYSTACK_PUBLIC_KEYvariables in thesettings.pyfile - Run migrations:
python manage.py migrate - Create a superuser account:
python manage.py createsuperuser - Run the development server:
python manage.py runserver
The following configuration options are available:
PAYSTACK_SECRET_KEY: Paystack API secret keyPAYSTACK_PUBLIC_KEY: Paystack API public keyPAYSTACK_CALLBACK_URL: Callback URL for payment verificationAD_PRICE: Default price for classified ads
The following models are used in the system:
User: User model with fields for username, email, and passwordAd: Classified ad model with fields for title, description, price, image, and userPayment: Payment model with fields for ad, user, amount, and payment status
- User creates a classified ad and selects the payment option
- System redirects user to Paystack payment gateway
- User enters payment details and submits payment
- Paystack API verifies payment and sends callback to system
- System updates payment status and activates ad if payment is successful
- Implement ad expiration and automatic deactivation
- Add ad reporting and deletion functionality
- Improve search functionality with advanced filtering options
- Implement user rating and review system
This project is licensed under the MIT License. See LICENSE for details.
Contributions are welcome! Please submit a pull request or create an issue if you find any bugs or have suggestions for improvement.
- Paystack API documentation: Paystack API Docs
- Django documentation: Django Docs