Registry / web-framework / Django

Django

JSON →
library6.0.3pypypi✓ verified 51d ago

High-level Python web framework. Two active release lines: 6.0.3 (latest, Dec 2025, requires Python >=3.12) and 5.2.x LTS (Apr 2025, Python >=3.10, EOL Apr 2028). Feature releases roughly every 8 months. Deprecations follow a two-release cycle before removal.

web-frameworkdatabaseauth-security
pip install Django
Install & Compatibility
Where this runs
tested against v5.2.15 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 3.49s
py 3.11
✓ —
✓ 3.41s
py 3.12
✓ —
✓ 3.39s
py 3.13
✓ —
✓ 3.42s
py 3.9
10/15 runs
10/15 runs
68MB installed
● package 68MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

django
import django
import django

Minimal Django settings and model. Always set DEFAULT_AUTO_FIELD.

# settings.py (minimal) INSTALLED_APPS = [ 'django.contrib.contenttypes', 'django.contrib.auth', ] DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': BASE_DIR / 'db.sqlite3', } } DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' # models.py from django.db import models class Article(models.Model): title = models.CharField(max_length=200) created_at = models.DateTimeField(auto_now_add=True) class Meta: ordering = ['-created_at'] # shell # python manage.py makemigrations # python manage.py migrate # python manage.py runserver
django-admin --version
Debug
Known issues
breakingDjango 6.0 requires Python >=3.12. Python 3.10 and 3.11 support dropped. Projects on Python 3.10/3.11 must stay on Django 5.2 LTS (EOL Apr 2028).
fix
Use Django 5.2 LTS for Python 3.10/3.11 projects. Upgrade Python to 3.12+ to use Django 6.0.
affects: >= 6.0
breakingcx_Oracle driver removed in Django 6.0. Oracle users must migrate to the oracledb driver (>=1.3.2). cx_Oracle was deprecated in Django 5.0.
fix
pip install oracledb and update DATABASE ENGINE to django.db.backends.oracle. The oracledb driver uses the same connection parameters.
affects: >= 6.0
breakingQuerySet.return_insert_columns renamed to returning_columns in Django 6.0.
fix
Replace return_insert_columns= with returning_columns= in bulk_create() calls.
affects: >= 6.0
breakingDjango 6.0 overhauled email internals to use Python's modern email API. SafeMIMEText, SafeMIMEMultipart, and BadHeaderError are deprecated. Custom email subclasses relying on internal underscore methods may break silently.
fix
Audit any custom EmailMessage subclasses. Replace SafeMIMEText/SafeMIMEMultipart references. BadHeaderError replaced by ValueError.
affects: >= 6.0
breakingMariaDB minimum version raised to 10.6 in Django 6.0. MariaDB 10.5 support dropped.
fix
Upgrade MariaDB to 10.6+ before upgrading Django to 6.0.
affects: >= 6.0
gotchaDEFAULT_AUTO_FIELD must be set in settings.py. Omitting it causes W042 system check warnings for every model in the project. LLMs frequently omit this from generated settings files.
fix
Add DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' to settings.py.
affects: >= 3.2
gotchaTwo active release lines with different Python requirements. Django 6.0 (Python >=3.12) and Django 5.2 LTS (Python >=3.10). LLM-generated code often installs the latest without checking Python version compatibility.
fix
Pin Django version explicitly: Django>=5.2,<6 for Python 3.10/3.11. Django>=6.0 for Python 3.12+.
affects: all
gotchaADMINS and MANAGERS setting format changed in Django 6.0: list of (name, email) tuples is deprecated. Must be a list of email strings. Format as '"Name" <email>' for named addresses.
fix
ADMINS = ['admin@example.com'] or ADMINS = ['"Admin Name" <admin@example.com>']
affects: >= 6.0
gotchaBASE_DIR is a common variable in Django settings.py, usually defined as `BASE_DIR = Path(__file__).resolve().parent.parent`. Omitting its definition will cause a NameError.
fix
Ensure BASE_DIR is defined in settings.py, e.g., `from pathlib import Path; BASE_DIR = Path(__file__).resolve().parent.parent`.
affects: all
Upgrade
Version history
6.0.6latest on PyPI
Audit
Dependencies
asgiref>=3.8.1requiredASGI support. Required, installed automatically.
sqlparse>=0.3.1requiredSQL formatting. Required, installed automatically.
psycopg2-binary or psycopg>=3optionalPostgreSQL adapter. Not auto-installed — must add separately.
mysqlclientoptionalMySQL adapter. Not auto-installed.
Agent activity
95 hits · last 30 days
node
20
petalbot
4
seranking-bot
4
bytedance
3
ahrefsbot
2
amazonbot
1
Resources