File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed
django/db/backends/postgresql Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,12 @@ class DatabaseWrapper(BaseDatabaseWrapper):
102
102
def __init__ (self , * args , ** kwargs ):
103
103
super (DatabaseWrapper , self ).__init__ (* args , ** kwargs )
104
104
105
+ import warnings
106
+ warnings .warn (
107
+ 'The ``postgres`` backend has been deprecated. Use ``postgres_psycopg2`` instead.' ,
108
+ PendingDeprecationWarning
109
+ )
110
+
105
111
self .features = DatabaseFeatures ()
106
112
self .ops = DatabaseOperations (self )
107
113
self .client = DatabaseClient (self )
Original file line number Diff line number Diff line change @@ -91,6 +91,9 @@ their deprecation, as per the :ref:`Django deprecation policy
91
91
``django.contrib.auth.context_processors.auth``. This has been
92
92
deprecated since the 1.2 release.
93
93
94
+ * The ``postgresql`` database backend has been deprecated in favor of
95
+ the ``postgresql_psycopg2`` backend.
96
+
94
97
* 2.0
95
98
* ``django.views.defaults.shortcut()``. This function has been moved
96
99
to ``django.contrib.contenttypes.views.shortcut()`` as part of the
Original file line number Diff line number Diff line change @@ -305,6 +305,18 @@ created using ``decorator_from_middleware``.
305
305
Features deprecated in 1.2
306
306
==========================
307
307
308
+ ``postgresql`` database backend
309
+ -------------------------------
310
+
311
+ The ``psycopg1`` library has not been updated since October 2005. As a
312
+ result, the ``postgresql`` database backend, which depends on this
313
+ library, has been deprecated.
314
+
315
+ If you are currently using the ``postgresql`` backend, you should
316
+ migrate to using the ``postgresql_psycopg2`` backend. To update your
317
+ code, install the ``psycopg2`` library and change the
318
+ ``DATABASE_ENGINE`` setting to read ``postgresql_psycopg2``.
319
+
308
320
CSRF response-rewriting middleware
309
321
----------------------------------
310
322
You can’t perform that action at this time.
0 commit comments