A professional Django web application built with industry best practices.
- Framework: Django 4.2.7
- Language: Python 3.9+
- Database: SQLite (development), PostgreSQL (production)
- Server: Gunicorn + Nginx (production)
- Python 3.9 or higher
- pip (Python package manager)
- Git
- Virtual environment (venv)
python -m venv venv
Windows:
venv\Scripts\activate
Linux/Mac:
source venv/bin/activate
pip install -r requirements.txt
# Copy the example env file
copy .env.example .env
# Edit .env file and update your settings
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
python manage.py collectstatic --noinput
python manage.py runserver
Visit: http://127.0.0.1:8000/
Admin Panel: http://127.0.0.1:8000/admin/
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
git init
git add .
git commit -m "Initial commit"
git remote add origin your-repo-url
git push -u origin main
cd /var/www/
git clone your-repo-url
cd taskbook
# 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
- 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
# 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
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is proprietary and confidential.