Django 2.1.2

Django is a high-level Python Web-MVC framework for RAD with clean and pragmatic code. It's comparatively fast, integrates moderns security features, and is very scalable. It prefers explicit configuration over implicit conventions, has an object-relational database mapper, autogenerated admin interfaces, flexible regex-based URL dispatching, internationalization features, a custom templating engine or Jinja2, caching, authentication or authorization, a user comment plugin, RSS/Atom and sitemap modules, GeoIP integration.

Tags python django orm web-mvc web-development routing authorization developers
License BSDL
State stable

Recent Releases

2.1.202 Oct 2018 14:05 minor feature: model state on objects with a primary key creat . . - Added an exception if the PostgreSQL database name is . . - get_primary_key_column() method in sqlite3 backend. . Refs #28859 -- "no data found" exception handling with cx_Oracl . . - Mentioned the #django-dev IRC channel in contributing . . - Removed Fabric examples in docs. . Added release date for 2.0.5 and 1.11.13. . Added stub release notes for 2.0.6. . - Removed empty action attribute on HTML forms. . - Doc'd that ModelAdmin.prepopulated_fields removes sto . . Used double quotation marks for csrf form element. . - Added a system check to prohibit models with more tha . . Refs #29358 -- Corrected wording in primary key check message. . - Added long_description in setup.py. . - HTTP request logging inconsistencies. . - error handling when MIGRATIONS_MODULES specifie . . Alphabetized imports in docs/ref/contrib/postgres/fields.txt. . Replaced django.test.utils.patch_logger() with assertLogs(). . Captured logging in tests with self.assertLogs(). . - Added choices to LogEntry.action_flag field. . Refs #29350 -- 'invalid escape sequence' warning in SQLite intr . . Replaced context by comment in 2 humanize strings. . Refs #29389 -- Added Paginator test for float page number. . - Made Paginator reject non-integer page numbers of typ . . Added tests for trans_null.ngettext(). . - Added SimpleTestCase.assertWarnsMessage(). . German Translation for 3 days ago . . Upgraded OpenLayers to 4.6.5 for OpenLayersWidget. . Replaced TOKEN_ constants by TokenType enums. . - Added router.allow_relation() calls for assignments b . . Aliased trans_null.to_locale() to trans_real.to_locale(). . Increased django.utils.translation.trans_null test coverage. . Consolidated duplicate to_locale() implementations. . Alphabetized imports in various docs. . Moved to_language() to django.utils.translation. . - Removed management commands deactivation of the locale. . - Updated admin's jQuery to 3.3.1. .
2.1.101 Sep 2018 16:25 minor feature: 2.1.x Post-release version bump. . 2.1.x Added CVE-2018-14574 to the security release archive. . 2.1.x Added stub release notes for 2.1.1. . 2.1.x typos in comments and docs. . 2.1.x - race condition in QuerySet.update_or_cr . . 2.1.x Removed out of place sentence in QuerySet.count() docs. . 2.1.x - Added QUERY_TERMS removal to 2.1 release notes. . 2.1.x - QueryDict.urlencode() crash with non-st . . 2.1.x Refs #29593, #26891 -- Doc'd RegisterLookupMixin.get_lookups(). . 2.1.x - --keepdb on PostgreSQL if the database . . 2.1.x - Doc'd the geometry type for each model field. . 2.1.x Refs #28584 -- Documented removal of support for SQLite 3.7 . . 2.1.x Clarified the values accepted by ModelAdmin.fields. . 2.1.x Refs #28540 -- Added FILE_UPLOAD_PERMISSIONS to deployment ch . . 2.1.x - Doc'd a change to file upload permissions in . . 2.1.x Consolidated docs about handling a ForeignKey in custom user . . 2.1.x Refs #29374 -- Moved misplaced line in date format docs table. . 2.1.x - crash when combining Q objects with __i . . 2.1.x - translation failure of DurationField's . . 2.1.x - Doc'd removal of py-bcrypt compatibility. . 2.1.x Refs #29652 -- typo in docs/releases/2.1.txt. . 2.1.x - admin change form crash if the user doe . . 2.1.x - missing related_query_name reverse acce . . 2.1.x Refs #29449 -- Removed release note for "Allowed using contri . . 2.1.x - Allowed test client to accept structured suff . . 2.1.x - Doc'd return value of StaticFilesStorage.post . . 2.1.x - Doc'd the validators that each model and form . . 2.1.x Refs #8936 -- Added ModelAdmin.has_view_or_change_permission(). . 2.1.x Added ModelAdmin._response_post_save() to avoid code duplicat . . 2.1.x - Made admin change view redirect to changelist . . 2.1.x Refs #29015 -- Added database name to PostgreSQL database nam . . 2.1.x - Added QuerySet.explain() to the database opti . . 2.1.x - admin change f
2.103 Aug 2018 01:45 minor feature: Replaced 'python -Wall' with 'python -Wa'. . Added test for combining Q objects with non-Q objects. . - UserChangeForm crash if password field is exclu . . links to Sphinx docs. . - Made assertFormError() output "(actual errors: none)" . . Clarified a sentence in docs/topics/i18n/translation.txt. . - Added renderer argument to ModelForm. . Removed unused regexes in django.core.management.templates. . - Prevented initial selection of empty choice in multip . . typo in docs/releases/2.0.4/1.11.12.txt. . - OpenLayersWidget deserialization ignoring the w . . Added release date for 2.0.4 and 1.11.12. . Refs #23406 -- "invalid escape sequence" warning in migrations . . Added stub release notes for 2.0.5. . Refs #27728 -- BytesWarning in admin_views tests. . Refs #28577 -- Added check for HStoreField to prevent mutable default. . - Added bytes to str conversion in LPad/RPad database f . . Refs #28643 -- Added Repeat database function. . Added stub release notes for 1.11.13. . Refs #24791 -- Made PostgreSQL's nodb connection use first PostgresSQ . . reference to nonexistent __between lookup. . - Doc'd that a context manager can't be used with FileR . . - Made a JSONField lookup value of None match keys that . . Added additional AdminPasswordChangeForm tests. . Updated intersphinx_mapping URL for sphinx. . - Made ImageField render with accept="image/*"' HTML at . . - Made widthratio assign to as var if an exceptio . . Documented InlineModelAdmin.has_(add/change/delete)_permission(). . ordering in docs/internals/deprecation.txt. . - Added obj arg to InlineModelAdmin.has_add_permission(). . - Renamed admin CSS class field-box to fieldBox. . - Clarified PasswordResetTokenGenerator comment regardi . . Updated contributing docs for some latest practices. . Added tests for ArrayField.has_changed(). . - ArrayField.has_changed() for empty values. . - inspectdb import paths for django.contrib.postg . . mistakes in docs/topics/db/examples/many_
2.0.704 Jul 2018 09:25 minor feature: 2.0.x - a/an/and typos in docs and comments. . 2.0.x typo in docs/topics/db/aggregation.txt. . 2.0.x - Add a check for likely incorrectly migrated d . . 2.0.x - Warned that quoting a placeholder in a raw SQ . . 2.0.x Refs #28593 -- Updated old class names in comments following . . 2.0.x - Reallowed AuthenticationForm to raise the ina . . 2.0.x - Clarified the docs for admin.register's args. . 2.0.x - Added QuerySet.values()/values_list() support . . 2.0.x - Doc'd middleware ordering considerations due . . 2.0.x - tx_isolation deprecation warning on MyS . . 2.0.x invalid escape sequence warning in check_framework test. . 2.0.x - index name truncation of namespaced tab . . 2.0.x test failures due to ordering differences on PostgreSQL . . 2.0.x Updated main translation catalog. . 2.0.x incorrect integer division in DeletionTests.test_large_ . . 2.0.x Skipped test_exact_sliced_queryset_limit_one_offset on Oracle. . 2.0.x Bumped version for 2.0 release candidate 1. . 2.0.x - Doc'd backwards incompatibility when reverse( . . 2.0.x - typo in docs/topics/auth/default.txt. . 2.0.x Refs #28814 -- "SyntaxError: Generator expression must . . 2.0.x Refs #28814 -- test_runner failure on Python 3.7. . 2.0.x - ExtractYear imports in docs/ref/models/ . . 2.0.x - "Unknown system variable 'transaction_i . . 2.0.x Added assertion helpers for PostgreSQL's server-side cursor t . . 2.0.x - Made QuerySet.iterator() use server-side curs . . 2.0.x Clarified who the AdminEmailHandler emails. . 2.0.x typo in docs/topics/forms/media.txt. . 2.0.x Linked to prefetch_related_objects func in DB optimization docs. . 2.0.x - SQLite/MySQL crash when ordering by a f . . 2.0.x - Forced pot files to use UNIX-style newlines. . 2.0.x - test client crash if an exception with . . 2.0.x - Made query lookups for CIText fields use citext. . 2.0.x - a regression in caching of a GenericFor . . 2.0.x - Made Inl
2.0.502 May 2018 06:25 minor feature: 2.0.x Updated Basque (eu) locale formats. . 2.0.x Refs #23260 -- Tested nested generator input to unordered_lis . . 2.0.x - unordered_list template filter with laz . . 2.0.x outdated comment in RelatedObjectDoesNotExist. . 2.0.x Refs #19295 -- Doc'd that ManifestStaticFilesStorage doesn't . . 2.0.x - Replaced a numbered list with unordered list . . 2.0.x - Doc'd the return value for GenericForeignKey . . 2.0.x - Made QuerySet.reverse() affect nulls_first/nu . . 2.0.x Refs #14807 -- Removed unneeded mark_safe call. . 2.0.x Removed Python 2 comment in ValidationError. . 2.0.x - typo in django/views/templates/default_ . . 2.0.x Suggested LoginView rather than @login_required as an alterna . . 2.0.x - Clarified cache tag's handling of argum . . 2.0.x - unquoted table names in Subquery SQL wh . . 2.0.x - Doc'd that QuerySet.first() can affect aggreg . . 2.0.x typo in docs/ref/models/querysets.txt. . 2.0.x - typos in django/conf/global_settings.py . . 2.0.x Refs #21927 -- Removed docs for include()'s old instance_name . . 2.0.x Refs #28457 -- Updated the colors of the 'Congrats' page for . . 2.0.x Refs #28457 -- Removed unused.next-step CSS in django/views/ . . 2.0.x - Corrected examples of using attribute lookups . . 2.0.x - Doc'd that ModelAdmin.prepopulated_fields onl . . 2.0.x Refs #28010 -- Allowed reverse related fields in SELECT FOR U . . 2.0.x Refs #27318 -- Made DummyCache.set_many() return a list for c . . 2.0.x Removed docs for obsolete compatibility checks. . 2.0.x - AttributeError crash when assigning Non . . 2.0.x 'a'/'an' mix-ups in docs. . 2.0.x Refs #23919 -- Updated references to urllib.quote() to Python . . 2.0.x - Allowed models to define Meta.manager_inherit . . 2.0.x - Removed unnecessary leading dot from cross-do . . 2.0.x Refs #23919 -- Replaced doc references to django.utils.http.u . . 2.0.x Made assorted edits to docs/releases/2.0.txt. . 2.0.x
2.0.404 Apr 2018 04:05 minor feature: 2.0.x - QuerySet.bulk_create() and cascade dele . . 2.0.x Added release date for 1.11.6. . 2.0.x Added stub release notes for 1.11.7. . 2.0.x Refs #24254 -- Removed unnecessary SQL AS clause in SQLCompil . . 2.0.x Refs #23919 -- Corrected django.utils.http.urlencode()'s docu . . 2.0.x - awkward wrapping of Select2 chips. . 2.0.x Moved link in "Features removed in 2.0" to be more specific. . 2.0.x - Expanded docs for indexing contrib.postgres f . . 2.0.x - Prevented cache.get_or_set() from caching Non . . 2.0.x Split django.utils.http tests into separate test classes. . 2.0.x - urlencode()'s handling of bytes. . 2.0.x - Made Model.refresh_from_db() clear cached rel . . 2.0.x Removed incorrect reference to ModelChoiceField in Field.choi . . 2.0.x Refs #28643 -- Reorganized database functions docs. . 2.0.x Refs #28440 -- server connection closing test on macOS. . 2.0.x - the Basque DATE_FORMAT string. . 2.0.x Updated email.Util (Python 2) references to email.utils (Pyth . . 2.0.x Corrected examples in related field descriptor docstrings. . 2.0.x Refs #28710 -- Simplified l10n format test. . 2.0.x - Prevented ModelBackend.get_all_permissions() . . 2.0.x typo in MessageMiddleware.process_response() docstring. . 2.0.x - Restored the ability to use sliced QuerySets . . 2.0.x Bumped version for 2.0 beta 1. . 2.0.x typos in docs/releases/2.0.txt. . 2.0.x Made SearchQuery examples less sterotyped. . 2.0.x typo in docs/ref/models/querysets.txt. . 2.0.x Updated Basque (eu) locale formats. . 2.0.x Refs #23260 -- Tested nested generator input to unordered_lis . . 2.0.x - unordered_list template filter with laz . . 2.0.x outdated comment in RelatedObjectDoesNotExist. . 2.0.x Refs #19295 -- Doc'd that ManifestStaticFilesStorage doesn't . . 2.0.x - Replaced a numbered list with unordered list . . 2.0.x - Doc'd the return value for GenericForeignKey . . 2.0.x - Made QuerySet.reve
2.0.307 Mar 2018 13:05 minor feature: Set the foreground color to black in CSRF and 404 err . . Refs #28595 -- Added a hook to add execute wrappers for database quer . . Added a test for QuerySet.select_related() reverse caching. . Refs #28593 -- Made URLResolver._populate() more resilient to signal . . Removed unused eof argument to BoundaryIter._find_boundary(). . - Added FilteredRelation API for conditional join (ON c . . 2.0.x Bumped django_next_version in docs config. . 2.0.x Updated man page for Django 2.0 alpha. . 2.0.x Removed empty sections in 2.0 release notes. . 2.0.x Bumped version to 2.0 alpha 1. . 2.0.x Bumped trove classifier for 2.0 alpha 1. . 2.0.x Refs #27788 -- Corrected minimum supported Oracle version in . . 2.0.x Refs #25006 -- Marked again admin time picker shortcuts for t . . 2.0.x Updated translation catalogs. . 2.0.x JS linter error. . 2.0.x Reverted "- password reset tokens being v . . 2.0.x Merged startswith() calls. . 2.0.x - Added slug converter to some path() examples . . 2.0.x Clarified StrIndex docs example. . 2.0.x - DecimalValidator handling of positive e . . 2.0.x - Distinguished DATABASES 'TIME_ZONE' from set . . 2.0.x - Made tree.Node instances hashable. . 2.0.x Refs #28492 -- Defined aggregates' output_field at the class . . 2.0.x - typo in docs/ref/contrib/postgres/field . . 2.0.x - Corrected typo in docs/topics/db/queries.txt. . 2.0.x - Added missing ForeignKey.on_delete argument i . . 2.0.x - Made MySQL raise IntegrityError rather than O . . 2.0.x Refs #27025, #28593 -- "invalid escape sequence" warnin . . 2.0.x Refs #28677 -- Doc'd that on_delete is required in migrations. . 2.0.x - QuerySet.bulk_create() and cascade dele . . 2.0.x Added release date for 1.11.6. . 2.0.x Added stub release notes for 1.11.7. . 2.0.x Refs #24254 -- Removed unnecessary SQL AS clause in SQLCompil . . 2.0.x Refs #23919 -- Corrected django.utils.http.urlencode()'s docu . . 2.0.x - awkward
2.0.202 Feb 2018 09:45 minor feature: Added a test for mixing args and kwargs in reverse(). . a Dutch translation in i18n tests. . Refs #24031 -- Added test for When.__repr__(). . Removed unnecessary check in SQLCompiler.get_related_selections(). . - Added caching for hstore/citext OIDs. . Simplified Count.convert_value() and RegrCount.convert_value(). . Removed unneeded StdDev.convert_value() and Variance.convert_value(). . - Added responsive CSS for the admin. . Refs #21286 -- Enabled serializer tests with time pk model. . Revert "Refs #21286 -- Enabled serializer tests with time pk model". . Changed default value of DatabaseFeatures.has_bulk_insert to True. . Added test skipping for a PostgreSQL JSONField test. . - Added support for window expressions (OVER clause). . - Skipped test when serializer is not available. . Refs #14370 -- Vendored Select2 4.0.3 for use by the admin. . - Allowed using a Select2 widget for ForeignKey and Man . . - crash with the name of a model's autogenerated . . typo in docs/topics/cache.txt. . Refs #28334 -- crash in hstore/citext oid caching during test d . . Refs #14370 -- typo in ModelAdmin.autocomplete_fields docs. . typo in docs/internals/deprecation.txt. . Removed unused list in Query.resolve_lookup_value(). . Added a checks test for valid i18n patterns. . Initialized CsrfViewMiddleware once in csrf_tests. . - Reallowed error handlers to access CSRF tokens. . - Added a simplified URL routing syntax per DEP 0201. . - Made ogrinspect output pep8 compliant. . - Added color interpretation method to GDALBand. . Added test for too large input to django.utils.http.base36_to_int(). . - Set the foreground color to black in CSRF and 404 err . . Refs #28595 -- Added a hook to add execute wrappers for database quer . . Added a test for QuerySet.select_related() reverse caching. . Refs #28593 -- Made URLResolver._populate() more resilient to signal . . Removed unused eof argument to BoundaryIter._find_boundary(). . - Added FilteredRelation API
2.0.102 Jan 2018 03:15 minor feature: Added Paginator.get_page(). . - Made cache.set_many() return the list of failed keys. . - Allowed QuerySet.values_list() to return a namedtuple. . - Removed inaccurate docs about QuerySet.order_by() and . . Removed unneeded __init__() methods. . Reverted "- Replaced try/except/pass with contextlib.su . . Removed obsolete doc references to javascript_catalog. . Simplified GEOSFuncFactory. . Removed to_lower parameter for translation's to_locale(). . Added more tests for translation's to_locale(). . - translation's to_locale() with langauge subtags. . deepcopy of AreaField and DistanceField. . capitalization of "Spherical Mercator.". . - Removed handling of non-thread safe GEOS functions. . some comments referring to a nonexistent TestClient class. . Refs #24928 -- Added introspection support for PostgreSQL JSONField. . Refs #24928 -- Added introspection support for PostgreSQL RangeField. . Removed unnecessary parens in _get_app_label_and_model_name(). . - Doc'd upgrade effort expectations for Django 2.0. . - GIS's WKT regex to match large scientific notat . . - Renamed DatabaseCreation number arguments to suf. . - some GIS functions when queryset is evaluated m . . Tested field deconstruction with DEFAULT_DB_TABLESPACE and db_tablesp . . Refs #28492 -- Stopped accessing settings at Field.db_tablespace init . . - Defined default output_field of expressions at the cl . . - Dropped support for GEOS 3.3.x. . Added tests for DecimalValidator. . Used sqlite3.Connection.load_extension() instead of query execution f . . Removed django.contrib.gis.geometry.backend. . Moved contrib.gis.geometry.regex to contrib.gis.geometry. . - WSGIServer hang on responses without a Content- . . Refs #28569 -- gis_tests.inspectapp.tests.OGRInspectTest.test_t . . Refs #27090 -- Added real database sequenc
2.004 Dec 2017 04:12 major feature: The Django team is happy to announce the release of Django 2.0. This release starts Django s use of a loose form of semantic versioning, but there aren t any major backwards incompatible changes (except that support for Python 2.7 is removed) that might be expected of a 2.0 release. Upgrading should be a similar amount of effort as past feature releases. The release notes cover the assortment of new features in detail, but a few highlights are: A simplified URL routing syntax that allows writing routes without regular expressions. A responsive, mobile-friendly contrib.admin. Window expressions to allow adding an OVER clause to querysets.
1.805 Apr 2015 04:45 major feature: Django 1.8 has been designated as Django s second Long-Term Support (LTS) release, and will receive security updates for at least three years. Django now has a formalized API for Model._meta, providing an officially supported way to retrieve fields and filter fields based on their attributes. Multiple template engines/backends: Django template or Jinja2. Several features of the django-secure third-party library have been integrated into Django. Comes with a module with extensions for PostgreSQL specific features, such as ArrayField, HStoreField, Range Fields, and unaccent lookup. Django now has a UUIDField for storing universally unique identifiers. Now has a DurationField for storing periods of time - modeled in Python by timedelta. The added Query Expressions allow you to create, customize, and compose complex SQL expressions. TestCase has been refactored to allow for data initialization at the class level using transactions and savepoints. And some new minor additions: ModelAdmin now has a has_module_permission() method to allow limiting access to the module on the admin index page. InlineModelAdmin now has an attribute show_change_link that supports showing a link to an inline object s change form. Use the new django.contrib.admin.RelatedOnlyFieldListFilter in ModelAdmin.list_filter to limit the list_filter choices to foreign objects which are attached to those from the ModelAdmin. The ModelAdmin.delete_view() displays a summary of objects to be deleted on the deletion confirmation page. The jQuery library embedded in the admin has been upgraded to version 1.11.2. You can now specify AdminSite.site_url in order to display a link to the front-end site. You can now specify ModelAdmin.show_full_result_count to control whether or not the full count of objects should be displayed on a filtered admin page. The AdminSite.password_change() method now has an extra_context parameter. You can now control who may login to the admin site by overriding only AdminSite.has_