mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Converted links to external topics so they use intersphinx extension markup.
This allows to make these links more resilent to changes in the target URLs. Thanks Jannis for the report and Aymeric Augustin for the patch. Fixes #16586. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16720 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -676,10 +676,7 @@ For example, this model has a few custom methods::
|
||||
return '%s %s' % (self.first_name, self.last_name)
|
||||
full_name = property(_get_full_name)
|
||||
|
||||
The last method in this example is a :term:`property`. `Read more about
|
||||
properties`_.
|
||||
|
||||
.. _Read more about properties: http://www.python.org/download/releases/2.2/descrintro/#property
|
||||
The last method in this example is a :term:`property`.
|
||||
|
||||
The :doc:`model instance reference </ref/models/instances>` has a complete list
|
||||
of :ref:`methods automatically given to each model <model-instance-methods>`.
|
||||
|
||||
@@ -259,14 +259,12 @@ as dirty using ``transaction.set_dirty()`` when using raw SQL calls.
|
||||
Connections and cursors
|
||||
-----------------------
|
||||
|
||||
``connection`` and ``cursor`` mostly implement the standard `Python DB-API`_
|
||||
(except when it comes to :doc:`transaction handling </topics/db/transactions>`).
|
||||
If you're not familiar with the Python DB-API, note that the SQL statement in
|
||||
``cursor.execute()`` uses placeholders, ``"%s"``, rather than adding parameters
|
||||
directly within the SQL. If you use this technique, the underlying database
|
||||
library will automatically add quotes and escaping to your parameter(s) as
|
||||
necessary. (Also note that Django expects the ``"%s"`` placeholder, *not* the
|
||||
``"?"`` placeholder, which is used by the SQLite Python bindings. This is for
|
||||
the sake of consistency and sanity.)
|
||||
|
||||
.. _Python DB-API: http://www.python.org/dev/peps/pep-0249/
|
||||
``connection`` and ``cursor`` mostly implement the standard Python DB-API
|
||||
described in :pep:`249` (except when it comes to :doc:`transaction handling
|
||||
</topics/db/transactions>`). If you're not familiar with the Python DB-API, note
|
||||
that the SQL statement in ``cursor.execute()`` uses placeholders, ``"%s"``,
|
||||
rather than adding parameters directly within the SQL. If you use this
|
||||
technique, the underlying database library will automatically add quotes and
|
||||
escaping to your parameter(s) as necessary. (Also note that Django expects the
|
||||
``"%s"`` placeholder, *not* the ``"?"`` placeholder, which is used by the SQLite
|
||||
Python bindings. This is for the sake of consistency and sanity.)
|
||||
|
||||
Reference in New Issue
Block a user