mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #25175 -- Renamed the postgresql_psycopg2 database backend to postgresql.
This commit is contained in:
parent
8656cfc4e0
commit
ec9004728e
25 changed files with 42 additions and 25 deletions
|
@ -26,7 +26,7 @@ settings:
|
|||
|
||||
* :setting:`ENGINE <DATABASE-ENGINE>` -- Either
|
||||
``'django.db.backends.sqlite3'``,
|
||||
``'django.db.backends.postgresql_psycopg2'``,
|
||||
``'django.db.backends.postgresql'``,
|
||||
``'django.db.backends.mysql'``, or
|
||||
``'django.db.backends.oracle'``. Other backends are :ref:`also available
|
||||
<third-party-notes>`.
|
||||
|
|
|
@ -1512,7 +1512,7 @@ make the call non-blocking. If a conflicting lock is already acquired by
|
|||
another transaction, :exc:`~django.db.DatabaseError` will be raised when the
|
||||
queryset is evaluated.
|
||||
|
||||
Currently, the ``postgresql_psycopg2``, ``oracle``, and ``mysql`` database
|
||||
Currently, the ``postgresql``, ``oracle``, and ``mysql`` database
|
||||
backends support ``select_for_update()``. However, MySQL has no support for the
|
||||
``nowait`` argument. Obviously, users of external third-party backends should
|
||||
check with their backend's documentation for specifics in those cases.
|
||||
|
|
|
@ -459,7 +459,7 @@ other database types. This example is for PostgreSQL::
|
|||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
'ENGINE': 'django.db.backends.postgresql',
|
||||
'NAME': 'mydatabase',
|
||||
'USER': 'mydatabaseuser',
|
||||
'PASSWORD': 'mypassword',
|
||||
|
@ -500,14 +500,19 @@ Default: ``''`` (Empty string)
|
|||
|
||||
The database backend to use. The built-in database backends are:
|
||||
|
||||
* ``'django.db.backends.postgresql_psycopg2'``
|
||||
* ``'django.db.backends.postgresql'``
|
||||
* ``'django.db.backends.mysql'``
|
||||
* ``'django.db.backends.sqlite3'``
|
||||
* ``'django.db.backends.oracle'``
|
||||
|
||||
You can use a database backend that doesn't ship with Django by setting
|
||||
``ENGINE`` to a fully-qualified path (i.e.
|
||||
``mypackage.backends.whatever``).
|
||||
``ENGINE`` to a fully-qualified path (i.e. ``mypackage.backends.whatever``).
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
The ``django.db.backends.postgresql`` backend is named
|
||||
``django.db.backends.postgresql_psycopg2`` in older releases. For backwards
|
||||
compatibility, the old name still works in newer versions.
|
||||
|
||||
.. setting:: HOST
|
||||
|
||||
|
@ -657,8 +662,7 @@ The character set encoding used to create the test database. The value of this
|
|||
string is passed directly through to the database, so its format is
|
||||
backend-specific.
|
||||
|
||||
Supported for the PostgreSQL_ (``postgresql_psycopg2``) and MySQL_ (``mysql``)
|
||||
backends.
|
||||
Supported by the PostgreSQL_ (``postgresql``) and MySQL_ (``mysql``) backends.
|
||||
|
||||
.. _PostgreSQL: http://www.postgresql.org/docs/current/static/multibyte.html
|
||||
.. _MySQL: http://dev.mysql.com/doc/refman/5.6/en/charset-database.html
|
||||
|
|
|
@ -625,7 +625,7 @@ Arguments sent with this signal:
|
|||
|
||||
``sender``
|
||||
The database wrapper class -- i.e.
|
||||
``django.db.backends.postgresql_psycopg2.DatabaseWrapper`` or
|
||||
``django.db.backends.postgresql.DatabaseWrapper`` or
|
||||
``django.db.backends.mysql.DatabaseWrapper``, etc.
|
||||
|
||||
``connection``
|
||||
|
|
|
@ -578,6 +578,13 @@ Validators
|
|||
* Added :func:`~django.core.validators.validate_unicode_slug` to validate slugs
|
||||
that may contain Unicode characters.
|
||||
|
||||
Database backends
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
* The PostgreSQL backend (``django.db.backends.postgresql_psycopg2``) is also
|
||||
available as ``django.db.backends.postgresql``. The old name will continue to
|
||||
be available for backwards compatibility.
|
||||
|
||||
Backwards incompatible changes in 1.9
|
||||
=====================================
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ databases -- a default PostgreSQL database and a MySQL database called
|
|||
DATABASES = {
|
||||
'default': {
|
||||
'NAME': 'app_data',
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
'ENGINE': 'django.db.backends.postgresql',
|
||||
'USER': 'postgres_user',
|
||||
'PASSWORD': 's3krit'
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue