The Django Book Shop is a web application designed to facilitate the sale and purchase of books. Built using Django, it includes features such as user authentication, browsing books, adding books to a shopping cart, placing orders, and processing payments through PayPal.
Ensure you have Python and pip installed on your system.
Clone the repository:
git clone https://github.com/munuhee/books_shop.git
cd books_shop
Install dependencies:
pip install -r requirements.txt
Configure Django settings:
Create a file named .env
.
Update the .env
file with your Django secret key and PayPal configurations:
SECRET_KEY='your-django-secret-key'
PAYPAL_CLIENT_ID='your-paypal-client-id'
PAYPAL_SECRET='your-paypal-secret'
EMAIL_HOST='smtp.example.com'
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_HOST_USER='[email protected]'
EMAIL_HOST_PASSWORD='your_email_password'
On checkout.html
file replace YOUR_CLIENT_ID
with your client id from paypal
Run database migrations:
python manage.py migrate
Create a superuser (admin):
python manage.py createsuperuser
Run the development server:
python manage.py runserver
The application will be accessible at http://localhost:8000
.
Access the admin interface:
http://localhost:8000/admin/
.Sign up (registration):
Browse books:
Add to cart:
Checkout:
We welcome contributions! To contribute to the project, please follow these steps:
git checkout -b feature/your-feature-name
).git commit -am 'Add new feature'
).git push origin feature/your-feature-name
).Happy coding!