Skip to content

rohit03993/taskbook-django

Repository files navigation

TaskBook - Django Web Application

A professional Django web application built with industry best practices.

🚀 Technology Stack

  • Framework: Django 4.2.7
  • Language: Python 3.9+
  • Database: SQLite (development), PostgreSQL (production)
  • Server: Gunicorn + Nginx (production)

📋 Prerequisites

  • Python 3.9 or higher
  • pip (Python package manager)
  • Git
  • Virtual environment (venv)

🛠️ Local Development Setup

1. Create Virtual Environment

python -m venv venv

2. Activate Virtual Environment

Windows:

venv\Scripts\activate

Linux/Mac:

source venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

4. Environment Configuration

# Copy the example env file
copy .env.example .env

# Edit .env file and update your settings

5. Run Migrations

python manage.py makemigrations
python manage.py migrate

6. Create Superuser (Admin)

python manage.py createsuperuser

7. Collect Static Files

python manage.py collectstatic --noinput

8. Run Development Server

python manage.py runserver

Visit: http://127.0.0.1:8000/

Admin Panel: http://127.0.0.1:8000/admin/

📁 Project Structure

taskbook/
├── config/              # Project configuration
│   ├── settings.py      # Django settings
│   ├── urls.py          # Main URL routing
│   └── wsgi.py          # WSGI configuration
├── apps/                # Django apps
│   └── core/            # Core application
├── static/              # CSS, JS, images
├── templates/           # HTML templates
├── media/               # User uploaded files
├── requirements.txt     # Python dependencies
├── manage.py            # Django management script
└── .env                 # Environment variables

🌐 Deployment to VPS

1. Push to Git Repository

git init
git add .
git commit -m "Initial commit"
git remote add origin your-repo-url
git push -u origin main

2. Pull on VPS Server

cd /var/www/
git clone your-repo-url
cd taskbook

3. Setup on VPS

# Install Python dependencies
pip install -r requirements.txt

# Update .env for production
# Set DEBUG=False
# Update ALLOWED_HOSTS
# Configure PostgreSQL database

# Run migrations
python manage.py migrate

# Collect static files
python manage.py collectstatic --noinput

# Setup Gunicorn and Nginx

🔒 Security Checklist for Production

  • Set DEBUG=False in .env
  • Change SECRET_KEY to a strong random key
  • Update ALLOWED_HOSTS with your domain
  • Use PostgreSQL instead of SQLite
  • Configure HTTPS with SSL certificate
  • Set up proper file permissions
  • Configure firewall rules

📝 Useful Commands

# Create a new Django app
python manage.py startapp app_name

# Make database migrations
python manage.py makemigrations

# Apply migrations
python manage.py migrate

# Create superuser
python manage.py createsuperuser

# Run tests
python manage.py test

# Open Django shell
python manage.py shell

🤝 Contributing

  1. Create a feature branch
  2. Make your changes
  3. Test thoroughly
  4. Submit a pull request

📄 License

This project is proprietary and confidential.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published