~ubuntu-branches/ubuntu/quantal/python-django/quantal-security

« back to all changes in this revision

Viewing changes to docs/topics/db/queries.txt

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-10-12 11:34:35 UTC
  • mfrom: (1.1.12 upstream) (29.1.1 maverick-security)
  • Revision ID: james.westby@ubuntu.com-20101012113435-yy57c8tx6g9anf3e
Tags: 1.2.3-1ubuntu0.1
* SECURITY UPDATE: XSS in CSRF protections. New upstream release
  - CVE-2010-3082
* debian/patches/01_disable_url_verify_regression_tests.diff:
  - updated to disable another test that fails without internet connection
  - patch based on work by Kai Kasurinen and Krzysztof Klimonda
* debian/control: don't Build-Depends on locales-all, which doesn't exist
  in maverick

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.. _topics-db-queries:
2
 
 
3
1
==============
4
2
Making queries
5
3
==============
6
4
 
7
5
.. currentmodule:: django.db.models
8
6
 
9
 
Once you've created your :ref:`data models <topics-db-models>`, Django
 
7
Once you've created your :doc:`data models </topics/db/models>`, Django
10
8
automatically gives you a database-abstraction API that lets you create,
11
9
retrieve, update and delete objects. This document explains how to use this
12
 
API. Refer to the :ref:`data model reference <ref-models-index>` for full
 
10
API. Refer to the :doc:`data model reference </ref/models/index>` for full
13
11
details of all the various model lookup options.
14
12
 
15
13
Throughout this guide (and in the reference), we'll refer to the following
937
935
In addition to the ``QuerySet`` methods defined in "Retrieving objects" above,
938
936
the ``ForeignKey`` ``Manager`` has additional methods used to handle the set of
939
937
related objects. A synopsis of each is below, and complete details can be found
940
 
in the :ref:`related objects reference <ref-models-relations>`.
 
938
in the :doc:`related objects reference </ref/models/relations>`.
941
939
 
942
940
``add(obj1, obj2, ...)``
943
941
    Adds the specified model objects to the related object set.
1067
1065
If you find yourself needing to write an SQL query that is too complex for
1068
1066
Django's database-mapper to handle, you can fall back on writing SQL by hand.
1069
1067
Django has a couple of options for writing raw SQL queries; see
1070
 
:ref:`topics-db-sql`.
 
1068
:doc:`/topics/db/sql`.
1071
1069
 
1072
1070
Finally, it's important to note that the Django database layer is merely an
1073
1071
interface to your database. You can access your database via other tools,