diff --git a/django/db/models/manager.py b/django/db/models/manager.py index e21af1ada5..d847631c82 100644 --- a/django/db/models/manager.py +++ b/django/db/models/manager.py @@ -48,7 +48,6 @@ class Manager(object): return QuerySet(self.model) def all(self): - # Returns a caching QuerySet. return self.get_query_set() def count(self): diff --git a/django/db/models/query.py b/django/db/models/query.py index 1565d8a30e..5d7418e565 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -232,23 +232,23 @@ class QuerySet(object): del_query._select_related = False del_query._order_by = [] - # Delete objects in chunks to prevent an the list of + # Delete objects in chunks to prevent an the list of # related objects from becoming too long more_objects = True while more_objects: - # Collect all the objects to be deleted in this chunk, and all the objects + # Collect all the objects to be deleted in this chunk, and all the objects # that are related to the objects that are to be deleted seen_objs = SortedDict() more_objects = False for object in del_query[0:GET_ITERATOR_CHUNK_SIZE]: more_objects = True object._collect_sub_objects(seen_objs) - - # If one or more objects were found, delete them. + + # If one or more objects were found, delete them. # Otherwise, stop looping. if more_objects: delete_objects(seen_objs) - + # Clear the result cache, in case this QuerySet gets reused. self._result_cache = None delete.alters_data = True @@ -278,12 +278,12 @@ class QuerySet(object): def filter(self, *args, **kwargs): "Returns a new QuerySet instance with the args ANDed to the existing set." - return self._filter_or_exclude(Q, *args, **kwargs) - + return self._filter_or_exclude(Q, *args, **kwargs) + def exclude(self, *args, **kwargs): "Returns a new QuerySet instance with NOT (arsg) ANDed to the existing set." return self._filter_or_exclude(QNot, *args, **kwargs) - + def _filter_or_exclude(self, qtype, *args, **kwargs): if len(args) > 0 or len(kwargs) > 0: assert self._limit is None and self._offset is None, \ @@ -558,7 +558,7 @@ class Q(object): class QNot(Q): "Encapsulates NOT (...) queries as objects" - + def get_sql(self, opts): tables, joins, where, params = super(QNot, self).get_sql(opts) where2 = ['(NOT (%s))' % " AND ".join(where)] @@ -827,7 +827,7 @@ def delete_objects(seen_objs): "Iterate through a list of seen classes, and remove any instances that are referred to" ordered_classes = seen_objs.keys() ordered_classes.reverse() - + cursor = connection.cursor() for cls in ordered_classes: diff --git a/docs/email.txt b/docs/email.txt index 8159536d1e..ae55a51a14 100644 --- a/docs/email.txt +++ b/docs/email.txt @@ -78,7 +78,7 @@ send_mass_mail vs. send_mail The main difference between ``send_mass_mail()`` and ``send_mail()`` is that ``send_mail()`` opens a connection to the mail server each time it's executed, -while ``send_mass_mail()`` uses a single connection for each of its messages. +while ``send_mass_mail()`` uses a single connection for all of its messages. This makes ``send_mass_mail()`` slightly more efficient. The mail_admins function diff --git a/docs/install.txt b/docs/install.txt index 6aed44769e..54b792464f 100644 --- a/docs/install.txt +++ b/docs/install.txt @@ -51,9 +51,9 @@ make sure a database server is running. Django works with PostgreSQL_ Additionally, you'll need to make sure your Python database bindings are installed. -* If you're using PostgreSQL, you'll need the psycopg_ package (version 1 -- - not version 2, which is still in beta). If you're on Windows, check out the - unofficial `compiled Windows version`_. +* If you're using PostgreSQL, you'll need the psycopg_ package (version 1.1 -- + not version 1.0 or version 2, which is still in beta). If you're on Windows, + check out the unofficial `compiled Windows version`_. * If you're using MySQL, you'll need MySQLdb_. * If you're using SQLite, you'll need pysqlite_. Use version 2.0.3 or higher. diff --git a/docs/templates_python.txt b/docs/templates_python.txt index 3c0ae9329e..af54bc9b8b 100644 --- a/docs/templates_python.txt +++ b/docs/templates_python.txt @@ -316,8 +316,8 @@ If ``TEMPLATE_CONTEXT_PROCESSORS`` contains this processor, every representing the permissions that the currently logged-in user has. See the `permissions docs`_. -.. _user authentication docs: http://www.djangoproject.com/documentation/models/authentication/#users -.. _permissions docs: http://www.djangoproject.com/documentation/models/authentication/#permissions +.. _user authentication docs: http://www.djangoproject.com/documentation/authentication/#users +.. _permissions docs: http://www.djangoproject.com/documentation/authentication/#permissions django.core.context_processors.debug ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~