Skip to content

Fartanity/todo_django

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📝 Django Todo + Donations Platform

A full-stack Django project that combines a Task Manager with a Donation System.
Built using Django, PostgreSQL, Docker, Stripe (Test Mode), and PayFast (Sandbox).


🚀 Features

  • ✅ User authentication (login/register)
  • ✅ Task management (CRUD: Create, Read, Update, Delete tasks)
  • ✅ Donation system:
    • Stripe (test mode with sandbox cards)
    • PayFast (sandbox donation setup only)
  • ✅ Dockerized setup for easy deployment
  • ✅ Environment-based configuration (.env file)

🛠️ Tech Stack

  • Backend → Django 4.x, Python 3.9+
  • Database → PostgreSQL
  • Payments → Stripe (test mode), PayFast (sandbox)
  • Containerization → Docker & Docker Compose

📂 Project Structure

todoapp_django/
│── donations/        # Donation app (Stripe + PayFast)
│── tasks/            # Task manager app
│── todo_project/     # Django project settings
│── manage.py         # Django project entry
│── requirements.txt  # Dependencies
│── Dockerfile        # Docker build file
│── docker-compose.yml # Docker orchestration
│── .gitignore        # Ignored files

⚙️ Installation

1️⃣ Clone the repo

git clone https://github.com/Fartanity/todo_django.git
cd todo_django

2️⃣ Setup Virtual Environment

python -m venv venv
source venv/bin/activate   # Linux/Mac
venv\Scripts\activate      # Windows

3️⃣ Install dependencies

pip install -r requirements.txt

4️⃣ Setup PostgreSQL

Make sure PostgreSQL is running and create a database. Update your .env file accordingly.

5️⃣ Run migrations

python manage.py makemigrations
python manage.py migrate

6️⃣ Create superuser (for admin)

python manage.py createsuperuser

7️⃣ Start development server

python manage.py runserver

🔑 Environment Variables (.env)

Create a .env file in your project root:

# Django
SECRET_KEY=your_secret_key
DEBUG=True

# Database
DB_NAME=mydb
DB_USER=postgres
DB_PASSWORD=123
DB_HOST=localhost
DB_PORT=5432

# Stripe
STRIPE_PUBLIC_KEY=pk_test_xxxxx
STRIPE_SECRET_KEY=sk_test_xxxxx

# PayFast Sandbox
MERCHANT_ID=10000100
MERCHANT_KEY=46f0cd694581a
PAYFAST_URL=https://sandbox.payfast.co.za/eng/process

💳 Stripe (Test Mode)

This project uses Stripe in test mode.
Use the following test card numbers:

  • ✅ Success: 4242 4242 4242 4242
  • ❌ Fail: 4000 0000 0000 0002
  • Expiry: Any future date
  • CVC: Any 3 digits

👉 Stripe Docs


💰 PayFast (Sandbox)

  • Donations are handled in sandbox mode only.
  • No real transactions.
  • Default credentials:
    • merchant_id=10000100
    • merchant_key=46f0cd694581a
  • Test URL → PayFast Sandbox

🐳 Docker Setup

To run everything with Docker:

docker-compose up --build

This will:

  • Start Django app
  • Start PostgreSQL
  • Map ports for local development

🧑‍💻 Contributing

  1. Fork the repo
  2. Create a new branch (feature/new-feature)
  3. Commit changes (git commit -m "Add new feature")
  4. Push and create a PR

📜 License

MIT License © 2025 Fartanity

About

A Dockerized Django To-Do app with user authentication, PostgreSQL, and sandbox donation setup using Stripe and PayFast.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors