{"id":204,"library":"Django","title":"Django","description":"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.","status":"active","version":"6.0.3","language":"python","source_language":"en","source_url":"https://docs.djangoproject.com/en/stable/releases/","tags":["web","framework","orm","wsgi","asgi","admin","migrations"],"install":[{"cmd":"pip install Django","lang":"bash","label":"Latest (6.0.x, requires Python >=3.12)"},{"cmd":"pip install \"Django>=5.2,<6\"","lang":"bash","label":"LTS 5.2.x (Python >=3.10, EOL Apr 2028)"},{"cmd":"pip install \"Django[argon2]\"","lang":"bash","label":"With Argon2 password hasher"}],"dependencies":[{"reason":"ASGI support. Required, installed automatically.","package":"asgiref>=3.8.1","optional":false},{"reason":"SQL formatting. Required, installed automatically.","package":"sqlparse>=0.3.1","optional":false},{"reason":"PostgreSQL adapter. Not auto-installed — must add separately.","package":"psycopg2-binary or psycopg>=3","optional":true},{"reason":"MySQL adapter. Not auto-installed.","package":"mysqlclient","optional":true}],"imports":[{"wrong":"import django","symbol":"django","correct":"import django"}],"quickstart":{"code":"# settings.py (minimal)\nINSTALLED_APPS = [\n    'django.contrib.contenttypes',\n    'django.contrib.auth',\n]\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.sqlite3',\n        'NAME': BASE_DIR / 'db.sqlite3',\n    }\n}\nDEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'\n\n# models.py\nfrom django.db import models\n\nclass Article(models.Model):\n    title = models.CharField(max_length=200)\n    created_at = models.DateTimeField(auto_now_add=True)\n\n    class Meta:\n        ordering = ['-created_at']\n\n# shell\n# python manage.py makemigrations\n# python manage.py migrate\n# python manage.py runserver","lang":"python","description":"Minimal Django settings and model. Always set DEFAULT_AUTO_FIELD."},"warnings":[{"fix":"Use Django 5.2 LTS for Python 3.10/3.11 projects. Upgrade Python to 3.12+ to use Django 6.0.","message":"Django 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).","severity":"breaking","affected_versions":">= 6.0"},{"fix":"pip install oracledb and update DATABASE ENGINE to django.db.backends.oracle. The oracledb driver uses the same connection parameters.","message":"cx_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.","severity":"breaking","affected_versions":">= 6.0"},{"fix":"Replace return_insert_columns= with returning_columns= in bulk_create() calls.","message":"QuerySet.return_insert_columns renamed to returning_columns in Django 6.0.","severity":"breaking","affected_versions":">= 6.0"},{"fix":"Audit any custom EmailMessage subclasses. Replace SafeMIMEText/SafeMIMEMultipart references. BadHeaderError replaced by ValueError.","message":"Django 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.","severity":"breaking","affected_versions":">= 6.0"},{"fix":"Upgrade MariaDB to 10.6+ before upgrading Django to 6.0.","message":"MariaDB minimum version raised to 10.6 in Django 6.0. MariaDB 10.5 support dropped.","severity":"breaking","affected_versions":">= 6.0"},{"fix":"Add DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' to settings.py.","message":"DEFAULT_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.","severity":"gotcha","affected_versions":">= 3.2"},{"fix":"Pin Django version explicitly: Django>=5.2,<6 for Python 3.10/3.11. Django>=6.0 for Python 3.12+.","message":"Two 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.","severity":"gotcha","affected_versions":"all"},{"fix":"ADMINS = ['admin@example.com'] or ADMINS = ['\"Admin Name\" <admin@example.com>']","message":"ADMINS 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.","severity":"gotcha","affected_versions":">= 6.0"},{"fix":"Ensure BASE_DIR is defined in settings.py, e.g., `from pathlib import Path; BASE_DIR = Path(__file__).resolve().parent.parent`.","message":"BASE_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.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'2025':15,24 '2028':29 '3.10':26 '3.12':18 '5.2':20 '6.0.3':12 '8':34 'activ':9 'admin':50 'apr':23,28 'asgi':49 'cycl':42 'dec':14 'deprec':36 'django':1 'eol':27 'everi':33 'featur':30 'follow':37 'framework':7,46 'high':3 'high-level':2 'latest':13 'level':4 'line':11 'lts':22 'migrat':51 'month':35 'orm':47 'python':5,17,25 'releas':10,31,41 'remov':44 'requir':16 'rough':32 'two':8,40 'two-releas':39 'web':6,45 'wsgi':48 'x':21","created_at":"2026-03-25T18:31:39.610637+00:00","updated_at":"2026-04-17T14:13:41.182873+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":100,"quickstart_score":0,"quickstart_tag":"stale","pypi_latest":"6.0.6","cli_name":"django-admin","cli_version":"5.2.14","type":"library","homepage":"https://www.djangoproject.com/","github":"https://github.com/django/django","docs":"https://docs.djangoproject.com/","changelog":"https://docs.djangoproject.com/en/stable/releases/","pypi":"https://pypi.org/project/Django/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","database","auth-security"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":"verified"}}