From dfe495fbe8e360ee3b3cd8b29e55ee19d86fc9d2 Mon Sep 17 00:00:00 2001 From: Honza Král Date: Mon, 12 Oct 2009 10:16:17 +0000 Subject: [soc2009/model-validation] Merged to trunk at r11603 SECURITY ALERT: Corrected regular expressions for URL and email fields. git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11617 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/ref/models/fields.txt | 2 +- docs/ref/models/options.txt | 11 +++++++++++ docs/ref/models/querysets.txt | 9 +++++---- 3 files changed, 17 insertions(+), 5 deletions(-) (limited to 'docs/ref/models') diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 177df12862..0cb5be4b92 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -844,7 +844,7 @@ define the details of how the relation works. current date/time to be chosen. Instead of a dictionary this can also be a :class:`~django.db.models.Q` - object (an object with a :meth:`get_sql` method) for more complex queries. + object for more :ref:`complex queries `. ``limit_choices_to`` has no effect on the inline FormSets that are created to display related objects in the admin. diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt index 8402567f7a..9bf73f5b85 100644 --- a/docs/ref/models/options.txt +++ b/docs/ref/models/options.txt @@ -19,6 +19,17 @@ Available ``Meta`` options If ``True``, this model will be an :ref:`abstract base class `. +``app_label`` +------------- + +.. attribute:: Options.app_label + +If a model exists outside of the standard :file:`models.py` (for instance, if +the app's models are in submodules of ``myapp.models``), the model must define +which app it is part of:: + + app_label = 'myapp' + ``db_table`` ------------ diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index f78ebc506a..efd7c549b8 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -20,7 +20,7 @@ Throughout this reference we'll use the :ref:`example weblog models When QuerySets are evaluated ============================ -Internally, a ``QuerySet`` can be constructed, filter, sliced, and generally +Internally, a ``QuerySet`` can be constructed, filtered, sliced, and generally passed around without actually hitting the database. No database activity actually occurs until you do something to evaluate the queryset. @@ -1512,9 +1512,10 @@ regex Case-sensitive regular expression match. -The regular expression syntax is that of the database backend in use. In the -case of SQLite, which doesn't natively support regular-expression lookups, the -syntax is that of Python's ``re`` module. +The regular expression syntax is that of the database backend in use. +In the case of SQLite, which has no built in regular expression support, +this feature is provided by a (Python) user-defined REGEXP function, and +the regular expression syntax is therefore that of Python's ``re`` module. Example:: -- cgit v1.3