Skip to main content
Frameworks

Django .gitignore

.gitignore for frameworks projects

View on GitHub

.gitignore Content

# ==============================================================================
# Created by https://gitignores.com/
# COMPREHENSIVE FRAMEWORK TEMPLATE for Django
# Website: https://www.djangoproject.com/
# Repository: https://github.com/django/django
# ==============================================================================

# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# TEMPLATE OVERVIEW & USAGE NOTES
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# • TEMPLATE TYPE: COMPREHENSIVE FRAMEWORK TEMPLATE
# • PURPOSE: Complete Django Python framework patterns with security, build, and development artifacts
# • DESIGN PHILOSOPHY: Self-contained with all Django and Python-specific patterns
# • COMBINATION GUIDANCE: Use standalone; optionally add IDE/OS templates
# • SECURITY CONSIDERATIONS: Includes security patterns for .env files and credentials
# • BEST PRACTICES: Review patterns before use, test with git check-ignore, customize for your project
# • OFFICIAL SOURCES: Django documentation and community best practices

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# SECURITY & SENSITIVE DATA PROTECTION (ALWAYS FIRST!)
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# CRITICAL: Protect sensitive data from accidental commits to version control

*.crt
*.key
*.keystore
*.pem
*.secret
*.token
*_keys
*_secrets
*_tokens
.env
.env.*
.env.*.local
.env.local
id_dsa
id_rsa

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# BUILD ARTIFACTS & DISTRIBUTION
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

*.egg
*.egg-info/
*.so
*.tar.gz
*.whl
*.zip

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# DEPENDENCY MANAGEMENT & PACKAGE CACHE
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

.cache/
.eggs/
.pdm-build/
.pybuilder/
.python-eggs/
.venv
__pycache__/
__pypackages__/
build/
develop-eggs/
dist/
docs/_build/
eggs/
env.bak/
ENV/
parts/
pip-wheel-metadata/
profile_default/
sdist/
share/python-wheels/
venv.bak/
venv/
wheels/

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# DEVELOPMENT & RUNTIME ARTIFACTS
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

*.log
*.log.*
.dmypy.json
.mypy_cache/
.nox/
.pytest_cache/
.pyre/
.pytype/
.tox/
dmypy.json
pip-delete-this-directory.txt
pip-log.txt

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# FRAMEWORK-SPECIFIC PATTERNS
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

*.cer
*.csr
*.der
*.jks
*.manifest
*.nupkg
*.o
*.obj
*.p12
*.p7b
*.p7c
*.pfx
*.pid
*.pid.lock
*.pot
*.py[co]
*.pyc
*.pyd
*.pyo
*.spec
*.tgz
*.truststore
.Python
.python-version
cython_debug/
db.sqlite3
db.sqlite3-journal
docs/locale/
downloads/
instance/
ipython_config.py
local_settings.py
MANIFEST
media/
out/
pdm.toml
staticfiles/
.webassets-cache
var/

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# TESTING & QUALITY ASSURANCE
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

.coverage
.coverage.*
.coverage.xml
.coverage_html/
.hypothesis/
.nyc_output/
htmlcov/
junit.xml
nosetests.xml
test-output/
test-reports/
test-results/
testng-results.xml
tests/.coverage*
tests/coverage_html/

# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# TEMPLATE CUSTOMIZATION & BEST PRACTICES
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# 1. REVIEW: Examine all patterns before use
# 2. CUSTOMIZE: Adapt to your project's specific structure
# 3. TEST: Use `git check-ignore` to verify patterns
# 4. SECURE: Always protect sensitive data and credentials
# 5. UPDATE: Review periodically as technology evolves

# RECOMMENDED USAGE PATTERNS:
# ==============================================================================
#
# BASIC USAGE (STANDALONE):
# -------------------------
# cp frameworks/django.gitignore .gitignore
#
# WITH IDE SUPPORT:
# ----------------
# cat frameworks/django.gitignore \
#     ides/intellij.gitignore | sort -u > .gitignore
#
# CROSS-PLATFORM DEVELOPMENT:
# ---------------------------
# cat frameworks/django.gitignore \
#     os/linux.gitignore \
#     os/macos.gitignore \
#     os/windows.gitignore | sort -u > .gitignore
#
# IMPORTANT NOTES:
# ==============================================================================
# 1. This template is self-contained and includes security patterns
# 2. No need to add common/security.gitignore separately
# 3. Test with `git status --ignored` to ensure proper coverage

Note: This file is fetched from GitHub and cached for 7 days.