[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#608502: unblock: python-django/1.2.4-1



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package python-django, the latest version contains security
fixes that we want in Squeeze.

It also contains other bugfix-only/documentation/tests changes that are
safe. I know you will not like the size of the diff but really upstream
are doing a good job with the management of their stable release. I
already told you so in the last unblock (#597339) and we had no problems
due to them. Just trust them (like you do for postgresql bugfix-only
release).

If you want to review all the upstream changes, it's here:
http://code.djangoproject.com/log/django/branches/releases/1.2.X?action=stop_on_copy&rev=15046&stop_rev=13763&mode=stop_on_copy

Upstream release policy if you want to learn more:
http://docs.djangoproject.com/en/1.2/internals/release-process/

unblock python-django/1.2.4-1

The diffstat once docs and tests changes are dropped:
 AUTHORS                                                          |   16 -
 MANIFEST.in                                                      |    3 
 PKG-INFO                                                         |    4 
 debian/changelog                                                 |   14 
 debian/patches/03_manpage.diff                                   |   11 
 debian/patches/04_hyphen-manpage.diff                            |    8 
 debian/patches/series                                            |    2 
 django/__init__.py                                               |    2 
 django/conf/global_settings.py                                   |   20 -
 django/conf/locale/bg/formats.py                                 |    2 
 django/conf/locale/en/formats.py                                 |    4 
 django/conf/locale/et/formats.py                                 |    2 
 django/conf/locale/fi/formats.py                                 |    2 
 django/conf/locale/hu/formats.py                                 |    2 
 django/conf/locale/lv/formats.py                                 |    2 
 django/conf/locale/mn/LC_MESSAGES/django.po                      |    4 
 django/conf/locale/uk/formats.py                                 |    2 
 django/conf/project_template/settings.py                         |    2 
 django/contrib/admin/helpers.py                                  |    3 
 django/contrib/admin/media/css/base.css                          |    2 
 django/contrib/admin/media/css/rtl.css                           |    4 
 django/contrib/admin/media/js/prepopulate.js                     |   14 
 django/contrib/admin/media/js/prepopulate.min.js                 |    2 
 django/contrib/admin/options.py                                  |   28 +
 django/contrib/admin/sites.py                                    |    4 
 django/contrib/admin/templates/admin/base.html                   |    2 
 django/contrib/admin/templates/admin/edit_inline/stacked.html    |    5 
 django/contrib/admin/templates/admin/edit_inline/tabular.html    |    5 
 django/contrib/admin/templates/admin/includes/fieldset.html      |    7 
 django/contrib/admin/templates/admin/prepopulated_fields_js.html |    2 
 django/contrib/admin/templates/admin/template_validator.html     |   31 -
 django/contrib/admin/util.py                                     |    7 
 django/contrib/admin/views/decorators.py                         |    4 
 django/contrib/admin/views/main.py                               |   10 
 django/contrib/admin/views/template.py                           |   79 ----
 django/contrib/admin/widgets.py                                  |   11 
 django/contrib/auth/__init__.py                                  |    2 
 django/contrib/auth/admin.py                                     |   12 
 django/contrib/auth/backends.py                                  |    8 
 django/contrib/auth/forms.py                                     |    6 
 django/contrib/auth/management/commands/createsuperuser.py       |   33 +-
 django/contrib/auth/middleware.py                                |    2 
 django/contrib/auth/models.py                                    |   25 -
 django/contrib/auth/urls.py                                      |    4 
 django/contrib/auth/views.py                                     |   44 +-
 django/contrib/comments/admin.py                                 |    8 
 django/contrib/comments/moderation.py                            |    2 
 django/contrib/comments/templates/comments/400-debug.html        |    4 
 django/contrib/comments/templates/comments/approve.html          |    2 
 django/contrib/comments/templates/comments/base.html             |    4 
 django/contrib/comments/templates/comments/delete.html           |    2 
 django/contrib/comments/templates/comments/flag.html             |    2 
 django/contrib/comments/templates/comments/form.html             |    4 
 django/contrib/comments/templates/comments/preview.html          |    4 
 django/contrib/comments/urls.py                                  |    3 
 django/contrib/contenttypes/views.py                             |   44 +-
 django/contrib/databrowse/templates/databrowse/base.html         |    2 
 django/contrib/formtools/wizard.py                               |   55 ++-
 django/contrib/gis/admin/options.py                              |    2 
 django/contrib/gis/db/backends/postgis/operations.py             |    2 
 django/contrib/gis/db/backends/util.py                           |   14 
 django/contrib/gis/db/models/query.py                            |    5 
 django/contrib/gis/db/models/sql/compiler.py                     |    2 
 django/contrib/gis/gdal/srs.py                                   |    2 
 django/contrib/gis/geometry/regex.py                             |    2 
 django/contrib/gis/geometry/test_data.py                         |  105 ++++++
 django/contrib/gis/maps/google/__init__.py                       |    2 
 django/contrib/gis/sitemaps/georss.py                            |    4 
 django/contrib/gis/sitemaps/kml.py                               |    4 
 django/contrib/gis/sitemaps/views.py                             |    9 
 django/contrib/humanize/templatetags/humanize.py                 |    7 
 django/contrib/localflavor/at/forms.py                           |   10 
 django/contrib/localflavor/cz/forms.py                           |    4 
 django/contrib/localflavor/it/forms.py                           |    8 
 django/contrib/localflavor/pl/forms.py                           |    7 
 django/contrib/localflavor/ro/forms.py                           |    8 
 django/contrib/localflavor/za/forms.py                           |    8 
 django/contrib/markup/templatetags/markup.py                     |    2 
 django/contrib/sessions/models.py                                |    2 
 django/contrib/sitemaps/__init__.py                              |   20 -
 django/contrib/sitemaps/management/commands/ping_google.py       |    2 
 django/contrib/sitemaps/views.py                                 |   10 
 django/contrib/sites/managers.py                                 |   37 +-
 django/contrib/sites/models.py                                   |   18 +
 django/contrib/syndication/views.py                              |   30 +
 django/core/cache/__init__.py                                    |    8 
 django/core/cache/backends/base.py                               |   28 +
 django/core/cache/backends/db.py                                 |    5 
 django/core/cache/backends/dummy.py                              |   15 
 django/core/cache/backends/filebased.py                          |    5 
 django/core/cache/backends/locmem.py                             |    5 
 django/core/exceptions.py                                        |    7 
 django/core/files/storage.py                                     |    2 
 django/core/files/uploadhandler.py                               |    2 
 django/core/handlers/base.py                                     |    2 
 django/core/mail/__init__.py                                     |    4 
 django/core/mail/backends/smtp.py                                |   10 
 django/core/mail/message.py                                      |    6 
 django/core/management/base.py                                   |    4 
 django/core/management/commands/compilemessages.py               |   19 -
 django/core/management/commands/loaddata.py                      |   20 -
 django/core/management/commands/shell.py                         |   20 -
 django/core/management/sql.py                                    |    5 
 django/core/management/validation.py                             |   15 
 django/core/serializers/__init__.py                              |    2 
 django/core/serializers/xml_serializer.py                        |   25 +
 django/core/servers/fastcgi.py                                   |   18 -
 django/db/__init__.py                                            |    2 
 django/db/backends/__init__.py                                   |    9 
 django/db/backends/oracle/base.py                                |   85 ++++-
 django/db/backends/oracle/creation.py                            |   44 --
 django/db/backends/postgresql/base.py                            |    7 
 django/db/backends/postgresql_psycopg2/base.py                   |    7 
 django/db/backends/util.py                                       |    2 
 django/db/models/base.py                                         |   37 +-
 django/db/models/fields/__init__.py                              |   14 
 django/db/models/fields/files.py                                 |    4 
 django/db/models/fields/related.py                               |   13 
 django/db/models/fields/subclassing.py                           |   15 
 django/db/models/options.py                                      |    5 
 django/db/models/query.py                                        |  159 ++++++----
 django/db/models/sql/aggregates.py                               |    1 
 django/db/models/sql/compiler.py                                 |   17 -
 django/db/models/sql/expressions.py                              |    5 
 django/db/models/sql/query.py                                    |   44 ++
 django/db/models/sql/subqueries.py                               |    1 
 django/db/models/sql/where.py                                    |   29 +
 django/db/transaction.py                                         |    2 
 django/db/utils.py                                               |   29 +
 django/dispatch/dispatcher.py                                    |   65 ++--
 django/dispatch/license.txt                                      |   36 ++
 django/forms/fields.py                                           |   27 +
 django/forms/formsets.py                                         |    1 
 django/forms/models.py                                           |   14 
 django/forms/widgets.py                                          |    7 
 django/middleware/common.py                                      |    2 
 django/middleware/csrf.py                                        |   38 +-
 django/template/defaultfilters.py                                |    4 
 django/templatetags/i18n.py                                      |    3 
 django/test/simple.py                                            |  112 ++++++-
 django/test/testcases.py                                         |   24 +
 django/test/utils.py                                             |   28 +
 django/utils/feedgenerator.py                                    |    2 
 django/utils/formats.py                                          |   89 +++--
 django/utils/http.py                                             |    7 
 django/utils/itercompat.py                                       |    6 
 django/utils/numberformat.py                                     |   12 
 django/utils/translation/trans_real.py                           |    5 
 django/views/csrf.py                                             |    2 
 django/views/debug.py                                            |    8 
 django/views/decorators/cache.py                                 |   39 +-
 django/views/decorators/csrf.py                                  |   16 +
 django/views/defaults.py                                         |    8 
 django/views/i18n.py                                             |   25 -
 django/views/static.py                                           |   12 
 setup.py                                                         |    2 
 156 files changed, 1491 insertions(+), 781 deletions(-)

The corresponding debdiff is attached.

-- System Information:
Debian Release: 6.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (150, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru python-django-1.2.3/AUTHORS python-django-1.2.4/AUTHORS
--- python-django-1.2.3/AUTHORS	2010-08-17 09:08:26.000000000 +0200
+++ python-django-1.2.4/AUTHORS	2010-11-16 15:48:52.000000000 +0100
@@ -18,6 +18,11 @@
     * Karen Tracey
     * Jannis Leidel
     * James Tauber
+    * Alex Gaynor
+    * Andrew Godwin
+    * Carl Meyer
+    * Ramiro Morales
+    * Chris Beaven
 
 More information on the main contributors to Django can be found in
 docs/internals/committers.txt.
@@ -65,7 +70,6 @@
     Ned Batchelder <http://www.nedbatchelder.com/>
     batiste@dosimple.ch
     Batman
-    Chris Beaven <http://smileychris.tactful.co.nz/>
     Brian Beck <http://blog.brianbeck.com/>
     Shannon -jj Behrens <http://jjinux.blogspot.com/>
     Esdras Beleza <linux@esdrasbeleza.com>
@@ -82,6 +86,7 @@
     Matías Bordese
     Sean Brant
     Andrew Brehaut <http://brehaut.net/blog>
+    David Brenneman <http://davidbrenneman.com>
     brut.alll@gmail.com
     bthomas
     btoll@bestweb.net
@@ -179,7 +184,6 @@
     Jorge Gajon <gajon@gajon.org>
     gandalf@owca.info
     Marc Garcia <marc.garcia@accopensys.com>
-    Alex Gaynor <alex.gaynor@gmail.com>
     Andy Gayton <andy-django@thecablelounge.com>
     Idan Gazit
     geber@datacollect.com
@@ -195,6 +199,7 @@
     David Gouldin <dgouldin@gmail.com>
     pradeep.gowda@gmail.com
     Collin Grady <collin@collingrady.com>
+    Gabriel Grant <g@briel.ca>
     Simon Greenhill <dev@simon.net.nz>
     Owen Griffiths
     Espen Grindhaug <http://grindhaug.org/>
@@ -231,6 +236,7 @@
     Ibon <ibonso@gmail.com>
     Tom Insam
     Baurzhan Ismagulov <ibr@radix50.net>
+    Stephan Jaekel <steph@rdev.info>
     james_027@yahoo.com
     jcrasta@gmail.com
     jdetaeye
@@ -247,6 +253,7 @@
     Erik Karulf <erik@karulf.com>
     Ben Dean Kawamura <ben.dean.kawamura@gmail.com>
     Ian G. Kelly <ian.g.kelly@gmail.com>
+    Niall Kelly <duke.sam.vimes@gmail.com>
     Ryan Kelly <ryan@rfk.id.au>
     Thomas Kerpe <thomas@kerpe.net>
     Wiley Kestner <wiley.kestner@gmail.com>
@@ -298,8 +305,9 @@
     limodou
     Philip Lindborg <philip.lindborg@gmail.com>
     Simon Litchfield <simon@quo.com.au>
-    Daniel Lindsley <polarcowz@gmail.com>
+    Daniel Lindsley <daniel@toastdriven.com>
     Trey Long <trey@ktrl.com>
+    Laurent Luce <http://www.laurentluce.com>
     Martin Mahner <http://www.mahner.org/>
     Matt McClanahan <http://mmcc.cx/>
     Stanislaus Madueke
@@ -326,7 +334,6 @@
     Tobias McNulty <http://www.caktusgroup.com/blog>
     Zain Memon
     Christian Metts
-    Carl Meyer <carl@dirtcircle.com>
     michal@plovarna.cz
     Slawek Mikula <slawek dot mikula at gmail dot com>
     mitakummaa@gmail.com
@@ -334,7 +341,6 @@
     Andreas Mock <andreas.mock@web.de>
     Reza Mohammadi <reza@zeerak.ir>
     Aljosa Mohorovic <aljosa.mohorovic@gmail.com>
-    Ramiro Morales <rm0@gmx.net>
     Eric Moritz <http://eric.themoritzfamily.com/>
     msaelices <msaelices@gmail.com>
     Gregor Müllegger <gregor@muellegger.de>
diff -Nru python-django-1.2.3/debian/changelog python-django-1.2.4/debian/changelog
--- python-django-1.2.3/debian/changelog	2010-10-28 12:40:05.000000000 +0200
+++ python-django-1.2.4/debian/changelog	2010-12-31 15:04:33.000000000 +0100
@@ -1,3 +1,17 @@
+python-django (1.2.4-1) unstable; urgency=high
+
+  * New bugfix-only upstream release. It includes security fixes.
+    http://www.djangoproject.com/weblog/2010/dec/22/security/
+  * Drop patches merged upstream:
+    - debian/patches/05_fix_regression_tests.diff
+    - debian/patches/06_fix_regression_tests.diff
+  * Update 01_disable_url_verify_regression_tests.diff to cope with the
+    updated regressions tests.
+  * Update 03_manpage.diff and 04_hyphen-manpage.diff to cope with changes in
+    the manual page.
+
+ -- Raphaël Hertzog <hertzog@debian.org>  Fri, 31 Dec 2010 11:40:28 +0100
+
 python-django (1.2.3-2) unstable; urgency=low
 
   * Team upload.
diff -Nru python-django-1.2.3/debian/patches/01_disable_url_verify_regression_tests.diff python-django-1.2.4/debian/patches/01_disable_url_verify_regression_tests.diff
diff -Nru python-django-1.2.3/debian/patches/03_manpage.diff python-django-1.2.4/debian/patches/03_manpage.diff
--- python-django-1.2.3/debian/patches/03_manpage.diff	2010-10-28 12:31:58.000000000 +0200
+++ python-django-1.2.4/debian/patches/03_manpage.diff	2010-12-31 14:47:36.000000000 +0100
@@ -6,18 +6,17 @@
  .
  This is a Debian specific patch.
 
---- a/docs/man/django-admin.1	2007-09-08 10:47:27.516890257 +0100
-+++ b/docs/man/django-admin.1	2007-09-08 10:48:01.822845242 +0100
-@@ -1,9 +1,9 @@
+--- a/docs/man/django-admin.1
++++ b/docs/man/django-admin.1
+@@ -1,8 +1,8 @@
 -.TH "django-admin.py" "1" "March 2008" "Django Project" ""
 +.TH "django-admin" "1" "March 2008" "Django Project" ""
  .SH "NAME"
--django\-admin.py \- Utility script for the Django web framework
-+django\-admin \- Utility script for the Django web framework
+-django\-admin.py \- Utility script for the Django Web framework
++django\-admin \- Utility script for the Django Web framework
  .SH "SYNOPSIS"
 -.B django\-admin.py
 +.B django\-admin
  .I <action>
  .B [options]
  .sp
- .SH "DESCRIPTION"
diff -Nru python-django-1.2.3/debian/patches/04_hyphen-manpage.diff python-django-1.2.4/debian/patches/04_hyphen-manpage.diff
--- python-django-1.2.3/debian/patches/04_hyphen-manpage.diff	2010-10-28 12:31:58.000000000 +0200
+++ python-django-1.2.4/debian/patches/04_hyphen-manpage.diff	2010-12-31 14:47:36.000000000 +0100
@@ -4,14 +4,14 @@
  Fix a lintian I: message about improper usage of minus instead
  of hyphen.
 
---- Django-1.2-rc-1.orig/docs/man/django-admin.1	2010-05-06 08:41:22.000000000 +0100
-+++ Django-1.2-rc-1/docs/man/django-admin.1	2010-05-06 08:41:51.000000000 +0100
-@@ -153,7 +153,7 @@
+--- a/docs/man/django-admin.1
++++ b/docs/man/django-admin.1
+@@ -183,7 +183,7 @@ The domain of the message files (default
  .TP
  .I \-e, \-\-extension=EXTENSION
  The file extension(s) to examine (default: ".html", separate multiple
 -extensions with commas, or use -e multiple times).
 +extensions with commas, or use \-e multiple times).
  .TP
- .I \-e, \-\-symlinks
+ .I \-s, \-\-symlinks
  Follows symlinks to directories when examining source code and templates for
diff -Nru python-django-1.2.3/debian/patches/05_fix_regression_tests.diff python-django-1.2.4/debian/patches/05_fix_regression_tests.diff
diff -Nru python-django-1.2.3/debian/patches/06_fix_regression_tests.diff python-django-1.2.4/debian/patches/06_fix_regression_tests.diff
diff -Nru python-django-1.2.3/debian/patches/series python-django-1.2.4/debian/patches/series
--- python-django-1.2.3/debian/patches/series	2010-10-28 12:33:38.000000000 +0200
+++ python-django-1.2.4/debian/patches/series	2010-12-31 15:00:22.000000000 +0100
@@ -1,6 +1,4 @@
 01_disable_url_verify_regression_tests.diff
 03_manpage.diff
 04_hyphen-manpage.diff
-05_fix_regression_tests.diff
-06_fix_regression_tests.diff
 07_disable_url_verify_model_tests.diff
diff -Nru python-django-1.2.3/django/conf/global_settings.py python-django-1.2.4/django/conf/global_settings.py
--- python-django-1.2.3/django/conf/global_settings.py	2010-08-06 04:13:41.000000000 +0200
+++ python-django-1.2.4/django/conf/global_settings.py	2010-11-30 22:39:54.000000000 +0100
@@ -258,7 +258,7 @@
 # Default file storage mechanism that holds media.
 DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
 
-# Absolute path to the directory that holds media.
+# Absolute filesystem path to the directory that will hold user-uploaded files.
 # Example: "/home/media/media.lawrence.com/"
 MEDIA_ROOT = ''
 
@@ -292,34 +292,34 @@
 FORMAT_MODULE_PATH = None
 
 # Default formatting for date objects. See all available format strings here:
-# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
+# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
 DATE_FORMAT = 'N j, Y'
 
 # Default formatting for datetime objects. See all available format strings here:
-# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
+# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
 DATETIME_FORMAT = 'N j, Y, P'
 
 # Default formatting for time objects. See all available format strings here:
-# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
+# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
 TIME_FORMAT = 'P'
 
 # Default formatting for date objects when only the year and month are relevant.
 # See all available format strings here:
-# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
+# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
 YEAR_MONTH_FORMAT = 'F Y'
 
 # Default formatting for date objects when only the month and day are relevant.
 # See all available format strings here:
-# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
+# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
 MONTH_DAY_FORMAT = 'F j'
 
 # Default short formatting for date objects. See all available format strings here:
-# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
+# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
 SHORT_DATE_FORMAT = 'm/d/Y'
 
 # Default short formatting for datetime objects.
 # See all available format strings here:
-# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
+# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
 SHORT_DATETIME_FORMAT = 'm/d/Y P'
 
 # Default formats to be used when parsing dates from input boxes, in order
@@ -370,8 +370,8 @@
 # Boolean that sets whether to add thousand separator when formatting numbers
 USE_THOUSAND_SEPARATOR = False
 
-# Number of digits that will be togheter, when spliting them by THOUSAND_SEPARATOR
-# 0 means no grouping, 3 means splitting by thousands...
+# Number of digits that will be together, when spliting them by
+# THOUSAND_SEPARATOR. 0 means no grouping, 3 means splitting by thousands...
 NUMBER_GROUPING = 0
 
 # Thousand separator symbol
diff -Nru python-django-1.2.3/django/conf/locale/bg/formats.py python-django-1.2.4/django/conf/locale/bg/formats.py
--- python-django-1.2.3/django/conf/locale/bg/formats.py	2009-12-22 18:58:49.000000000 +0100
+++ python-django-1.2.4/django/conf/locale/bg/formats.py	2010-11-26 14:38:33.000000000 +0100
@@ -14,5 +14,5 @@
 # TIME_INPUT_FORMATS = 
 # DATETIME_INPUT_FORMATS = 
 DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = ' '
+THOUSAND_SEPARATOR = u' ' # Non-breaking space
 # NUMBER_GROUPING = 
diff -Nru python-django-1.2.3/django/conf/locale/en/formats.py python-django-1.2.4/django/conf/locale/en/formats.py
--- python-django-1.2.3/django/conf/locale/en/formats.py	2010-04-28 13:27:38.000000000 +0200
+++ python-django-1.2.4/django/conf/locale/en/formats.py	2010-11-26 14:38:33.000000000 +0100
@@ -32,7 +32,7 @@
     '%m/%d/%y %H:%M',        # '10/25/06 14:30'
     '%m/%d/%y',              # '10/25/06'
 )
-DECIMAL_SEPARATOR = '.'
-THOUSAND_SEPARATOR = ','
+DECIMAL_SEPARATOR = u'.'
+THOUSAND_SEPARATOR = u','
 NUMBER_GROUPING = 3
 
diff -Nru python-django-1.2.3/django/conf/locale/et/formats.py python-django-1.2.4/django/conf/locale/et/formats.py
--- python-django-1.2.3/django/conf/locale/et/formats.py	2009-12-22 18:58:49.000000000 +0100
+++ python-django-1.2.4/django/conf/locale/et/formats.py	2010-11-26 14:38:33.000000000 +0100
@@ -14,5 +14,5 @@
 # TIME_INPUT_FORMATS = 
 # DATETIME_INPUT_FORMATS = 
 DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = ' '
+THOUSAND_SEPARATOR = u' ' # Non-breaking space
 # NUMBER_GROUPING = 
diff -Nru python-django-1.2.3/django/conf/locale/fi/formats.py python-django-1.2.4/django/conf/locale/fi/formats.py
--- python-django-1.2.3/django/conf/locale/fi/formats.py	2009-12-22 18:58:49.000000000 +0100
+++ python-django-1.2.4/django/conf/locale/fi/formats.py	2010-11-26 14:38:33.000000000 +0100
@@ -14,5 +14,5 @@
 # TIME_INPUT_FORMATS = 
 # DATETIME_INPUT_FORMATS = 
 DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = ' '
+THOUSAND_SEPARATOR = u' ' # Non-breaking space
 # NUMBER_GROUPING = 
diff -Nru python-django-1.2.3/django/conf/locale/hu/formats.py python-django-1.2.4/django/conf/locale/hu/formats.py
--- python-django-1.2.3/django/conf/locale/hu/formats.py	2009-12-22 18:58:49.000000000 +0100
+++ python-django-1.2.4/django/conf/locale/hu/formats.py	2010-11-26 14:38:33.000000000 +0100
@@ -14,5 +14,5 @@
 # TIME_INPUT_FORMATS = 
 # DATETIME_INPUT_FORMATS = 
 DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = ' '
+THOUSAND_SEPARATOR = u' ' # Non-breaking space
 # NUMBER_GROUPING = 
diff -Nru python-django-1.2.3/django/conf/locale/lv/formats.py python-django-1.2.4/django/conf/locale/lv/formats.py
--- python-django-1.2.3/django/conf/locale/lv/formats.py	2010-05-12 13:07:50.000000000 +0200
+++ python-django-1.2.4/django/conf/locale/lv/formats.py	2010-11-26 14:38:33.000000000 +0100
@@ -32,5 +32,5 @@
     '%d.%m.%y',              # '25.10.06'
 )
 DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = ' '
+THOUSAND_SEPARATOR = u' ' # Non-breaking space
 NUMBER_GROUPING = 3
Les fichiers binaires /tmp/k4Rha17U_b/python-django-1.2.3/django/conf/locale/mn/LC_MESSAGES/django.mo et /tmp/JNRzoxahpQ/python-django-1.2.4/django/conf/locale/mn/LC_MESSAGES/django.mo sont différents.
diff -Nru python-django-1.2.3/django/conf/locale/mn/LC_MESSAGES/django.po python-django-1.2.4/django/conf/locale/mn/LC_MESSAGES/django.po
--- python-django-1.2.3/django/conf/locale/mn/LC_MESSAGES/django.po	2010-05-04 13:10:36.000000000 +0200
+++ python-django-1.2.4/django/conf/locale/mn/LC_MESSAGES/django.po	2010-11-26 14:38:53.000000000 +0100
@@ -1357,8 +1357,8 @@
 "Use '[algo]$[salt]$[hexdigest]' or use the <a href=\"password/\">change "
 "password form</a>."
 msgstr ""
-"Нууц үгийнхээ хэлбэр </a>-ийг өөрчлөхдөө '[algo]$[salt]$[hexdigest]' буюу <a "
-"href=\"password/\"> хэрэглэнэ үү."
+"Нууц үгийнхээ хэлбэр-ийг өөрчлөхдөө '[algo]$[salt]$[hexdigest]' буюу <a "
+"href=\"password/\">хэрэглэнэ үү</a>."
 
 #: contrib/auth/models.py:201
 msgid "staff status"
diff -Nru python-django-1.2.3/django/conf/locale/uk/formats.py python-django-1.2.4/django/conf/locale/uk/formats.py
--- python-django-1.2.3/django/conf/locale/uk/formats.py	2009-12-22 18:58:49.000000000 +0100
+++ python-django-1.2.4/django/conf/locale/uk/formats.py	2010-11-26 14:38:33.000000000 +0100
@@ -14,5 +14,5 @@
 # TIME_INPUT_FORMATS = 
 # DATETIME_INPUT_FORMATS = 
 DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = ' '
+THOUSAND_SEPARATOR = u' '
 # NUMBER_GROUPING = 
diff -Nru python-django-1.2.3/django/conf/project_template/settings.py python-django-1.2.4/django/conf/project_template/settings.py
--- python-django-1.2.3/django/conf/project_template/settings.py	2010-08-28 15:19:28.000000000 +0200
+++ python-django-1.2.4/django/conf/project_template/settings.py	2010-11-30 22:39:54.000000000 +0100
@@ -43,7 +43,7 @@
 # calendars according to the current locale
 USE_L10N = True
 
-# Absolute path to the directory that holds media.
+# Absolute filesystem path to the directory that will hold user-uploaded files.
 # Example: "/home/media/media.lawrence.com/"
 MEDIA_ROOT = ''
 
diff -Nru python-django-1.2.3/django/contrib/admin/helpers.py python-django-1.2.4/django/contrib/admin/helpers.py
--- python-django-1.2.3/django/contrib/admin/helpers.py	2010-04-30 17:24:07.000000000 +0200
+++ python-django-1.2.4/django/contrib/admin/helpers.py	2010-12-21 16:15:28.000000000 +0100
@@ -128,6 +128,9 @@
         attrs = classes and {'class': u' '.join(classes)} or {}
         return self.field.label_tag(contents=contents, attrs=attrs)
 
+    def errors(self):
+        return mark_safe(self.field.errors.as_ul())
+
 class AdminReadonlyField(object):
     def __init__(self, form, field, is_first, model_admin=None):
         label = label_for_field(field, form._meta.model, model_admin)
diff -Nru python-django-1.2.3/django/contrib/admin/media/css/base.css python-django-1.2.4/django/contrib/admin/media/css/base.css
--- python-django-1.2.3/django/contrib/admin/media/css/base.css	2010-08-28 15:19:49.000000000 +0200
+++ python-django-1.2.4/django/contrib/admin/media/css/base.css	2010-12-21 16:15:28.000000000 +0100
@@ -496,7 +496,7 @@
     background: #ffc;
 }
 
-.errors input, .errors select {
+.errors input, .errors select, .errors textarea {
     border: 1px solid red;
 }
 
diff -Nru python-django-1.2.3/django/contrib/admin/media/css/rtl.css python-django-1.2.4/django/contrib/admin/media/css/rtl.css
--- python-django-1.2.3/django/contrib/admin/media/css/rtl.css	2010-05-10 13:20:17.000000000 +0200
+++ python-django-1.2.4/django/contrib/admin/media/css/rtl.css	2010-12-13 14:56:18.000000000 +0100
@@ -82,6 +82,10 @@
 
 /* changelists styles */
 
+.change-list ul.toplinks li {
+    float: right;
+}
+
 .change-list .filtered {
     background: white url(../img/admin/changelist-bg_rtl.gif) top left repeat-y !important;
 }
diff -Nru python-django-1.2.3/django/contrib/admin/media/js/prepopulate.js python-django-1.2.4/django/contrib/admin/media/js/prepopulate.js
--- python-django-1.2.3/django/contrib/admin/media/js/prepopulate.js	2010-04-13 12:28:24.000000000 +0200
+++ python-django-1.2.4/django/contrib/admin/media/js/prepopulate.js	2010-10-10 11:58:24.000000000 +0200
@@ -4,7 +4,7 @@
             Depends on urlify.js
             Populates a selected field with the values of the dependent fields,
             URLifies and shortens the string. 
-            dependencies - selected jQuery object of dependent fields
+            dependencies - array of dependent fields id's 
             maxLength - maximum length of the URLify'd string 
         */
         return this.each(function() {
@@ -20,15 +20,15 @@
                 if (field.data('_changed') == true) return;
  
                 var values = [];
-                dependencies.each(function() {
-                    if ($(this).val().length > 0) {
-                        values.push($(this).val());
-                    }
-                });
+                $.each(dependencies, function(i, field) {
+                  if ($(field).val().length > 0) {
+                      values.push($(field).val());
+                  }
+                })
                 field.val(URLify(values.join(' '), maxLength));
             };
 
-            dependencies.keyup(populate).change(populate).focus(populate);
+            $(dependencies.join(',')).keyup(populate).change(populate).focus(populate);
         });
     };
 })(django.jQuery);
diff -Nru python-django-1.2.3/django/contrib/admin/media/js/prepopulate.min.js python-django-1.2.4/django/contrib/admin/media/js/prepopulate.min.js
--- python-django-1.2.3/django/contrib/admin/media/js/prepopulate.min.js	2010-04-13 12:28:44.000000000 +0200
+++ python-django-1.2.4/django/contrib/admin/media/js/prepopulate.min.js	2010-10-10 11:58:24.000000000 +0200
@@ -1 +1 @@
-(function(b){b.fn.prepopulate=function(d,f){return this.each(function(){var a=b(this);a.data("_changed",false);a.change(function(){a.data("_changed",true)});var c=function(){if(a.data("_changed")!=true){var e=[];d.each(function(){b(this).val().length>0&&e.push(b(this).val())});a.val(URLify(e.join(" "),f))}};d.keyup(c).change(c).focus(c)})}})(django.jQuery);
+(function(a){a.fn.prepopulate=function(d,g){return this.each(function(){var b=a(this);b.data("_changed",false);b.change(function(){b.data("_changed",true)});var c=function(){if(b.data("_changed")!=true){var e=[];a.each(d,function(h,f){a(f).val().length>0&&e.push(a(f).val())});b.val(URLify(e.join(" "),g))}};a(d.join(",")).keyup(c).change(c).focus(c)})}})(django.jQuery);
\ Pas de fin de ligne à la fin du fichier.
diff -Nru python-django-1.2.3/django/contrib/admin/options.py python-django-1.2.4/django/contrib/admin/options.py
--- python-django-1.2.3/django/contrib/admin/options.py	2010-09-07 22:59:28.000000000 +0200
+++ python-django-1.2.4/django/contrib/admin/options.py	2010-12-23 04:46:16.000000000 +0100
@@ -10,7 +10,9 @@
 from django.views.decorators.csrf import csrf_protect
 from django.core.exceptions import PermissionDenied, ValidationError
 from django.db import models, transaction
-from django.db.models.fields import BLANK_CHOICE_DASH
+from django.db.models.related import RelatedObject
+from django.db.models.fields import BLANK_CHOICE_DASH, FieldDoesNotExist
+from django.db.models.sql.constants import LOOKUP_SEP, QUERY_TERMS
 from django.http import Http404, HttpResponse, HttpResponseRedirect
 from django.shortcuts import get_object_or_404, render_to_response
 from django.utils.decorators import method_decorator
@@ -183,6 +185,30 @@
     def get_readonly_fields(self, request, obj=None):
         return self.readonly_fields
 
+    def lookup_allowed(self, lookup):
+        parts = lookup.split(LOOKUP_SEP)
+
+        # Last term in lookup is a query term (__exact, __startswith etc)
+        # This term can be ignored.
+        if len(parts) > 1 and parts[-1] in QUERY_TERMS:
+            parts.pop()
+
+        # Special case -- foo__id__exact and foo__id queries are implied
+        # if foo has been specificially included in the lookup list; so
+        # drop __id if it is the last part.
+        if len(parts) > 1 and parts[-1] == self.model._meta.pk.name:
+            parts.pop()
+
+        try:
+            self.model._meta.get_field_by_name(parts[0])
+        except FieldDoesNotExist:
+            # Lookups on non-existants fields are ok, since they're ignored
+            # later.
+            return True
+        else:
+            clean_lookup = LOOKUP_SEP.join(parts)
+            return clean_lookup in self.list_filter or clean_lookup == self.date_hierarchy
+
 class ModelAdmin(BaseModelAdmin):
     "Encapsulates all admin options and functionality for a given model."
 
diff -Nru python-django-1.2.3/django/contrib/admin/sites.py python-django-1.2.4/django/contrib/admin/sites.py
--- python-django-1.2.3/django/contrib/admin/sites.py	2010-05-04 16:00:30.000000000 +0200
+++ python-django-1.2.4/django/contrib/admin/sites.py	2010-12-02 02:02:11.000000000 +0100
@@ -327,13 +327,11 @@
                 try:
                     user = User.objects.get(email=username)
                 except (User.DoesNotExist, User.MultipleObjectsReturned):
-                    message = _("Usernames cannot contain the '@' character.")
+                    pass
                 else:
                     if user.check_password(password):
                         message = _("Your e-mail address is not your username."
                                     " Try '%s' instead.") % user.username
-                    else:
-                        message = _("Usernames cannot contain the '@' character.")
             return self.display_login_form(request, message)
 
         # The user data is correct; log in the user in and continue.
diff -Nru python-django-1.2.3/django/contrib/admin/templates/admin/base.html python-django-1.2.4/django/contrib/admin/templates/admin/base.html
--- python-django-1.2.3/django/contrib/admin/templates/admin/base.html	2010-06-23 15:20:38.000000000 +0200
+++ python-django-1.2.4/django/contrib/admin/templates/admin/base.html	2010-10-10 03:59:17.000000000 +0200
@@ -1,5 +1,5 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
-<html xmlns="http://www.w3.org/1999/xhtml"; lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
+<html xmlns="http://www.w3.org/1999/xhtml"; lang="{{ LANGUAGE_CODE|default:"en-us" }}" xml:lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
 <head>
 <title>{% block title %}{% endblock %}</title>
 <link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/base.css{% endblock %}" />
diff -Nru python-django-1.2.3/django/contrib/admin/templates/admin/edit_inline/stacked.html python-django-1.2.4/django/contrib/admin/templates/admin/edit_inline/stacked.html
--- python-django-1.2.3/django/contrib/admin/templates/admin/edit_inline/stacked.html	2010-05-04 09:23:02.000000000 +0200
+++ python-django-1.2.4/django/contrib/admin/templates/admin/edit_inline/stacked.html	2010-10-10 11:58:24.000000000 +0200
@@ -53,7 +53,10 @@
                 var field = $(this);
                 var input = field.find('input, select, textarea');
                 var dependency_list = input.data('dependency_list') || [];
-                var dependencies = row.find(dependency_list.join(',')).find('input, select, textarea');
+                var dependencies = [];
+                $.each(dependency_list, function(i, field_name) {
+                  dependencies.push('#' + row.find(field_name).find('input, select, textarea').attr('id'));
+                });
                 if (dependencies.length) {
                     input.prepopulate(dependencies, input.attr('maxlength'));
                 }
diff -Nru python-django-1.2.3/django/contrib/admin/templates/admin/edit_inline/tabular.html python-django-1.2.4/django/contrib/admin/templates/admin/edit_inline/tabular.html
--- python-django-1.2.3/django/contrib/admin/templates/admin/edit_inline/tabular.html	2010-05-04 09:23:02.000000000 +0200
+++ python-django-1.2.4/django/contrib/admin/templates/admin/edit_inline/tabular.html	2010-10-10 11:58:24.000000000 +0200
@@ -99,7 +99,10 @@
                 var field = $(this);
                 var input = field.find('input, select, textarea');
                 var dependency_list = input.data('dependency_list') || [];
-                var dependencies = row.find(dependency_list.join(',')).find('input, select, textarea');
+                var dependencies = [];
+                $.each(dependency_list, function(i, field_name) {
+                  dependencies.push('#' + row.find(field_name).find('input, select, textarea').attr('id'));
+                });
                 if (dependencies.length) {
                     input.prepopulate(dependencies, input.attr('maxlength'));
                 }
diff -Nru python-django-1.2.3/django/contrib/admin/templates/admin/includes/fieldset.html python-django-1.2.4/django/contrib/admin/templates/admin/includes/fieldset.html
--- python-django-1.2.3/django/contrib/admin/templates/admin/includes/fieldset.html	2010-04-05 17:37:43.000000000 +0200
+++ python-django-1.2.4/django/contrib/admin/templates/admin/includes/fieldset.html	2010-12-21 16:15:28.000000000 +0100
@@ -4,10 +4,11 @@
         <div class="description">{{ fieldset.description|safe }}</div>
     {% endif %}
     {% for line in fieldset %}
-        <div class="form-row{% if line.errors %} errors{% endif %}{% for field in line %} {{ field.field.name }}{% endfor %}">
-            {{ line.errors }}
+        <div class="form-row{% if line.fields|length_is:'1' and line.errors %} errors{% endif %}{% for field in line %} {{ field.field.name }}{% endfor %}">
+            {% if line.fields|length_is:'1' %}{{ line.errors }}{% endif %}
             {% for field in line %}
-                <div{% if not line.fields|length_is:"1" %} class="field-box"{% endif %}>
+                <div{% if not line.fields|length_is:'1' %} class="field-box{% if not field.is_readonly and field.errors %} errors{% endif %}"{% endif %}>
+                    {% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.errors }}{% endif %}
                     {% if field.is_checkbox %}
                         {{ field.field }}{{ field.label_tag }}
                     {% else %}
diff -Nru python-django-1.2.3/django/contrib/admin/templates/admin/prepopulated_fields_js.html python-django-1.2.4/django/contrib/admin/templates/admin/prepopulated_fields_js.html
--- python-django-1.2.3/django/contrib/admin/templates/admin/prepopulated_fields_js.html	2010-04-13 12:28:24.000000000 +0200
+++ python-django-1.2.4/django/contrib/admin/templates/admin/prepopulated_fields_js.html	2010-10-10 11:58:24.000000000 +0200
@@ -17,7 +17,7 @@
 
     $('.empty-form .{{ field.field.name }}').addClass('prepopulated_field');
     $(field.id).data('dependency_list', field['dependency_list'])
-               .prepopulate($(field['dependency_ids'].join(',')), field.maxLength);
+               .prepopulate(field['dependency_ids'], field.maxLength);
 {% endfor %}
 })(django.jQuery);
 </script>
diff -Nru python-django-1.2.3/django/contrib/admin/templates/admin/template_validator.html python-django-1.2.4/django/contrib/admin/templates/admin/template_validator.html
--- python-django-1.2.3/django/contrib/admin/templates/admin/template_validator.html	2009-10-27 00:23:07.000000000 +0100
+++ python-django-1.2.4/django/contrib/admin/templates/admin/template_validator.html	1970-01-01 01:00:00.000000000 +0100
@@ -1,31 +0,0 @@
-{% extends "admin/base_site.html" %}
-
-{% block content %}
-
-<div id="content-main">
-
-<form action="" method="post">{% csrf_token %}
-
-{% if form.errors %}
-<p class="errornote">Your template had {{ form.errors|length }} error{{ form.errors|pluralize }}:</p>
-{% endif %}
-
-<fieldset class="module aligned">
-<div class="form-row{% if form.errors.site %} error{% endif %} required">
-    {{ form.errors.site }}
-    <h4><label for="id_site">{{ form.site.label }}:</label> {{ form.site }}</h4>
-</div>
-<div class="form-row{% if form.errors.template %} error{% endif %} required">
-    {{ form.errors.template }}
-    <h4><label for="id_template">{{ form.template.label }}:</label> {{ form.template }}</h4>
-</div>
-</fieldset>
-
-<div class="submit-row">
-    <input type="submit" value="Check for errors" class="default" />
-</div>
-
-</form>
-</div>
-
-{% endblock %}
diff -Nru python-django-1.2.3/django/contrib/admin/util.py python-django-1.2.4/django/contrib/admin/util.py
--- python-django-1.2.3/django/contrib/admin/util.py	2010-04-11 10:35:04.000000000 +0200
+++ python-django-1.2.4/django/contrib/admin/util.py	2010-10-17 17:40:41.000000000 +0200
@@ -1,5 +1,6 @@
 from django.core.exceptions import ObjectDoesNotExist
 from django.db import models
+from django.db.models.related import RelatedObject
 from django.forms.forms import pretty_name
 from django.utils import formats
 from django.utils.html import escape
@@ -279,7 +280,11 @@
 def label_for_field(name, model, model_admin=None, return_attr=False):
     attr = None
     try:
-        label = model._meta.get_field_by_name(name)[0].verbose_name
+        field = model._meta.get_field_by_name(name)[0]
+        if isinstance(field, RelatedObject):
+            label = field.opts.verbose_name
+        else:
+            label = field.verbose_name
     except models.FieldDoesNotExist:
         if name == "__unicode__":
             label = force_unicode(model._meta.verbose_name)
diff -Nru python-django-1.2.3/django/contrib/admin/views/decorators.py python-django-1.2.4/django/contrib/admin/views/decorators.py
--- python-django-1.2.3/django/contrib/admin/views/decorators.py	2010-05-04 16:00:30.000000000 +0200
+++ python-django-1.2.4/django/contrib/admin/views/decorators.py	2010-12-02 02:02:11.000000000 +0100
@@ -60,10 +60,6 @@
                 users = list(User.objects.filter(email=username))
                 if len(users) == 1 and users[0].check_password(password):
                     message = _("Your e-mail address is not your username. Try '%s' instead.") % users[0].username
-                else:
-                    # Either we cannot find the user, or if more than 1
-                    # we cannot guess which user is the correct one.
-                    message = _("Usernames cannot contain the '@' character.")
             return _display_login_form(request, message)
 
         # The user data is correct; log in the user in and continue.
diff -Nru python-django-1.2.3/django/contrib/admin/views/main.py python-django-1.2.4/django/contrib/admin/views/main.py
--- python-django-1.2.3/django/contrib/admin/views/main.py	2010-05-04 16:00:30.000000000 +0200
+++ python-django-1.2.4/django/contrib/admin/views/main.py	2010-12-23 04:46:16.000000000 +0100
@@ -1,6 +1,7 @@
 from django.contrib.admin.filterspecs import FilterSpec
 from django.contrib.admin.options import IncorrectLookupParameters
 from django.contrib.admin.util import quote
+from django.core.exceptions import SuspiciousOperation
 from django.core.paginator import Paginator, InvalidPage
 from django.db import models
 from django.db.models.query import QuerySet
@@ -116,7 +117,7 @@
             try:
                 result_list = paginator.page(self.page_num+1).object_list
             except InvalidPage:
-                result_list = ()
+                raise IncorrectLookupParameters
 
         self.result_count = result_count
         self.full_result_count = full_result_count
@@ -187,13 +188,18 @@
                 else:
                     lookup_params[key] = True
 
+            if not self.model_admin.lookup_allowed(key):
+                raise SuspiciousOperation(
+                    "Filtering by %s not allowed" % key
+                )
+
         # Apply lookup parameters from the query string.
         try:
             qs = qs.filter(**lookup_params)
         # Naked except! Because we don't have any other way of validating "params".
         # They might be invalid if the keyword arguments are incorrect, or if the
         # values are not in the correct type, so we might get FieldError, ValueError,
-        # ValicationError, or ? from a custom field that raises yet something else 
+        # ValicationError, or ? from a custom field that raises yet something else
         # when handed impossible data.
         except:
             raise IncorrectLookupParameters
diff -Nru python-django-1.2.3/django/contrib/admin/views/template.py python-django-1.2.4/django/contrib/admin/views/template.py
--- python-django-1.2.3/django/contrib/admin/views/template.py	2010-01-10 19:36:20.000000000 +0100
+++ python-django-1.2.4/django/contrib/admin/views/template.py	1970-01-01 01:00:00.000000000 +0100
@@ -1,79 +0,0 @@
-from django import template, forms
-from django.contrib.admin.views.decorators import staff_member_required
-from django.template import loader
-from django.shortcuts import render_to_response
-from django.contrib.sites.models import Site
-from django.conf import settings
-from django.utils.importlib import import_module
-from django.utils.translation import ugettext_lazy as _
-from django.contrib import messages
-
-
-def template_validator(request):
-    """
-    Displays the template validator form, which finds and displays template
-    syntax errors.
-    """
-    # get a dict of {site_id : settings_module} for the validator
-    settings_modules = {}
-    for mod in settings.ADMIN_FOR:
-        settings_module = import_module(mod)
-        settings_modules[settings_module.SITE_ID] = settings_module
-    site_list = Site.objects.in_bulk(settings_modules.keys()).values()
-    if request.POST:
-        form = TemplateValidatorForm(settings_modules, site_list,
-                                     data=request.POST)
-        if form.is_valid():
-            messages.info(request, 'The template is valid.')
-    else:
-        form = TemplateValidatorForm(settings_modules, site_list)
-    return render_to_response('admin/template_validator.html', {
-        'title': 'Template validator',
-        'form': form,
-    }, context_instance=template.RequestContext(request))
-template_validator = staff_member_required(template_validator)
-
-
-class TemplateValidatorForm(forms.Form):
-    site = forms.ChoiceField(_('site'))
-    template = forms.CharField(
-        _('template'), widget=forms.Textarea({'rows': 25, 'cols': 80}))
-
-    def __init__(self, settings_modules, site_list, *args, **kwargs):
-        self.settings_modules = settings_modules
-        super(TemplateValidatorForm, self).__init__(*args, **kwargs)
-        self.fields['site'].choices = [(s.id, s.name) for s in site_list]
-
-    def clean_template(self):
-        # Get the settings module. If the site isn't set, we don't raise an
-        # error since the site field will.
-        try:
-            site_id = int(self.cleaned_data.get('site', None))
-        except (ValueError, TypeError):
-            return
-        settings_module = self.settings_modules.get(site_id, None)
-        if settings_module is None:
-            return
-
-        # So that inheritance works in the site's context, register a new
-        # function for "extends" that uses the site's TEMPLATE_DIRS instead.
-        def new_do_extends(parser, token):
-            node = loader.do_extends(parser, token)
-            node.template_dirs = settings_module.TEMPLATE_DIRS
-            return node
-        register = template.Library()
-        register.tag('extends', new_do_extends)
-        template.builtins.append(register)
-
-        # Now validate the template using the new TEMPLATE_DIRS, making sure to
-        # reset the extends function in any case.
-        error = None
-        template_string = self.cleaned_data['template']
-        try:
-            tmpl = loader.get_template_from_string(template_string)
-            tmpl.render(template.Context({}))
-        except template.TemplateSyntaxError, e:
-            error = e
-        template.builtins.remove(register)
-        if error:
-            raise forms.ValidationError(e.args)
diff -Nru python-django-1.2.3/django/contrib/admin/widgets.py python-django-1.2.4/django/contrib/admin/widgets.py
--- python-django-1.2.3/django/contrib/admin/widgets.py	2010-05-21 16:07:54.000000000 +0200
+++ python-django-1.2.4/django/contrib/admin/widgets.py	2010-10-01 04:40:25.000000000 +0200
@@ -154,22 +154,21 @@
         key = self.rel.get_related_field().name
         try:
             obj = self.rel.to._default_manager.using(self.db).get(**{key: value})
-        except self.rel.to.DoesNotExist:
+            return '&nbsp;<strong>%s</strong>' % escape(truncate_words(obj, 14))
+        except (ValueError, self.rel.to.DoesNotExist):
             return ''
-        return '&nbsp;<strong>%s</strong>' % escape(truncate_words(obj, 14))
 
 class ManyToManyRawIdWidget(ForeignKeyRawIdWidget):
     """
     A Widget for displaying ManyToMany ids in the "raw_id" interface rather than
     in a <select multiple> box.
     """
-    def __init__(self, rel, attrs=None, using=None):
-        super(ManyToManyRawIdWidget, self).__init__(rel, attrs, using=None)
-
     def render(self, name, value, attrs=None):
+        if attrs is None:
+            attrs = {}
         attrs['class'] = 'vManyToManyRawIdAdminField'
         if value:
-            value = ','.join([str(v) for v in value])
+            value = ','.join([force_unicode(v) for v in value])
         else:
             value = ''
         return super(ManyToManyRawIdWidget, self).render(name, value, attrs)
diff -Nru python-django-1.2.3/django/contrib/auth/admin.py python-django-1.2.4/django/contrib/auth/admin.py
--- python-django-1.2.3/django/contrib/auth/admin.py	2010-02-09 16:02:39.000000000 +0100
+++ python-django-1.2.4/django/contrib/auth/admin.py	2010-11-20 00:04:48.000000000 +0100
@@ -1,4 +1,3 @@
-from django import template
 from django.db import transaction
 from django.conf import settings
 from django.contrib import admin
@@ -137,6 +136,17 @@
             'root_path': self.admin_site.root_path,
         }, context_instance=RequestContext(request))
 
+    def response_add(self, request, obj, post_url_continue='../%s/'):
+        """
+        Determines the HttpResponse for the add_view stage. It mostly defers to
+        its superclass implementation but is customized because the User model
+        has a slightly different workflow.
+        """
+        if '_addanother' not in request.POST:
+            # The 'Save' button should act like the 'Save and continue
+            # editing' button
+            request.POST['_continue'] = 1
+        return super(UserAdmin, self).response_add(request, obj, post_url_continue)
 
 admin.site.register(Group, GroupAdmin)
 admin.site.register(User, UserAdmin)
diff -Nru python-django-1.2.3/django/contrib/auth/backends.py python-django-1.2.4/django/contrib/auth/backends.py
--- python-django-1.2.3/django/contrib/auth/backends.py	2010-05-04 16:00:30.000000000 +0200
+++ python-django-1.2.4/django/contrib/auth/backends.py	2010-12-04 08:05:39.000000000 +0100
@@ -25,9 +25,11 @@
         groups.
         """
         if not hasattr(user_obj, '_group_perm_cache'):
-            perms = Permission.objects.filter(group__user=user_obj
-                ).values_list('content_type__app_label', 'codename'
-                ).order_by()
+            if user_obj.is_superuser:
+                perms = Permission.objects.all()
+            else:
+                perms = Permission.objects.filter(group__user=user_obj)
+            perms = perms.values_list('content_type__app_label', 'codename').order_by()
             user_obj._group_perm_cache = set(["%s.%s" % (ct, name) for ct, name in perms])
         return user_obj._group_perm_cache
 
diff -Nru python-django-1.2.3/django/contrib/auth/forms.py python-django-1.2.4/django/contrib/auth/forms.py
--- python-django-1.2.3/django/contrib/auth/forms.py	2010-09-10 01:43:01.000000000 +0200
+++ python-django-1.2.4/django/contrib/auth/forms.py	2010-10-05 22:31:02.000000000 +0200
@@ -1,7 +1,7 @@
 from django.contrib.auth.models import User
 from django.contrib.auth import authenticate
 from django.contrib.auth.tokens import default_token_generator
-from django.contrib.sites.models import Site
+from django.contrib.sites.models import get_current_site
 from django.template import Context, loader
 from django import forms
 from django.utils.translation import ugettext_lazy as _
@@ -117,14 +117,14 @@
         return email
 
     def save(self, domain_override=None, email_template_name='registration/password_reset_email.html',
-             use_https=False, token_generator=default_token_generator):
+             use_https=False, token_generator=default_token_generator, request=None):
         """
         Generates a one-use only link for resetting password and sends to the user
         """
         from django.core.mail import send_mail
         for user in self.users_cache:
             if not domain_override:
-                current_site = Site.objects.get_current()
+                current_site = get_current_site(request)
                 site_name = current_site.name
                 domain = current_site.domain
             else:
diff -Nru python-django-1.2.3/django/contrib/auth/__init__.py python-django-1.2.4/django/contrib/auth/__init__.py
--- python-django-1.2.3/django/contrib/auth/__init__.py	2010-01-28 02:47:23.000000000 +0100
+++ python-django-1.2.4/django/contrib/auth/__init__.py	2010-12-04 08:05:04.000000000 +0100
@@ -39,6 +39,8 @@
     backends = []
     for backend_path in settings.AUTHENTICATION_BACKENDS:
         backends.append(load_backend(backend_path))
+    if not backends:
+        raise ImproperlyConfigured('No authentication backends have been defined. Does AUTHENTICATION_BACKENDS contain anything?')
     return backends
 
 def authenticate(**credentials):
diff -Nru python-django-1.2.3/django/contrib/auth/management/commands/createsuperuser.py python-django-1.2.4/django/contrib/auth/management/commands/createsuperuser.py
--- python-django-1.2.3/django/contrib/auth/management/commands/createsuperuser.py	2010-05-21 16:08:49.000000000 +0200
+++ python-django-1.2.4/django/contrib/auth/management/commands/createsuperuser.py	2010-11-17 21:30:44.000000000 +0100
@@ -3,7 +3,6 @@
 """
 
 import getpass
-import os
 import re
 import sys
 from optparse import make_option
@@ -30,10 +29,10 @@
         make_option('--email', dest='email', default=None,
             help='Specifies the email address for the superuser.'),
         make_option('--noinput', action='store_false', dest='interactive', default=True,
-            help='Tells Django to NOT prompt the user for input of any kind. '    \
-                 'You must use --username and --email with --noinput, and '      \
-                 'superusers created with --noinput will not be able to log in '  \
-                 'until they\'re given a valid password.'),
+            help=('Tells Django to NOT prompt the user for input of any kind. '
+                  'You must use --username and --email with --noinput, and '
+                  'superusers created with --noinput will not be able to log '
+                  'in until they\'re given a valid password.')),
     )
     help = 'Used to create a superuser.'
 
@@ -41,7 +40,8 @@
         username = options.get('username', None)
         email = options.get('email', None)
         interactive = options.get('interactive')
-        
+        verbosity = int(options.get('verbosity', 1))
+
         # Do quick and dirty validation if --noinput
         if not interactive:
             if not username or not email:
@@ -57,12 +57,11 @@
 
         # Try to determine the current system user's username to use as a default.
         try:
-            import pwd
-            default_username = pwd.getpwuid(os.getuid())[0].replace(' ', '').lower()
+            default_username = getpass.getuser().replace(' ', '').lower()
         except (ImportError, KeyError):
-            # KeyError will be raised by getpwuid() if there is no
-            # corresponding entry in the /etc/passwd file (a very restricted
-            # chroot environment, for example).
+            # KeyError will be raised by os.getpwuid() (called by getuser())
+            # if there is no corresponding entry in the /etc/passwd file
+            # (a very restricted chroot environment, for example).
             default_username = ''
 
         # Determine whether the default username is taken, so we don't display
@@ -79,7 +78,7 @@
         # try/except to trap for a keyboard interrupt and exit gracefully.
         if interactive:
             try:
-            
+
                 # Get a username
                 while 1:
                     if not username:
@@ -100,7 +99,7 @@
                     else:
                         sys.stderr.write("Error: That username is already taken.\n")
                         username = None
-            
+
                 # Get an email
                 while 1:
                     if not email:
@@ -112,7 +111,7 @@
                         email = None
                     else:
                         break
-            
+
                 # Get a password
                 while 1:
                     if not password:
@@ -130,6 +129,8 @@
             except KeyboardInterrupt:
                 sys.stderr.write("\nOperation cancelled.\n")
                 sys.exit(1)
-        
+
         User.objects.create_superuser(username, email, password)
-        print "Superuser created successfully."
+        if verbosity >= 1:
+          self.stdout.write("Superuser created successfully.\n")
+
diff -Nru python-django-1.2.3/django/contrib/auth/middleware.py python-django-1.2.4/django/contrib/auth/middleware.py
--- python-django-1.2.3/django/contrib/auth/middleware.py	2009-03-15 06:54:28.000000000 +0100
+++ python-django-1.2.4/django/contrib/auth/middleware.py	2010-10-09 10:25:01.000000000 +0200
@@ -19,7 +19,7 @@
 
 class RemoteUserMiddleware(object):
     """
-    Middleware for utilizing web-server-provided authentication.
+    Middleware for utilizing Web-server-provided authentication.
 
     If request.user is not authenticated, then this middleware attempts to
     authenticate the username passed in the ``REMOTE_USER`` request header.
diff -Nru python-django-1.2.3/django/contrib/auth/models.py python-django-1.2.4/django/contrib/auth/models.py
--- python-django-1.2.3/django/contrib/auth/models.py	2010-03-01 21:30:44.000000000 +0100
+++ python-django-1.2.4/django/contrib/auth/models.py	2010-10-09 05:36:46.000000000 +0200
@@ -106,7 +106,6 @@
         """
         Creates and saves a User with the given username, e-mail and password.
         """
-
         now = datetime.datetime.now()
         
         # Normalize the address by lowercasing the domain part of the email
@@ -122,10 +121,7 @@
                          is_active=True, is_superuser=False, last_login=now,
                          date_joined=now)
 
-        if password:
-            user.set_password(password)
-        else:
-            user.set_unusable_password()
+        user.set_password(password)
         user.save(using=self._db)
         return user
 
@@ -238,11 +234,14 @@
         return full_name.strip()
 
     def set_password(self, raw_password):
-        import random
-        algo = 'sha1'
-        salt = get_hexdigest(algo, str(random.random()), str(random.random()))[:5]
-        hsh = get_hexdigest(algo, salt, raw_password)
-        self.password = '%s$%s$%s' % (algo, salt, hsh)
+        if raw_password is None:
+            self.set_unusable_password()
+        else:
+            import random
+            algo = 'sha1'
+            salt = get_hexdigest(algo, str(random.random()), str(random.random()))[:5]
+            hsh = get_hexdigest(algo, salt, raw_password)
+            self.password = '%s$%s$%s' % (algo, salt, hsh)
 
     def check_password(self, raw_password):
         """
@@ -265,7 +264,11 @@
         self.password = UNUSABLE_PASSWORD
 
     def has_usable_password(self):
-        return self.password != UNUSABLE_PASSWORD
+        if self.password is None \
+            or self.password == UNUSABLE_PASSWORD:
+            return False
+        else:
+            return True
 
     def get_group_permissions(self, obj=None):
         """
diff -Nru python-django-1.2.3/django/contrib/auth/tests/auth_backends.py python-django-1.2.4/django/contrib/auth/tests/auth_backends.py
diff -Nru python-django-1.2.3/django/contrib/auth/tests/basic.py python-django-1.2.4/django/contrib/auth/tests/basic.py
diff -Nru python-django-1.2.3/django/contrib/auth/tests/__init__.py python-django-1.2.4/django/contrib/auth/tests/__init__.py
diff -Nru python-django-1.2.3/django/contrib/auth/tests/templates/registration/logged_out.html python-django-1.2.4/django/contrib/auth/tests/templates/registration/logged_out.html
diff -Nru python-django-1.2.3/django/contrib/auth/tests/templates/registration/password_change_form.html python-django-1.2.4/django/contrib/auth/tests/templates/registration/password_change_form.html
diff -Nru python-django-1.2.3/django/contrib/auth/tests/tokens.py python-django-1.2.4/django/contrib/auth/tests/tokens.py
diff -Nru python-django-1.2.3/django/contrib/auth/tests/urls.py python-django-1.2.4/django/contrib/auth/tests/urls.py
diff -Nru python-django-1.2.3/django/contrib/auth/tests/views.py python-django-1.2.4/django/contrib/auth/tests/views.py
diff -Nru python-django-1.2.3/django/contrib/auth/urls.py python-django-1.2.4/django/contrib/auth/urls.py
--- python-django-1.2.3/django/contrib/auth/urls.py	2008-08-23 20:20:49.000000000 +0200
+++ python-django-1.2.4/django/contrib/auth/urls.py	2010-12-23 04:46:37.000000000 +0100
@@ -1,4 +1,4 @@
-# These URLs are normally mapped to /admin/urls.py. This URLs file is 
+# These URLs are normally mapped to /admin/urls.py. This URLs file is
 # provided as a convenience to those who want to deploy these URLs elsewhere.
 # This file is also used to provide a reliable view deployment for test purposes.
 
@@ -11,7 +11,7 @@
     (r'^password_change/done/$', 'django.contrib.auth.views.password_change_done'),
     (r'^password_reset/$', 'django.contrib.auth.views.password_reset'),
     (r'^password_reset/done/$', 'django.contrib.auth.views.password_reset_done'),
-    (r'^reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm'),
+    (r'^reset/(?P<uidb36>[0-9A-Za-z]{1,13})-(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', 'django.contrib.auth.views.password_reset_confirm'),
     (r'^reset/done/$', 'django.contrib.auth.views.password_reset_complete'),
 )
 
diff -Nru python-django-1.2.3/django/contrib/auth/views.py python-django-1.2.4/django/contrib/auth/views.py
--- python-django-1.2.3/django/contrib/auth/views.py	2010-03-01 20:58:53.000000000 +0100
+++ python-django-1.2.4/django/contrib/auth/views.py	2010-12-13 14:57:54.000000000 +0100
@@ -10,7 +10,7 @@
 from django.views.decorators.csrf import csrf_protect
 from django.core.urlresolvers import reverse
 from django.shortcuts import render_to_response, get_object_or_404
-from django.contrib.sites.models import Site, RequestSite
+from django.contrib.sites.models import get_current_site
 from django.http import HttpResponseRedirect, Http404
 from django.template import RequestContext
 from django.utils.http import urlquote, base36_to_int
@@ -26,21 +26,21 @@
     """Displays the login form and handles the login action."""
 
     redirect_to = request.REQUEST.get(redirect_field_name, '')
-    
+
     if request.method == "POST":
         form = authentication_form(data=request.POST)
         if form.is_valid():
             # Light security check -- make sure redirect_to isn't garbage.
             if not redirect_to or ' ' in redirect_to:
                 redirect_to = settings.LOGIN_REDIRECT_URL
-            
-            # Heavier security check -- redirects to http://example.com should 
-            # not be allowed, but things like /view/?param=http://example.com 
+
+            # Heavier security check -- redirects to http://example.com should
+            # not be allowed, but things like /view/?param=http://example.com
             # should be allowed. This regex checks if there is a '//' *before* a
             # question mark.
             elif '//' in redirect_to and re.match(r'[^\?]*//', redirect_to):
                     redirect_to = settings.LOGIN_REDIRECT_URL
-            
+
             # Okay, security checks complete. Log the user in.
             auth_login(request, form.get_user())
 
@@ -51,14 +51,11 @@
 
     else:
         form = authentication_form(request)
-    
+
     request.session.set_test_cookie()
-    
-    if Site._meta.installed:
-        current_site = Site.objects.get_current()
-    else:
-        current_site = RequestSite(request)
-    
+
+    current_site = get_current_site(request)
+
     return render_to_response(template_name, {
         'form': form,
         redirect_field_name: redirect_to,
@@ -75,7 +72,10 @@
         if redirect_to:
             return HttpResponseRedirect(redirect_to)
         else:
+            current_site = get_current_site(request)
             return render_to_response(template_name, {
+                'site': current_site,
+                'site_name': current_site.name,
                 'title': _('Logged out')
             }, context_instance=RequestContext(request))
     else:
@@ -97,7 +97,7 @@
 # 4 views for password reset:
 # - password_reset sends the mail
 # - password_reset_done shows a success message for the above
-# - password_reset_confirm checks the link the user clicked and 
+# - password_reset_confirm checks the link the user clicked and
 #   prompts for a new password
 # - password_reset_complete shows a success message for the above
 
@@ -114,12 +114,10 @@
             opts = {}
             opts['use_https'] = request.is_secure()
             opts['token_generator'] = token_generator
+            opts['email_template_name'] = email_template_name
+            opts['request'] = request
             if is_admin_site:
                 opts['domain_override'] = request.META['HTTP_HOST']
-            else:
-                opts['email_template_name'] = email_template_name
-                if not Site._meta.installed:
-                    opts['domain_override'] = RequestSite(request).domain
             form.save(**opts)
             return HttpResponseRedirect(post_reset_redirect)
     else:
@@ -131,7 +129,7 @@
 def password_reset_done(request, template_name='registration/password_reset_done.html'):
     return render_to_response(template_name, context_instance=RequestContext(request))
 
-# Doesn't need csrf_protect since no-one can guess the URL
+@never_cache
 def password_reset_confirm(request, uidb36=None, token=None, template_name='registration/password_reset_confirm.html',
                            token_generator=default_token_generator, set_password_form=SetPasswordForm,
                            post_reset_redirect=None):
@@ -144,13 +142,13 @@
         post_reset_redirect = reverse('django.contrib.auth.views.password_reset_complete')
     try:
         uid_int = base36_to_int(uidb36)
-    except ValueError:
-        raise Http404
+        user = User.objects.get(id=uid_int)
+    except (ValueError, User.DoesNotExist):
+        user = None
 
-    user = get_object_or_404(User, id=uid_int)
     context_instance = RequestContext(request)
 
-    if token_generator.check_token(user, token):
+    if user is not None and token_generator.check_token(user, token):
         context_instance['validlink'] = True
         if request.method == 'POST':
             form = set_password_form(user, request.POST)
diff -Nru python-django-1.2.3/django/contrib/comments/admin.py python-django-1.2.4/django/contrib/comments/admin.py
--- python-django-1.2.3/django/contrib/comments/admin.py	2010-03-12 16:32:06.000000000 +0100
+++ python-django-1.2.4/django/contrib/comments/admin.py	2010-12-21 16:14:28.000000000 +0100
@@ -28,11 +28,13 @@
     def get_actions(self, request):
         actions = super(CommentsAdmin, self).get_actions(request)
         # Only superusers should be able to delete the comments from the DB.
-        if not request.user.is_superuser:
+        if not request.user.is_superuser and 'delete_selected' in actions:
             actions.pop('delete_selected')
         if not request.user.has_perm('comments.can_moderate'):
-            actions.pop('approve_comments')
-            actions.pop('remove_comments')
+            if 'approve_comments' in actions:
+                actions.pop('approve_comments')
+            if 'remove_comments' in actions:
+                actions.pop('remove_comments')
         return actions
 
     def flag_comments(self, request, queryset):
diff -Nru python-django-1.2.3/django/contrib/comments/moderation.py python-django-1.2.4/django/contrib/comments/moderation.py
--- python-django-1.2.3/django/contrib/comments/moderation.py	2010-03-01 21:18:52.000000000 +0100
+++ python-django-1.2.4/django/contrib/comments/moderation.py	2010-10-09 10:25:01.000000000 +0200
@@ -16,7 +16,7 @@
 -------
 
 First, we define a simple model class which might represent entries in
-a weblog::
+a Weblog::
 
     from django.db import models
 
diff -Nru python-django-1.2.3/django/contrib/comments/templates/comments/400-debug.html python-django-1.2.4/django/contrib/comments/templates/comments/400-debug.html
--- python-django-1.2.3/django/contrib/comments/templates/comments/400-debug.html	2008-08-28 21:46:33.000000000 +0200
+++ python-django-1.2.4/django/contrib/comments/templates/comments/400-debug.html	2010-09-14 16:24:15.000000000 +0200
@@ -1,5 +1,5 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
-<html lang="en">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml"; lang="en">
 <head>
   <meta http-equiv="content-type" content="text/html; charset=utf-8" />
   <title>Comment post not allowed (400)</title>
diff -Nru python-django-1.2.3/django/contrib/comments/templates/comments/approve.html python-django-1.2.4/django/contrib/comments/templates/comments/approve.html
--- python-django-1.2.3/django/contrib/comments/templates/comments/approve.html	2009-10-27 00:23:07.000000000 +0100
+++ python-django-1.2.4/django/contrib/comments/templates/comments/approve.html	2010-09-14 16:24:15.000000000 +0200
@@ -7,7 +7,7 @@
   <h1>{% trans "Really make this comment public?" %}</h1>
   <blockquote>{{ comment|linebreaks }}</blockquote>
   <form action="." method="post">{% csrf_token %}
-    {% if next %}<input type="hidden" name="next" value="{{ next }}" id="next" />{% endif %}
+    {% if next %}<div><input type="hidden" name="next" value="{{ next }}" id="next" /></div>{% endif %}
     <p class="submit">
       <input type="submit" name="submit" value="{% trans "Approve" %}" /> or <a href="{{ comment.get_absolute_url }}">cancel</a>
     </p>
diff -Nru python-django-1.2.3/django/contrib/comments/templates/comments/base.html python-django-1.2.4/django/contrib/comments/templates/comments/base.html
--- python-django-1.2.3/django/contrib/comments/templates/comments/base.html	2008-08-26 00:14:22.000000000 +0200
+++ python-django-1.2.4/django/contrib/comments/templates/comments/base.html	2010-09-14 23:42:06.000000000 +0200
@@ -1,5 +1,5 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html lang="en">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";>
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   <title>{% block title %}{% endblock %}</title>
diff -Nru python-django-1.2.3/django/contrib/comments/templates/comments/delete.html python-django-1.2.4/django/contrib/comments/templates/comments/delete.html
--- python-django-1.2.3/django/contrib/comments/templates/comments/delete.html	2009-10-27 00:23:07.000000000 +0100
+++ python-django-1.2.4/django/contrib/comments/templates/comments/delete.html	2010-09-14 16:24:15.000000000 +0200
@@ -7,7 +7,7 @@
 <h1>{% trans "Really remove this comment?" %}</h1>
   <blockquote>{{ comment|linebreaks }}</blockquote>
   <form action="." method="post">{% csrf_token %}
-    {% if next %}<input type="hidden" name="next" value="{{ next }}" id="next" />{% endif %}
+    {% if next %}<div><input type="hidden" name="next" value="{{ next }}" id="next" /></div>{% endif %}
     <p class="submit">
     <input type="submit" name="submit" value="{% trans "Remove" %}" /> or <a href="{{ comment.get_absolute_url }}">cancel</a>
     </p>
diff -Nru python-django-1.2.3/django/contrib/comments/templates/comments/flag.html python-django-1.2.4/django/contrib/comments/templates/comments/flag.html
--- python-django-1.2.3/django/contrib/comments/templates/comments/flag.html	2009-10-27 00:23:07.000000000 +0100
+++ python-django-1.2.4/django/contrib/comments/templates/comments/flag.html	2010-09-14 16:24:15.000000000 +0200
@@ -7,7 +7,7 @@
 <h1>{% trans "Really flag this comment?" %}</h1>
   <blockquote>{{ comment|linebreaks }}</blockquote>
   <form action="." method="post">{% csrf_token %}
-    {% if next %}<input type="hidden" name="next" value="{{ next }}" id="next" />{% endif %}
+    {% if next %}<div><input type="hidden" name="next" value="{{ next }}" id="next" /></div>{% endif %}
     <p class="submit">
     <input type="submit" name="submit" value="{% trans "Flag" %}" /> or <a href="{{ comment.get_absolute_url }}">cancel</a>
     </p>
diff -Nru python-django-1.2.3/django/contrib/comments/templates/comments/form.html python-django-1.2.4/django/contrib/comments/templates/comments/form.html
--- python-django-1.2.3/django/contrib/comments/templates/comments/form.html	2009-10-27 00:23:07.000000000 +0100
+++ python-django-1.2.4/django/contrib/comments/templates/comments/form.html	2010-09-14 16:24:15.000000000 +0200
@@ -1,9 +1,9 @@
 {% load comments i18n %}
 <form action="{% comment_form_target %}" method="post">{% csrf_token %}
-  {% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %}
+  {% if next %}<div><input type="hidden" name="next" value="{{ next }}" /></div>{% endif %}
   {% for field in form %}
     {% if field.is_hidden %}
-      {{ field }}
+      <div>{{ field }}</div>
     {% else %}
       {% if field.errors %}{{ field.errors }}{% endif %}
       <p
diff -Nru python-django-1.2.3/django/contrib/comments/templates/comments/preview.html python-django-1.2.4/django/contrib/comments/templates/comments/preview.html
--- python-django-1.2.3/django/contrib/comments/templates/comments/preview.html	2009-10-27 00:23:07.000000000 +0100
+++ python-django-1.2.4/django/contrib/comments/templates/comments/preview.html	2010-09-14 16:24:15.000000000 +0200
@@ -6,7 +6,7 @@
 {% block content %}
   {% load comments %}
   <form action="{% comment_form_target %}" method="post">{% csrf_token %}
-    {% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %}
+    {% if next %}<div><input type="hidden" name="next" value="{{ next }}" /></div>{% endif %}
     {% if form.errors %}
     <h1>{% blocktrans count form.errors|length as counter %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}</h1>
     {% else %}
@@ -18,7 +18,7 @@
     {% endif %}
     {% for field in form %}
       {% if field.is_hidden %}
-        {{ field }}
+        <div>{{ field }}</div>
       {% else %}
         {% if field.errors %}{{ field.errors }}{% endif %}
         <p
diff -Nru python-django-1.2.3/django/contrib/comments/urls.py python-django-1.2.4/django/contrib/comments/urls.py
--- python-django-1.2.3/django/contrib/comments/urls.py	2009-10-23 21:22:31.000000000 +0200
+++ python-django-1.2.4/django/contrib/comments/urls.py	2010-10-28 14:16:39.000000000 +0200
@@ -12,6 +12,5 @@
 )
 
 urlpatterns += patterns('',
-    url(r'^cr/(\d+)/(.+)/$', 'django.views.defaults.shortcut', name='comments-url-redirect'),
+    url(r'^cr/(\d+)/(.+)/$', 'django.contrib.contenttypes.views.shortcut', name='comments-url-redirect'),
 )
-
diff -Nru python-django-1.2.3/django/contrib/contenttypes/tests.py python-django-1.2.4/django/contrib/contenttypes/tests.py
diff -Nru python-django-1.2.3/django/contrib/contenttypes/views.py python-django-1.2.4/django/contrib/contenttypes/views.py
--- python-django-1.2.3/django/contrib/contenttypes/views.py	2009-12-19 16:25:16.000000000 +0100
+++ python-django-1.2.4/django/contrib/contenttypes/views.py	2010-10-28 14:16:21.000000000 +0200
@@ -1,6 +1,6 @@
 from django import http
 from django.contrib.contenttypes.models import ContentType
-from django.contrib.sites.models import Site
+from django.contrib.sites.models import Site, get_current_site
 from django.core.exceptions import ObjectDoesNotExist
 
 def shortcut(request, content_type_id, object_id):
@@ -8,6 +8,8 @@
     # Look up the object, making sure it's got a get_absolute_url() function.
     try:
         content_type = ContentType.objects.get(pk=content_type_id)
+        if not content_type.model_class():
+            raise http.Http404("Content type %s object has no associated model" % content_type_id)
         obj = content_type.get_object_for_this_type(pk=object_id)
     except (ObjectDoesNotExist, ValueError):
         raise http.Http404("Content type %s object %s doesn't exist" % (content_type_id, object_id))
@@ -26,35 +28,37 @@
     # Otherwise, we need to introspect the object's relationships for a
     # relation to the Site object
     object_domain = None
-    opts = obj._meta
 
-    # First, look for an many-to-many relationship to Site.
-    for field in opts.many_to_many:
-        if field.rel.to is Site:
-            try:
-                # Caveat: In the case of multiple related Sites, this just
-                # selects the *first* one, which is arbitrary.
-                object_domain = getattr(obj, field.name).all()[0].domain
-            except IndexError:
-                pass
-            if object_domain is not None:
-                break
+    if Site._meta.installed:
+        opts = obj._meta
 
-    # Next, look for a many-to-one relationship to Site.
-    if object_domain is None:
-        for field in obj._meta.fields:
-            if field.rel and field.rel.to is Site:
+        # First, look for an many-to-many relationship to Site.
+        for field in opts.many_to_many:
+            if field.rel.to is Site:
                 try:
-                    object_domain = getattr(obj, field.name).domain
-                except Site.DoesNotExist:
+                    # Caveat: In the case of multiple related Sites, this just
+                    # selects the *first* one, which is arbitrary.
+                    object_domain = getattr(obj, field.name).all()[0].domain
+                except IndexError:
                     pass
                 if object_domain is not None:
                     break
 
+        # Next, look for a many-to-one relationship to Site.
+        if object_domain is None:
+            for field in obj._meta.fields:
+                if field.rel and field.rel.to is Site:
+                    try:
+                        object_domain = getattr(obj, field.name).domain
+                    except Site.DoesNotExist:
+                        pass
+                    if object_domain is not None:
+                        break
+
     # Fall back to the current site (if possible).
     if object_domain is None:
         try:
-            object_domain = Site.objects.get_current().domain
+            object_domain = get_current_site(request).domain
         except Site.DoesNotExist:
             pass
 
diff -Nru python-django-1.2.3/django/contrib/databrowse/templates/databrowse/base.html python-django-1.2.4/django/contrib/databrowse/templates/databrowse/base.html
--- python-django-1.2.3/django/contrib/databrowse/templates/databrowse/base.html	2008-03-18 15:54:39.000000000 +0100
+++ python-django-1.2.4/django/contrib/databrowse/templates/databrowse/base.html	2010-10-10 03:59:17.000000000 +0200
@@ -1,5 +1,5 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
-<html xmlns="http://www.w3.org/1999/xhtml"; lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
+<html xmlns="http://www.w3.org/1999/xhtml"; lang="{{ LANGUAGE_CODE|default:"en-us" }}" xml:lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
 <head>
 <title>{% block title %}{% endblock %}</title>
 {% block style %}
diff -Nru python-django-1.2.3/django/contrib/flatpages/tests/csrf.py python-django-1.2.4/django/contrib/flatpages/tests/csrf.py
diff -Nru python-django-1.2.3/django/contrib/flatpages/tests/middleware.py python-django-1.2.4/django/contrib/flatpages/tests/middleware.py
diff -Nru python-django-1.2.3/django/contrib/flatpages/tests/views.py python-django-1.2.4/django/contrib/flatpages/tests/views.py
diff -Nru python-django-1.2.3/django/contrib/formtools/tests.py python-django-1.2.4/django/contrib/formtools/tests.py
diff -Nru python-django-1.2.3/django/contrib/formtools/wizard.py python-django-1.2.4/django/contrib/formtools/wizard.py
--- python-django-1.2.3/django/contrib/formtools/wizard.py	2010-08-23 10:12:17.000000000 +0200
+++ python-django-1.2.4/django/contrib/formtools/wizard.py	2010-10-20 10:02:07.000000000 +0200
@@ -68,39 +68,50 @@
         if current_step >= self.num_steps():
             raise Http404('Step %s does not exist' % current_step)
 
-        # For each previous step, verify the hash and process.
-        # TODO: Move "hash_%d" to a method to make it configurable.
-        for i in range(current_step):
-            form = self.get_form(i, request.POST)
-            if request.POST.get("hash_%d" % i, '') != self.security_hash(request, form):
-                return self.render_hash_failure(request, i)
-            self.process_step(request, form, i)
-
         # Process the current step. If it's valid, go to the next step or call
         # done(), depending on whether any steps remain.
         if request.method == 'POST':
             form = self.get_form(current_step, request.POST)
         else:
             form = self.get_form(current_step)
+
         if form.is_valid():
+            # Validate all the forms. If any of them fail validation, that
+            # must mean the validator relied on some other input, such as
+            # an external Web site.
+
+            # It is also possible that validation might fail under certain
+            # attack situations: an attacker might be able to bypass previous
+            # stages, and generate correct security hashes for all the
+            # skipped stages by virtue of:
+            #  1) having filled out an identical form which doesn't have the
+            #     validation (and does something different at the end),
+            #  2) or having filled out a previous version of the same form
+            #     which had some validation missing,
+            #  3) or previously having filled out the form when they had
+            #     more privileges than they do now.
+            #
+            # Since the hashes only take into account values, and not other
+            # other validation the form might do, we must re-do validation
+            # now for security reasons.
+            current_form_list = [self.get_form(i, request.POST) for i in range(current_step)]
+
+            for i, f in enumerate(current_form_list):
+                if request.POST.get("hash_%d" % i, '') != self.security_hash(request, f):
+                    return self.render_hash_failure(request, i)
+
+                if not f.is_valid():
+                    return self.render_revalidation_failure(request, i, f)
+                else:
+                    self.process_step(request, f, i)
+
+            # Now progress to processing this step:
             self.process_step(request, form, current_step)
             next_step = current_step + 1
 
-            # If this was the last step, validate all of the forms one more
-            # time, as a sanity check, and call done().
-            num = self.num_steps()
-            if next_step == num:
-                final_form_list = [self.get_form(i, request.POST) for i in range(num)]
-
-                # Validate all the forms. If any of them fail validation, that
-                # must mean the validator relied on some other input, such as
-                # an external Web site.
-                for i, f in enumerate(final_form_list):
-                    if not f.is_valid():
-                        return self.render_revalidation_failure(request, i, f)
-                return self.done(request, final_form_list)
 
-            # Otherwise, move along to the next step.
+            if next_step == self.num_steps():
+                return self.done(request, current_form_list)
             else:
                 form = self.get_form(next_step)
                 self.step = current_step = next_step
diff -Nru python-django-1.2.3/django/contrib/gis/admin/options.py python-django-1.2.4/django/contrib/gis/admin/options.py
--- python-django-1.2.3/django/contrib/gis/admin/options.py	2010-04-16 18:34:42.000000000 +0200
+++ python-django-1.2.4/django/contrib/gis/admin/options.py	2010-10-24 11:41:08.000000000 +0200
@@ -119,6 +119,6 @@
         num_zoom = 20
         map_srid = 900913
         max_extent = '-20037508,-20037508,20037508,20037508'
-        max_resolution = 156543.0339
+        max_resolution = '156543.0339'
         point_zoom = num_zoom - 6
         units = 'm'
diff -Nru python-django-1.2.3/django/contrib/gis/db/backends/postgis/operations.py python-django-1.2.4/django/contrib/gis/db/backends/postgis/operations.py
--- python-django-1.2.3/django/contrib/gis/db/backends/postgis/operations.py	2010-05-04 23:43:40.000000000 +0200
+++ python-django-1.2.4/django/contrib/gis/db/backends/postgis/operations.py	2010-09-12 04:09:17.000000000 +0200
@@ -233,8 +233,6 @@
                     })
             self.geography_operators = {
                 'bboverlaps' : PostGISOperator('&&'),
-                'exact' : PostGISOperator('~='),
-                'same_as' : PostGISOperator('~='),
                 }
 
         # Creating a dictionary lookup of all GIS terms for PostGIS.
diff -Nru python-django-1.2.3/django/contrib/gis/db/backends/util.py python-django-1.2.4/django/contrib/gis/db/backends/util.py
--- python-django-1.2.3/django/contrib/gis/db/backends/util.py	2009-12-22 16:18:51.000000000 +0100
+++ python-django-1.2.4/django/contrib/gis/db/backends/util.py	2010-11-09 18:42:38.000000000 +0100
@@ -3,20 +3,6 @@
 backends.
 """
 
-def getstatusoutput(cmd):
-    """
-    Executes a shell command on the platform using subprocess.Popen and
-    return a tuple of the status and stdout output.
-    """
-    from subprocess import Popen, PIPE
-    # Set stdout and stderr to PIPE because we want to capture stdout and
-    # prevent stderr from displaying.
-    p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
-    # We use p.communicate() instead of p.wait() to avoid deadlocks if the
-    # output buffers exceed POSIX buffer size.
-    stdout, stderr = p.communicate()
-    return p.returncode, stdout.strip()
-
 def gqn(val):
     """
     The geographic quote name function; used for quoting tables and
diff -Nru python-django-1.2.3/django/contrib/gis/db/models/query.py python-django-1.2.4/django/contrib/gis/db/models/query.py
--- python-django-1.2.3/django/contrib/gis/db/models/query.py	2010-01-29 03:46:07.000000000 +0100
+++ python-django-1.2.4/django/contrib/gis/db/models/query.py	2010-10-12 19:27:07.000000000 +0200
@@ -48,7 +48,10 @@
             s['procedure_args']['tolerance'] = tolerance
             s['select_field'] = AreaField('sq_m') # Oracle returns area in units of meters.
         elif backend.postgis or backend.spatialite:
-            if not geo_field.geodetic(connection):
+            if backend.geography:
+                # Geography fields support area calculation, returns square meters.
+                s['select_field'] = AreaField('sq_m')
+            elif not geo_field.geodetic(connection):
                 # Getting the area units of the geographic field.
                 s['select_field'] = AreaField(Area.unit_attname(geo_field.units_name(connection)))
             else:
diff -Nru python-django-1.2.3/django/contrib/gis/db/models/sql/compiler.py python-django-1.2.4/django/contrib/gis/db/models/sql/compiler.py
--- python-django-1.2.3/django/contrib/gis/db/models/sql/compiler.py	2010-07-20 21:14:23.000000000 +0200
+++ python-django-1.2.4/django/contrib/gis/db/models/sql/compiler.py	2010-12-01 18:54:06.000000000 +0100
@@ -56,7 +56,7 @@
                         col_aliases.add(col[1])
                 else:
                     result.append(col.as_sql(qn, self.connection))
-                    
+
                     if hasattr(col, 'alias'):
                         aliases.add(col.alias)
                         col_aliases.add(col.alias)
diff -Nru python-django-1.2.3/django/contrib/gis/gdal/srs.py python-django-1.2.4/django/contrib/gis/gdal/srs.py
--- python-django-1.2.3/django/contrib/gis/gdal/srs.py	2009-03-08 00:02:48.000000000 +0100
+++ python-django-1.2.4/django/contrib/gis/gdal/srs.py	2010-10-09 10:25:01.000000000 +0200
@@ -37,7 +37,7 @@
 #### Spatial Reference class. ####
 class SpatialReference(GDALBase):
     """
-    A wrapper for the OGRSpatialReference object.  According to the GDAL website,
+    A wrapper for the OGRSpatialReference object.  According to the GDAL Web site,
     the SpatialReference object "provide[s] services to represent coordinate 
     systems (projections and datums) and to transform between them."
     """
diff -Nru python-django-1.2.3/django/contrib/gis/gdal/tests/test_ds.py python-django-1.2.4/django/contrib/gis/gdal/tests/test_ds.py
diff -Nru python-django-1.2.3/django/contrib/gis/gdal/tests/test_geom.py python-django-1.2.4/django/contrib/gis/gdal/tests/test_geom.py
diff -Nru python-django-1.2.3/django/contrib/gis/geometry/regex.py python-django-1.2.4/django/contrib/gis/geometry/regex.py
--- python-django-1.2.3/django/contrib/gis/geometry/regex.py	2010-01-27 04:32:30.000000000 +0100
+++ python-django-1.2.4/django/contrib/gis/geometry/regex.py	2010-10-09 10:25:01.000000000 +0200
@@ -2,7 +2,7 @@
 
 # Regular expression for recognizing HEXEWKB and WKT.  A prophylactic measure
 # to prevent potentially malicious input from reaching the underlying C
-# library.  Not a substitute for good web security programming practices.
+# library.  Not a substitute for good Web security programming practices.
 hex_regex = re.compile(r'^[0-9A-F]+$', re.I)
 wkt_regex = re.compile(r'^(SRID=(?P<srid>\d+);)?'
                        r'(?P<wkt>'
diff -Nru python-django-1.2.3/django/contrib/gis/geometry/test_data.py python-django-1.2.4/django/contrib/gis/geometry/test_data.py
--- python-django-1.2.3/django/contrib/gis/geometry/test_data.py	1970-01-01 01:00:00.000000000 +0100
+++ python-django-1.2.4/django/contrib/gis/geometry/test_data.py	2010-11-06 17:32:08.000000000 +0100
@@ -0,0 +1,105 @@
+"""
+This module has the mock object definitions used to hold reference geometry
+for the GEOS and GDAL tests.
+"""
+import gzip
+import os
+
+from django.contrib import gis
+from django.utils import simplejson
+
+
+# This global used to store reference geometry data.
+GEOMETRIES = None
+
+# Path where reference test data is located.
+TEST_DATA = os.path.join(os.path.dirname(gis.__file__), 'tests', 'data')
+
+
+def tuplize(seq):
+    "Turn all nested sequences to tuples in given sequence."
+    if isinstance(seq, (list, tuple)):
+        return tuple([tuplize(i) for i in seq])
+    return seq
+
+
+def strconvert(d):
+    "Converts all keys in dictionary to str type."
+    return dict([(str(k), v) for k, v in d.iteritems()])
+
+
+def get_ds_file(name, ext):
+    return os.path.join(TEST_DATA,
+                        name,
+                        name + '.%s' % ext
+                        )
+
+
+class TestObj(object):
+    """
+    Base testing object, turns keyword args into attributes.
+    """
+    def __init__(self, **kwargs):
+        for key, value in kwargs.items():
+            setattr(self, key, value)
+
+
+class TestDS(TestObj):
+    """
+    Object for testing GDAL data sources.
+    """
+    def __init__(self, name, **kwargs):
+        # Shapefile is default extension, unless specified otherwise.
+        ext = kwargs.pop('ext', 'shp')
+        self.ds = get_ds_file(name, ext)
+        super(TestDS, self).__init__(**kwargs)
+
+
+class TestGeom(TestObj):
+    """
+    Testing object used for wrapping reference geometry data
+    in GEOS/GDAL tests.
+    """
+    def __init__(self, **kwargs):
+        # Converting lists to tuples of certain keyword args
+        # so coordinate test cases will match (JSON has no
+        # concept of tuple).
+        coords = kwargs.pop('coords', None)
+        if coords:
+            self.coords = tuplize(coords)
+
+        centroid = kwargs.pop('centroid', None)
+        if centroid:
+            self.centroid = tuple(centroid)
+
+        ext_ring_cs = kwargs.pop('ext_ring_cs', None)
+        if ext_ring_cs:
+            ext_ring_cs = tuplize(ext_ring_cs)
+        self.ext_ring_cs = ext_ring_cs
+
+        super(TestGeom, self).__init__(**kwargs)
+
+
+class TestGeomSet(object):
+    """
+    Each attribute of this object is a list of `TestGeom` instances.
+    """
+    def __init__(self, **kwargs):
+        for key, value in kwargs.items():
+            setattr(self, key, [TestGeom(**strconvert(kw)) for kw in value])
+
+
+class TestDataMixin(object):
+    """
+    Mixin used for GEOS/GDAL test cases that defines a `geometries`
+    property, which returns and/or loads the reference geometry data.
+    """
+    @property
+    def geometries(self):
+        global GEOMETRIES
+        if GEOMETRIES is None:
+            # Load up the test geometry data from fixture into global.
+            gzf = gzip.GzipFile(os.path.join(TEST_DATA, 'geometries.json.gz'))
+            geometries = simplejson.loads(gzf.read())
+            GEOMETRIES = TestGeomSet(**strconvert(geometries))
+        return GEOMETRIES
diff -Nru python-django-1.2.3/django/contrib/gis/geos/tests/test_geos.py python-django-1.2.4/django/contrib/gis/geos/tests/test_geos.py
diff -Nru python-django-1.2.3/django/contrib/gis/maps/google/__init__.py python-django-1.2.4/django/contrib/gis/maps/google/__init__.py
--- python-django-1.2.3/django/contrib/gis/maps/google/__init__.py	2009-03-10 19:03:35.000000000 +0100
+++ python-django-1.2.4/django/contrib/gis/maps/google/__init__.py	2010-10-09 10:25:01.000000000 +0200
@@ -1,6 +1,6 @@
 """
   This module houses the GoogleMap object, used for generating
-   the needed javascript to embed Google Maps in a webpage.
+   the needed javascript to embed Google Maps in a Web page.
 
   Google(R) is a registered trademark of Google, Inc. of Mountain View, California.
 
diff -Nru python-django-1.2.3/django/contrib/gis/sitemaps/georss.py python-django-1.2.4/django/contrib/gis/sitemaps/georss.py
--- python-django-1.2.3/django/contrib/gis/sitemaps/georss.py	2008-09-02 19:13:39.000000000 +0200
+++ python-django-1.2.4/django/contrib/gis/sitemaps/georss.py	2010-10-11 16:36:20.000000000 +0200
@@ -36,12 +36,12 @@
             else:
                 self.locations.append(section)
  
-    def get_urls(self, page=1):
+    def get_urls(self, page=1, site=None):
         """
         This method is overrridden so the appropriate `geo_format` attribute
         is placed on each URL element.
         """
-        urls = Sitemap.get_urls(self, page=page)
+        urls = Sitemap.get_urls(self, page=page, site=site)
         for url in urls: url['geo_format'] = 'georss'
         return urls
 
diff -Nru python-django-1.2.3/django/contrib/gis/sitemaps/kml.py python-django-1.2.4/django/contrib/gis/sitemaps/kml.py
--- python-django-1.2.3/django/contrib/gis/sitemaps/kml.py	2008-08-23 21:22:23.000000000 +0200
+++ python-django-1.2.4/django/contrib/gis/sitemaps/kml.py	2010-10-11 16:36:20.000000000 +0200
@@ -40,12 +40,12 @@
                 raise TypeError('KML Sources must be a model or a 3-tuple.')
         return kml_sources
 
-    def get_urls(self, page=1):
+    def get_urls(self, page=1, site=None):
         """
         This method is overrridden so the appropriate `geo_format` attribute
         is placed on each URL element.
         """
-        urls = Sitemap.get_urls(self, page=page)
+        urls = Sitemap.get_urls(self, page=page, site=site)
         for url in urls: url['geo_format'] = self.geo_format
         return urls
 
diff -Nru python-django-1.2.3/django/contrib/gis/sitemaps/views.py python-django-1.2.4/django/contrib/gis/sitemaps/views.py
--- python-django-1.2.3/django/contrib/gis/sitemaps/views.py	2009-12-22 16:18:51.000000000 +0100
+++ python-django-1.2.4/django/contrib/gis/sitemaps/views.py	2010-10-11 16:36:20.000000000 +0200
@@ -1,6 +1,6 @@
 from django.http import HttpResponse, Http404
 from django.template import loader
-from django.contrib.sites.models import Site
+from django.contrib.sites.models import get_current_site
 from django.core import urlresolvers
 from django.core.paginator import EmptyPage, PageNotAnInteger
 from django.contrib.gis.db.models.fields import GeometryField
@@ -15,7 +15,7 @@
     This view generates a sitemap index that uses the proper view
     for resolving geographic section sitemap URLs.
     """
-    current_site = Site.objects.get_current()
+    current_site = get_current_site(request)
     sites = []
     protocol = request.is_secure() and 'https' or 'http'
     for section, site in sitemaps.items():
@@ -46,12 +46,13 @@
         maps = sitemaps.values()
 
     page = request.GET.get("p", 1)
+    current_site = get_current_site(request)
     for site in maps:
         try:
             if callable(site):
-                urls.extend(site().get_urls(page))
+                urls.extend(site().get_urls(page=page, site=current_site))
             else:
-                urls.extend(site.get_urls(page))
+                urls.extend(site.get_urls(page=page, site=current_site))
         except EmptyPage:
             raise Http404("Page %s empty" % page)
         except PageNotAnInteger:
Les fichiers binaires /tmp/k4Rha17U_b/python-django-1.2.3/django/contrib/gis/tests/data/geometries.json.gz et /tmp/JNRzoxahpQ/python-django-1.2.4/django/contrib/gis/tests/data/geometries.json.gz sont différents.
diff -Nru python-django-1.2.3/django/contrib/gis/tests/distapp/data.py python-django-1.2.4/django/contrib/gis/tests/distapp/data.py
diff -Nru python-django-1.2.3/django/contrib/gis/tests/distapp/tests.py python-django-1.2.4/django/contrib/gis/tests/distapp/tests.py
diff -Nru python-django-1.2.3/django/contrib/gis/tests/geo3d/tests.py python-django-1.2.4/django/contrib/gis/tests/geo3d/tests.py
diff -Nru python-django-1.2.3/django/contrib/gis/tests/geoapp/fixtures/initial_data.json python-django-1.2.4/django/contrib/gis/tests/geoapp/fixtures/initial_data.json
Les fichiers binaires /tmp/k4Rha17U_b/python-django-1.2.3/django/contrib/gis/tests/geoapp/fixtures/initial_data.json.gz et /tmp/JNRzoxahpQ/python-django-1.2.4/django/contrib/gis/tests/geoapp/fixtures/initial_data.json.gz sont différents.
diff -Nru python-django-1.2.3/django/contrib/gis/tests/geoapp/test_feeds.py python-django-1.2.4/django/contrib/gis/tests/geoapp/test_feeds.py
diff -Nru python-django-1.2.3/django/contrib/gis/tests/geoapp/test_sitemaps.py python-django-1.2.4/django/contrib/gis/tests/geoapp/test_sitemaps.py
diff -Nru python-django-1.2.3/django/contrib/gis/tests/geoapp/tests.py python-django-1.2.4/django/contrib/gis/tests/geoapp/tests.py
diff -Nru python-django-1.2.3/django/contrib/gis/tests/geogapp/models.py python-django-1.2.4/django/contrib/gis/tests/geogapp/models.py
diff -Nru python-django-1.2.3/django/contrib/gis/tests/geogapp/tests.py python-django-1.2.4/django/contrib/gis/tests/geogapp/tests.py
diff -Nru python-django-1.2.3/django/contrib/gis/tests/geometries.py python-django-1.2.4/django/contrib/gis/tests/geometries.py
diff -Nru python-django-1.2.3/django/contrib/gis/tests/__init__.py python-django-1.2.4/django/contrib/gis/tests/__init__.py
diff -Nru python-django-1.2.3/django/contrib/gis/tests/layermap/tests.py python-django-1.2.4/django/contrib/gis/tests/layermap/tests.py
diff -Nru python-django-1.2.3/django/contrib/gis/tests/relatedapp/tests.py python-django-1.2.4/django/contrib/gis/tests/relatedapp/tests.py
diff -Nru python-django-1.2.3/django/contrib/gis/tests/test_geoip.py python-django-1.2.4/django/contrib/gis/tests/test_geoip.py
diff -Nru python-django-1.2.3/django/contrib/gis/tests/urls.py python-django-1.2.4/django/contrib/gis/tests/urls.py
diff -Nru python-django-1.2.3/django/contrib/humanize/templatetags/humanize.py python-django-1.2.4/django/contrib/humanize/templatetags/humanize.py
--- python-django-1.2.3/django/contrib/humanize/templatetags/humanize.py	2010-01-10 22:37:20.000000000 +0100
+++ python-django-1.2.4/django/contrib/humanize/templatetags/humanize.py	2010-12-21 16:16:05.000000000 +0100
@@ -43,7 +43,10 @@
     numbers over 1 million. For example, 1000000 becomes '1.0 million', 1200000
     becomes '1.2 million' and '1200000000' becomes '1.2 billion'.
     """
-    value = int(value)
+    try:
+        value = int(value)
+    except (TypeError, ValueError):
+        return value
     if value < 1000000:
         return value
     if value < 1000000000:
@@ -66,7 +69,7 @@
     """
     try:
         value = int(value)
-    except ValueError:
+    except (TypeError, ValueError):
         return value
     if not 0 < value < 10:
         return value
diff -Nru python-django-1.2.3/django/contrib/localflavor/at/forms.py python-django-1.2.4/django/contrib/localflavor/at/forms.py
--- python-django-1.2.3/django/contrib/localflavor/at/forms.py	2008-11-01 21:33:52.000000000 +0100
+++ python-django-1.2.4/django/contrib/localflavor/at/forms.py	2010-12-12 05:37:01.000000000 +0100
@@ -4,12 +4,14 @@
 
 import re
 
-from django.utils.translation import ugettext_lazy as _
-from django.forms.fields import Field, RegexField, Select
+from django.core.validators import EMPTY_VALUES
 from django.forms import ValidationError
+from django.forms.fields import Field, RegexField, Select
+from django.utils.translation import ugettext_lazy as _
 
 re_ssn = re.compile(r'^\d{4} \d{6}')
 
+
 class ATZipCodeField(RegexField):
     """
     A form field that validates its input is an Austrian postcode.
@@ -49,6 +51,9 @@
     }
 
     def clean(self, value):
+        value = super(ATSocialSecurityNumberField, self).clean(value)
+        if value in EMPTY_VALUES:
+            return u""
         if not re_ssn.search(value):
             raise ValidationError(self.error_messages['invalid'])
         sqnr, date = value.split(" ")
@@ -62,4 +67,3 @@
         if res != int(check):
            raise ValidationError(self.error_messages['invalid'])
         return u'%s%s %s'%(sqnr, check, date,)
-
diff -Nru python-django-1.2.3/django/contrib/localflavor/cz/forms.py python-django-1.2.4/django/contrib/localflavor/cz/forms.py
--- python-django-1.2.3/django/contrib/localflavor/cz/forms.py	2010-01-05 04:56:19.000000000 +0100
+++ python-django-1.2.4/django/contrib/localflavor/cz/forms.py	2010-11-21 15:08:13.000000000 +0100
@@ -51,7 +51,7 @@
     }
 
     def clean(self, value, gender=None):
-        super(CZBirthNumberField, self).__init__(value)
+        super(CZBirthNumberField, self).clean(value)
 
         if value in EMPTY_VALUES:
             return u''
@@ -108,7 +108,7 @@
     }
 
     def clean(self, value):
-        super(CZICNumberField, self).__init__(value)
+        super(CZICNumberField, self).clean(value)
 
         if value in EMPTY_VALUES:
             return u''
diff -Nru python-django-1.2.3/django/contrib/localflavor/it/forms.py python-django-1.2.4/django/contrib/localflavor/it/forms.py
--- python-django-1.2.3/django/contrib/localflavor/it/forms.py	2010-01-05 04:56:19.000000000 +0100
+++ python-django-1.2.4/django/contrib/localflavor/it/forms.py	2010-12-18 23:14:11.000000000 +0100
@@ -50,8 +50,8 @@
 
     def clean(self, value):
         value = super(ITSocialSecurityNumberField, self).clean(value)
-        if value == u'':
-            return value
+        if value in EMPTY_VALUES:
+            return u''
         value = re.sub('\s', u'', value).upper()
         try:
             check_digit = ssn_check_digit(value)
@@ -71,8 +71,8 @@
 
     def clean(self, value):
         value = super(ITVatNumberField, self).clean(value)
-        if value == u'':
-            return value
+        if value in EMPTY_VALUES:
+            return u''
         try:
             vat_number = int(value)
         except ValueError:
diff -Nru python-django-1.2.3/django/contrib/localflavor/pl/forms.py python-django-1.2.4/django/contrib/localflavor/pl/forms.py
--- python-django-1.2.3/django/contrib/localflavor/pl/forms.py	2009-04-10 03:03:44.000000000 +0200
+++ python-django-1.2.4/django/contrib/localflavor/pl/forms.py	2010-12-18 23:14:52.000000000 +0100
@@ -7,6 +7,7 @@
 from django.forms import ValidationError
 from django.forms.fields import Select, RegexField
 from django.utils.translation import ugettext_lazy as _
+from django.core.validators import EMPTY_VALUES
 
 class PLProvinceSelect(Select):
     """
@@ -45,6 +46,8 @@
 
     def clean(self,value):
         super(PLPESELField, self).clean(value)
+        if value in EMPTY_VALUES:
+            return u''
         if not self.has_valid_checksum(value):
             raise ValidationError(self.error_messages['checksum'])
         return u'%s' % value
@@ -78,6 +81,8 @@
 
     def clean(self,value):
         super(PLNIPField, self).clean(value)
+        if value in EMPTY_VALUES:
+            return u''
         value = re.sub("[-]", "", value)
         if not self.has_valid_checksum(value):
             raise ValidationError(self.error_messages['checksum'])
@@ -116,6 +121,8 @@
 
     def clean(self,value):
         super(PLREGONField, self).clean(value)
+        if value in EMPTY_VALUES:
+            return u''
         if not self.has_valid_checksum(value):
             raise ValidationError(self.error_messages['checksum'])
         return u'%s' % value
diff -Nru python-django-1.2.3/django/contrib/localflavor/ro/forms.py python-django-1.2.4/django/contrib/localflavor/ro/forms.py
--- python-django-1.2.3/django/contrib/localflavor/ro/forms.py	2010-01-05 04:56:19.000000000 +0100
+++ python-django-1.2.4/django/contrib/localflavor/ro/forms.py	2010-12-18 23:15:18.000000000 +0100
@@ -20,7 +20,7 @@
     }
 
     def __init__(self, *args, **kwargs):
-        super(ROCIFField, self).__init__(r'^[0-9]{2,10}', max_length=10,
+        super(ROCIFField, self).__init__(r'^(RO)?[0-9]{2,10}', max_length=10,
                 min_length=2, *args, **kwargs)
 
     def clean(self, value):
@@ -65,6 +65,8 @@
         CNP validations
         """
         value = super(ROCNPField, self).clean(value)
+        if value in EMPTY_VALUES:
+            return u''
         # check birthdate digits
         import datetime
         try:
@@ -150,6 +152,8 @@
         Strips - and spaces, performs country code and checksum validation
         """
         value = super(ROIBANField, self).clean(value)
+        if value in EMPTY_VALUES:
+            return u''
         value = value.replace('-','')
         value = value.replace(' ','')
         value = value.upper()
@@ -180,6 +184,8 @@
         Strips -, (, ) and spaces. Checks the final length.
         """
         value = super(ROPhoneNumberField, self).clean(value)
+        if value in EMPTY_VALUES:
+            return u''
         value = value.replace('-','')
         value = value.replace('(','')
         value = value.replace(')','')
diff -Nru python-django-1.2.3/django/contrib/localflavor/za/forms.py python-django-1.2.4/django/contrib/localflavor/za/forms.py
--- python-django-1.2.3/django/contrib/localflavor/za/forms.py	2010-01-05 04:56:19.000000000 +0100
+++ python-django-1.2.4/django/contrib/localflavor/za/forms.py	2010-12-18 23:16:15.000000000 +0100
@@ -22,14 +22,14 @@
     }
 
     def clean(self, value):
-        # strip spaces and dashes
-        value = value.strip().replace(' ', '').replace('-', '')
-
         super(ZAIDField, self).clean(value)
 
         if value in EMPTY_VALUES:
             return u''
 
+        # strip spaces and dashes
+        value = value.strip().replace(' ', '').replace('-', '')
+
         match = re.match(id_re, value)
 
         if not match:
@@ -57,4 +57,4 @@
 
     def __init__(self, *args, **kwargs):
         super(ZAPostCodeField, self).__init__(r'^\d{4}$',
-            max_length=None, min_length=None)
+            max_length=None, min_length=None, *args, **kwargs)
diff -Nru python-django-1.2.3/django/contrib/markup/templatetags/markup.py python-django-1.2.4/django/contrib/markup/templatetags/markup.py
--- python-django-1.2.3/django/contrib/markup/templatetags/markup.py	2010-03-27 00:56:08.000000000 +0100
+++ python-django-1.2.4/django/contrib/markup/templatetags/markup.py	2010-10-08 17:46:03.000000000 +0200
@@ -8,7 +8,7 @@
     * Markdown, which requires the Python-markdown library from
       http://www.freewisdom.org/projects/python-markdown
 
-    * ReStructuredText, which requires docutils from http://docutils.sf.net/
+    * reStructuredText, which requires docutils from http://docutils.sf.net/
 """
 
 from django import template
diff -Nru python-django-1.2.3/django/contrib/sessions/models.py python-django-1.2.4/django/contrib/sessions/models.py
--- python-django-1.2.3/django/contrib/sessions/models.py	2010-01-10 19:36:20.000000000 +0100
+++ python-django-1.2.4/django/contrib/sessions/models.py	2010-10-09 10:25:01.000000000 +0200
@@ -40,7 +40,7 @@
 
     For complete documentation on using Sessions in your code, consult
     the sessions documentation that is shipped with Django (also available
-    on the Django website).
+    on the Django Web site).
     """
     session_key = models.CharField(_('session key'), max_length=40,
                                    primary_key=True)
diff -Nru python-django-1.2.3/django/contrib/sitemaps/__init__.py python-django-1.2.4/django/contrib/sitemaps/__init__.py
--- python-django-1.2.3/django/contrib/sitemaps/__init__.py	2010-08-30 17:11:21.000000000 +0200
+++ python-django-1.2.4/django/contrib/sitemaps/__init__.py	2010-10-11 16:36:20.000000000 +0200
@@ -1,4 +1,6 @@
+from django.contrib.sites.models import Site, get_current_site
 from django.core import urlresolvers, paginator
+from django.core.exceptions import ImproperlyConfigured
 import urllib
 
 PING_URL = "http://www.google.com/webmasters/tools/ping";
@@ -59,12 +61,19 @@
         return self._paginator
     paginator = property(_get_paginator)
 
-    def get_urls(self, page=1):
-        from django.contrib.sites.models import Site
-        current_site = Site.objects.get_current()
+    def get_urls(self, page=1, site=None):
+        if site is None:
+            if Site._meta.installed:
+                try:
+                    site = Site.objects.get_current()
+                except Site.DoesNotExist:
+                    pass
+            if site is None:
+                raise ImproperlyConfigured("In order to use Sitemaps you must either use the sites framework or pass in a Site or RequestSite object in your view code.")
+
         urls = []
         for item in self.paginator.page(page).object_list:
-            loc = "http://%s%s"; % (current_site.domain, self.__get('location', item))
+            loc = "http://%s%s"; % (site.domain, self.__get('location', item))
             priority = self.__get('priority', item, None)
             url_info = {
                 'location':   loc,
@@ -77,9 +86,8 @@
 
 class FlatPageSitemap(Sitemap):
     def items(self):
-        from django.contrib.sites.models import Site
         current_site = Site.objects.get_current()
-        return current_site.flatpage_set.all()
+        return current_site.flatpage_set.filter(registration_required=False)
 
 class GenericSitemap(Sitemap):
     priority = None
diff -Nru python-django-1.2.3/django/contrib/sitemaps/management/commands/ping_google.py python-django-1.2.4/django/contrib/sitemaps/management/commands/ping_google.py
--- python-django-1.2.3/django/contrib/sitemaps/management/commands/ping_google.py	2008-07-01 14:25:59.000000000 +0200
+++ python-django-1.2.4/django/contrib/sitemaps/management/commands/ping_google.py	2010-12-13 14:56:38.000000000 +0100
@@ -3,7 +3,7 @@
 
 
 class Command(BaseCommand):
-    help = "Ping google with an updated sitemap, pass optional url of sitemap"
+    help = "Ping Google with an updated sitemap, pass optional url of sitemap"
 
     def execute(self, *args, **options):
         if len(args) == 1:
diff -Nru python-django-1.2.3/django/contrib/sitemaps/tests/basic.py python-django-1.2.4/django/contrib/sitemaps/tests/basic.py
diff -Nru python-django-1.2.3/django/contrib/sitemaps/tests/urls.py python-django-1.2.4/django/contrib/sitemaps/tests/urls.py
diff -Nru python-django-1.2.3/django/contrib/sitemaps/views.py python-django-1.2.4/django/contrib/sitemaps/views.py
--- python-django-1.2.3/django/contrib/sitemaps/views.py	2008-07-26 07:07:16.000000000 +0200
+++ python-django-1.2.4/django/contrib/sitemaps/views.py	2010-10-11 16:36:20.000000000 +0200
@@ -1,15 +1,16 @@
 from django.http import HttpResponse, Http404
 from django.template import loader
-from django.contrib.sites.models import Site
+from django.contrib.sites.models import get_current_site
 from django.core import urlresolvers
 from django.utils.encoding import smart_str
 from django.core.paginator import EmptyPage, PageNotAnInteger
 
 def index(request, sitemaps):
-    current_site = Site.objects.get_current()
+    current_site = get_current_site(request)
     sites = []
     protocol = request.is_secure() and 'https' or 'http'
     for section, site in sitemaps.items():
+        site.request = request
         if callable(site):
             pages = site().paginator.num_pages
         else:
@@ -31,12 +32,13 @@
     else:
         maps = sitemaps.values()
     page = request.GET.get("p", 1)
+    current_site = get_current_site(request)
     for site in maps:
         try:
             if callable(site):
-                urls.extend(site().get_urls(page))
+                urls.extend(site().get_urls(page=page, site=current_site))
             else:
-                urls.extend(site.get_urls(page))
+                urls.extend(site.get_urls(page=page, site=current_site))
         except EmptyPage:
             raise Http404("Page %s empty" % page)
         except PageNotAnInteger:
diff -Nru python-django-1.2.3/django/contrib/sites/managers.py python-django-1.2.4/django/contrib/sites/managers.py
--- python-django-1.2.3/django/contrib/sites/managers.py	2010-01-10 19:36:20.000000000 +0100
+++ python-django-1.2.4/django/contrib/sites/managers.py	2010-10-18 07:02:28.000000000 +0200
@@ -4,17 +4,38 @@
 
 class CurrentSiteManager(models.Manager):
     "Use this to limit objects to those associated with the current site."
-    def __init__(self, field_name='site'):
+    def __init__(self, field_name=None):
         super(CurrentSiteManager, self).__init__()
         self.__field_name = field_name
         self.__is_validated = False
-
+        
+    def _validate_field_name(self):
+        field_names = self.model._meta.get_all_field_names()
+        
+        # If a custom name is provided, make sure the field exists on the model
+        if self.__field_name is not None and self.__field_name not in field_names:
+            raise ValueError("%s couldn't find a field named %s in %s." % \
+                (self.__class__.__name__, self.__field_name, self.model._meta.object_name))
+        
+        # Otherwise, see if there is a field called either 'site' or 'sites'
+        else:
+            for potential_name in ['site', 'sites']:
+                if potential_name in field_names:
+                    self.__field_name = potential_name
+                    self.__is_validated = True
+                    break
+        
+        # Now do a type check on the field (FK or M2M only)
+        try:
+            field = self.model._meta.get_field(self.__field_name)
+            if not isinstance(field, (models.ForeignKey, models.ManyToManyField)):
+                raise TypeError("%s must be a ForeignKey or ManyToManyField." %self.__field_name)
+        except FieldDoesNotExist:
+            raise ValueError("%s couldn't find a field named %s in %s." % \
+                    (self.__class__.__name__, self.__field_name, self.model._meta.object_name))
+        self.__is_validated = True
+    
     def get_query_set(self):
         if not self.__is_validated:
-            try:
-                self.model._meta.get_field(self.__field_name)
-            except FieldDoesNotExist:
-                raise ValueError("%s couldn't find a field named %s in %s." % \
-                    (self.__class__.__name__, self.__field_name, self.model._meta.object_name))
-            self.__is_validated = True
+            self._validate_field_name()
         return super(CurrentSiteManager, self).get_query_set().filter(**{self.__field_name + '__id__exact': settings.SITE_ID})
diff -Nru python-django-1.2.3/django/contrib/sites/models.py python-django-1.2.4/django/contrib/sites/models.py
--- python-django-1.2.3/django/contrib/sites/models.py	2009-02-27 05:57:33.000000000 +0100
+++ python-django-1.2.4/django/contrib/sites/models.py	2010-10-05 22:31:02.000000000 +0200
@@ -1,9 +1,12 @@
 from django.db import models
 from django.utils.translation import ugettext_lazy as _
 
+
 SITE_CACHE = {}
 
+
 class SiteManager(models.Manager):
+
     def get_current(self):
         """
         Returns the current ``Site`` based on the SITE_ID in the
@@ -28,7 +31,9 @@
         global SITE_CACHE
         SITE_CACHE = {}
 
+
 class Site(models.Model):
+
     domain = models.CharField(_('domain name'), max_length=100)
     name = models.CharField(_('display name'), max_length=50)
     objects = SiteManager()
@@ -56,6 +61,7 @@
         except KeyError:
             pass
 
+
 class RequestSite(object):
     """
     A class that shares the primary interface of Site (i.e., it has
@@ -75,3 +81,15 @@
 
     def delete(self):
         raise NotImplementedError('RequestSite cannot be deleted.')
+
+
+def get_current_site(request):
+    """
+    Checks if contrib.sites is installed and returns either the current
+    ``Site`` object or a ``RequestSite`` object based on the request.
+    """
+    if Site._meta.installed:
+        current_site = Site.objects.get_current()
+    else:
+        current_site = RequestSite(request)
+    return current_site
diff -Nru python-django-1.2.3/django/contrib/sites/tests.py python-django-1.2.4/django/contrib/sites/tests.py
diff -Nru python-django-1.2.3/django/contrib/syndication/views.py python-django-1.2.4/django/contrib/syndication/views.py
--- python-django-1.2.3/django/contrib/syndication/views.py	2010-03-15 16:25:39.000000000 +0100
+++ python-django-1.2.4/django/contrib/syndication/views.py	2010-10-08 16:17:13.000000000 +0200
@@ -1,6 +1,6 @@
 import datetime
 from django.conf import settings
-from django.contrib.sites.models import Site, RequestSite
+from django.contrib.sites.models import get_current_site
 from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist
 from django.http import HttpResponse, Http404
 from django.template import loader, Template, TemplateDoesNotExist, RequestContext
@@ -8,13 +8,17 @@
 from django.utils.encoding import force_unicode, iri_to_uri, smart_unicode
 from django.utils.html import escape
 
-def add_domain(domain, url):
+def add_domain(domain, url, secure=False):
     if not (url.startswith('http://')
             or url.startswith('https://')
             or url.startswith('mailto:')):
         # 'url' must already be ASCII and URL-quoted, so no need for encoding
         # conversions here.
-        url = iri_to_uri(u'http://%s%s' % (domain, url))
+        if secure:
+            protocol = 'https'
+        else:
+            protocol = 'http'
+        url = iri_to_uri(u'%s://%s%s' % (protocol, domain, url))
     return url
 
 class FeedDoesNotExist(ObjectDoesNotExist):
@@ -91,13 +95,10 @@
         Returns a feedgenerator.DefaultFeed object, fully populated, for
         this feed. Raises FeedDoesNotExist for invalid parameters.
         """
-        if Site._meta.installed:
-            current_site = Site.objects.get_current()
-        else:
-            current_site = RequestSite(request)
+        current_site = get_current_site(request)
 
         link = self.__get_dynamic_attr('link', obj)
-        link = add_domain(current_site.domain, link)
+        link = add_domain(current_site.domain, link, request.is_secure())
 
         feed = self.feed_type(
             title = self.__get_dynamic_attr('title', obj),
@@ -105,8 +106,11 @@
             link = link,
             description = self.__get_dynamic_attr('description', obj),
             language = settings.LANGUAGE_CODE.decode(),
-            feed_url = add_domain(current_site.domain,
-                    self.__get_dynamic_attr('feed_url', obj) or request.path),
+            feed_url = add_domain(
+                current_site.domain,
+                self.__get_dynamic_attr('feed_url', obj) or request.path,
+                request.is_secure(),
+            ),
             author_name = self.__get_dynamic_attr('author_name', obj),
             author_link = self.__get_dynamic_attr('author_link', obj),
             author_email = self.__get_dynamic_attr('author_email', obj),
@@ -140,7 +144,11 @@
                 description = description_tmp.render(RequestContext(request, {'obj': item, 'site': current_site}))
             else:
                 description = self.__get_dynamic_attr('item_description', item)
-            link = add_domain(current_site.domain, self.__get_dynamic_attr('item_link', item))
+            link = add_domain(
+                current_site.domain,
+                self.__get_dynamic_attr('item_link', item),
+                request.is_secure(),
+            )
             enc = None
             enc_url = self.__get_dynamic_attr('item_enclosure_url', item)
             if enc_url:
diff -Nru python-django-1.2.3/django/contrib/webdesign/tests.py python-django-1.2.4/django/contrib/webdesign/tests.py
diff -Nru python-django-1.2.3/django/core/cache/backends/base.py python-django-1.2.4/django/core/cache/backends/base.py
--- python-django-1.2.3/django/core/cache/backends/base.py	2010-01-27 09:21:35.000000000 +0100
+++ python-django-1.2.4/django/core/cache/backends/base.py	2010-09-12 21:07:09.000000000 +0200
@@ -1,10 +1,18 @@
 "Base Cache class."
 
-from django.core.exceptions import ImproperlyConfigured
+import warnings
+
+from django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning
 
 class InvalidCacheBackendError(ImproperlyConfigured):
     pass
 
+class CacheKeyWarning(DjangoRuntimeWarning):
+    pass
+
+# Memcached does not accept keys longer than this.
+MEMCACHE_MAX_KEY_LENGTH = 250
+
 class BaseCache(object):
     def __init__(self, params):
         timeout = params.get('timeout', 300)
@@ -116,3 +124,21 @@
     def clear(self):
         """Remove *all* values from the cache at once."""
         raise NotImplementedError
+
+    def validate_key(self, key):
+        """
+        Warn about keys that would not be portable to the memcached
+        backend. This encourages (but does not force) writing backend-portable
+        cache code.
+
+        """
+        if len(key) > MEMCACHE_MAX_KEY_LENGTH:
+            warnings.warn('Cache key will cause errors if used with memcached: '
+                    '%s (longer than %s)' % (key, MEMCACHE_MAX_KEY_LENGTH),
+                    CacheKeyWarning)
+        for char in key:
+            if ord(char) < 33 or ord(char) == 127:
+                warnings.warn('Cache key contains characters that will cause '
+                        'errors if used with memcached: %r' % key,
+                              CacheKeyWarning)
+
diff -Nru python-django-1.2.3/django/core/cache/backends/db.py python-django-1.2.4/django/core/cache/backends/db.py
--- python-django-1.2.3/django/core/cache/backends/db.py	2010-08-31 02:45:35.000000000 +0200
+++ python-django-1.2.4/django/core/cache/backends/db.py	2010-09-12 21:07:09.000000000 +0200
@@ -46,6 +46,7 @@
             self._cull_frequency = 3
 
     def get(self, key, default=None):
+        self.validate_key(key)
         db = router.db_for_read(self.cache_model_class)
         table = connections[db].ops.quote_name(self._table)
         cursor = connections[db].cursor()
@@ -65,9 +66,11 @@
         return pickle.loads(base64.decodestring(value))
 
     def set(self, key, value, timeout=None):
+        self.validate_key(key)
         self._base_set('set', key, value, timeout)
 
     def add(self, key, value, timeout=None):
+        self.validate_key(key)
         return self._base_set('add', key, value, timeout)
 
     def _base_set(self, mode, key, value, timeout=None):
@@ -103,6 +106,7 @@
             return True
 
     def delete(self, key):
+        self.validate_key(key)
         db = router.db_for_write(self.cache_model_class)
         table = connections[db].ops.quote_name(self._table)
         cursor = connections[db].cursor()
@@ -111,6 +115,7 @@
         transaction.commit_unless_managed(using=db)
 
     def has_key(self, key):
+        self.validate_key(key)
         db = router.db_for_read(self.cache_model_class)
         table = connections[db].ops.quote_name(self._table)
         cursor = connections[db].cursor()
diff -Nru python-django-1.2.3/django/core/cache/backends/dummy.py python-django-1.2.4/django/core/cache/backends/dummy.py
--- python-django-1.2.3/django/core/cache/backends/dummy.py	2010-01-27 09:21:35.000000000 +0100
+++ python-django-1.2.4/django/core/cache/backends/dummy.py	2010-09-12 21:07:09.000000000 +0200
@@ -6,22 +6,25 @@
     def __init__(self, *args, **kwargs):
         pass
 
-    def add(self, *args, **kwargs):
+    def add(self, key, *args, **kwargs):
+        self.validate_key(key)
         return True
 
     def get(self, key, default=None):
+        self.validate_key(key)
         return default
 
-    def set(self, *args, **kwargs):
-        pass
+    def set(self, key, *args, **kwargs):
+        self.validate_key(key)
 
-    def delete(self, *args, **kwargs):
-        pass
+    def delete(self, key, *args, **kwargs):
+        self.validate_key(key)
 
     def get_many(self, *args, **kwargs):
         return {}
 
-    def has_key(self, *args, **kwargs):
+    def has_key(self, key, *args, **kwargs):
+        self.validate_key(key)
         return False
 
     def set_many(self, *args, **kwargs):
diff -Nru python-django-1.2.3/django/core/cache/backends/filebased.py python-django-1.2.4/django/core/cache/backends/filebased.py
--- python-django-1.2.3/django/core/cache/backends/filebased.py	2010-09-10 15:09:19.000000000 +0200
+++ python-django-1.2.4/django/core/cache/backends/filebased.py	2010-09-12 21:07:09.000000000 +0200
@@ -32,6 +32,7 @@
             self._createdir()
 
     def add(self, key, value, timeout=None):
+        self.validate_key(key)
         if self.has_key(key):
             return False
 
@@ -39,6 +40,7 @@
         return True
 
     def get(self, key, default=None):
+        self.validate_key(key)
         fname = self._key_to_file(key)
         try:
             f = open(fname, 'rb')
@@ -56,6 +58,7 @@
         return default
 
     def set(self, key, value, timeout=None):
+        self.validate_key(key)
         fname = self._key_to_file(key)
         dirname = os.path.dirname(fname)
 
@@ -79,6 +82,7 @@
             pass
 
     def delete(self, key):
+        self.validate_key(key)
         try:
             self._delete(self._key_to_file(key))
         except (IOError, OSError):
@@ -95,6 +99,7 @@
             pass
 
     def has_key(self, key):
+        self.validate_key(key)
         fname = self._key_to_file(key)
         try:
             f = open(fname, 'rb')
diff -Nru python-django-1.2.3/django/core/cache/backends/locmem.py python-django-1.2.4/django/core/cache/backends/locmem.py
--- python-django-1.2.3/django/core/cache/backends/locmem.py	2010-05-04 16:00:30.000000000 +0200
+++ python-django-1.2.4/django/core/cache/backends/locmem.py	2010-09-12 21:07:09.000000000 +0200
@@ -30,6 +30,7 @@
         self._lock = RWLock()
 
     def add(self, key, value, timeout=None):
+        self.validate_key(key)
         self._lock.writer_enters()
         try:
             exp = self._expire_info.get(key)
@@ -44,6 +45,7 @@
             self._lock.writer_leaves()
 
     def get(self, key, default=None):
+        self.validate_key(key)
         self._lock.reader_enters()
         try:
             exp = self._expire_info.get(key)
@@ -76,6 +78,7 @@
         self._expire_info[key] = time.time() + timeout
 
     def set(self, key, value, timeout=None):
+        self.validate_key(key)
         self._lock.writer_enters()
         # Python 2.4 doesn't allow combined try-except-finally blocks.
         try:
@@ -87,6 +90,7 @@
             self._lock.writer_leaves()
 
     def has_key(self, key):
+        self.validate_key(key)
         self._lock.reader_enters()
         try:
             exp = self._expire_info.get(key)
@@ -127,6 +131,7 @@
             pass
 
     def delete(self, key):
+        self.validate_key(key)
         self._lock.writer_enters()
         try:
             self._delete(key)
diff -Nru python-django-1.2.3/django/core/cache/__init__.py python-django-1.2.4/django/core/cache/__init__.py
--- python-django-1.2.3/django/core/cache/__init__.py	2010-01-10 19:36:20.000000000 +0100
+++ python-django-1.2.4/django/core/cache/__init__.py	2010-10-09 19:32:43.000000000 +0200
@@ -15,10 +15,14 @@
 See docs/cache.txt for information on the public API.
 """
 
-from cgi import parse_qsl
+try:
+    from urlparse import parse_qsl
+except ImportError:
+    from cgi import parse_qsl
+
 from django.conf import settings
 from django.core import signals
-from django.core.cache.backends.base import InvalidCacheBackendError
+from django.core.cache.backends.base import InvalidCacheBackendError, CacheKeyWarning
 from django.utils import importlib
 
 # Name for use in settings file --> name of module in "backends" directory.
diff -Nru python-django-1.2.3/django/core/exceptions.py python-django-1.2.4/django/core/exceptions.py
--- python-django-1.2.3/django/core/exceptions.py	2010-04-15 13:19:59.000000000 +0200
+++ python-django-1.2.4/django/core/exceptions.py	2010-09-12 21:07:09.000000000 +0200
@@ -1,4 +1,9 @@
-"Global Django exceptions"
+"""
+Global Django exception and warning classes.
+"""
+
+class DjangoRuntimeWarning(RuntimeWarning):
+   pass
 
 class ObjectDoesNotExist(Exception):
     "The requested object does not exist"
diff -Nru python-django-1.2.3/django/core/files/storage.py python-django-1.2.4/django/core/files/storage.py
--- python-django-1.2.3/django/core/files/storage.py	2010-03-02 22:58:49.000000000 +0100
+++ python-django-1.2.4/django/core/files/storage.py	2010-10-09 10:25:01.000000000 +0200
@@ -116,7 +116,7 @@
     def url(self, name):
         """
         Returns an absolute URL where the file's contents can be accessed
-        directly by a web browser.
+        directly by a Web browser.
         """
         raise NotImplementedError()
 
diff -Nru python-django-1.2.3/django/core/files/uploadhandler.py python-django-1.2.4/django/core/files/uploadhandler.py
--- python-django-1.2.3/django/core/files/uploadhandler.py	2009-05-17 18:45:28.000000000 +0200
+++ python-django-1.2.4/django/core/files/uploadhandler.py	2010-11-11 18:51:45.000000000 +0100
@@ -109,7 +109,7 @@
         Signal that a file has completed. File size corresponds to the actual
         size accumulated by all the chunks.
 
-        Subclasses must should return a valid ``UploadedFile`` object.
+        Subclasses should return a valid ``UploadedFile`` object.
         """
         raise NotImplementedError()
 
diff -Nru python-django-1.2.3/django/core/handlers/base.py python-django-1.2.4/django/core/handlers/base.py
--- python-django-1.2.3/django/core/handlers/base.py	2010-06-03 20:50:04.000000000 +0200
+++ python-django-1.2.4/django/core/handlers/base.py	2010-10-09 10:25:01.000000000 +0200
@@ -208,7 +208,7 @@
 
     # If Apache's mod_rewrite had a whack at the URL, Apache set either
     # SCRIPT_URL or REDIRECT_URL to the full resource URL before applying any
-    # rewrites. Unfortunately not every webserver (lighttpd!) passes this
+    # rewrites. Unfortunately not every Web server (lighttpd!) passes this
     # information through all the time, so FORCE_SCRIPT_NAME, above, is still
     # needed.
     script_url = environ.get('SCRIPT_URL', u'')
diff -Nru python-django-1.2.3/django/core/mail/backends/smtp.py python-django-1.2.4/django/core/mail/backends/smtp.py
--- python-django-1.2.3/django/core/mail/backends/smtp.py	2009-11-04 02:59:05.000000000 +0100
+++ python-django-1.2.4/django/core/mail/backends/smtp.py	2010-12-21 16:28:11.000000000 +0100
@@ -91,13 +91,19 @@
             self._lock.release()
         return num_sent
 
+    def _sanitize(self, email):
+        name, domain = email.split('@', 1)
+        email = '@'.join([name, domain.encode('idna')])
+        return email
+
     def _send(self, email_message):
         """A helper method that does the actual sending."""
         if not email_message.recipients():
             return False
+        from_email = self._sanitize(email_message.from_email)
+        recipients = map(self._sanitize, email_message.recipients())
         try:
-            self.connection.sendmail(email_message.from_email,
-                    email_message.recipients(),
+            self.connection.sendmail(from_email, recipients,
                     email_message.message().as_string())
         except:
             if not self.fail_silently:
diff -Nru python-django-1.2.3/django/core/mail/__init__.py python-django-1.2.4/django/core/mail/__init__.py
--- python-django-1.2.3/django/core/mail/__init__.py	2010-01-04 13:05:04.000000000 +0100
+++ python-django-1.2.4/django/core/mail/__init__.py	2010-10-12 00:36:17.000000000 +0200
@@ -87,7 +87,7 @@
     """Sends a message to the admins, as defined by the ADMINS setting."""
     if not settings.ADMINS:
         return
-    EmailMessage(settings.EMAIL_SUBJECT_PREFIX + subject, message,
+    EmailMessage(u'%s%s' % (settings.EMAIL_SUBJECT_PREFIX, subject), message,
                  settings.SERVER_EMAIL, [a[1] for a in settings.ADMINS],
                  connection=connection).send(fail_silently=fail_silently)
 
@@ -96,7 +96,7 @@
     """Sends a message to the managers, as defined by the MANAGERS setting."""
     if not settings.MANAGERS:
         return
-    EmailMessage(settings.EMAIL_SUBJECT_PREFIX + subject, message,
+    EmailMessage(u'%s%s' % (settings.EMAIL_SUBJECT_PREFIX, subject), message,
                  settings.SERVER_EMAIL, [a[1] for a in settings.MANAGERS],
                  connection=connection).send(fail_silently=fail_silently)
 
diff -Nru python-django-1.2.3/django/core/mail/message.py python-django-1.2.4/django/core/mail/message.py
--- python-django-1.2.3/django/core/mail/message.py	2010-04-01 17:16:26.000000000 +0200
+++ python-django-1.2.4/django/core/mail/message.py	2010-10-14 20:38:43.000000000 +0200
@@ -67,7 +67,11 @@
             result = []
             for nm, addr in getaddresses((val,)):
                 nm = str(Header(nm.encode(encoding), encoding))
-                result.append(formataddr((nm, str(addr))))
+                try:
+                    addr = addr.encode('ascii')
+                except UnicodeEncodeError:  # IDN
+                    addr = str(Header(addr.encode(encoding), encoding))
+                result.append(formataddr((nm, addr)))
             val = ', '.join(result)
         else:
             val = Header(val.encode(encoding), encoding)
diff -Nru python-django-1.2.3/django/core/management/base.py python-django-1.2.4/django/core/management/base.py
--- python-django-1.2.3/django/core/management/base.py	2010-09-03 20:29:33.000000000 +0200
+++ python-django-1.2.4/django/core/management/base.py	2010-10-28 14:16:04.000000000 +0200
@@ -225,10 +225,10 @@
                     from django.db import connections, DEFAULT_DB_ALIAS
                     connection = connections[options.get('database', DEFAULT_DB_ALIAS)]
                     if connection.ops.start_transaction_sql():
-                        self.stdout.write(self.style.SQL_KEYWORD(connection.ops.start_transaction_sql()))
+                        self.stdout.write(self.style.SQL_KEYWORD(connection.ops.start_transaction_sql()) + '\n')
                 self.stdout.write(output)
                 if self.output_transaction:
-                    self.stdout.write(self.style.SQL_KEYWORD("COMMIT;") + '\n')
+                    self.stdout.write('\n' + self.style.SQL_KEYWORD("COMMIT;") + '\n')
         except CommandError, e:
             self.stderr.write(smart_str(self.style.ERROR('Error: %s\n' % e)))
             sys.exit(1)
diff -Nru python-django-1.2.3/django/core/management/commands/compilemessages.py python-django-1.2.4/django/core/management/commands/compilemessages.py
--- python-django-1.2.3/django/core/management/commands/compilemessages.py	2010-02-16 13:16:01.000000000 +0100
+++ python-django-1.2.4/django/core/management/commands/compilemessages.py	2010-10-10 18:45:06.000000000 +0200
@@ -1,9 +1,17 @@
+import codecs
 import os
 import sys
 from optparse import make_option
 from django.core.management.base import BaseCommand, CommandError
 
-def compile_messages(locale=None):
+def has_bom(fn):
+    f = open(fn, 'r')
+    sample = f.read(4)
+    return sample[:3] == '\xef\xbb\xbf' or \
+            sample.startswith(codecs.BOM_UTF16_LE) or \
+            sample.startswith(codecs.BOM_UTF16_BE)
+
+def compile_messages(stderr, locale=None):
     basedirs = [os.path.join('conf', 'locale'), 'locale']
     if os.environ.get('DJANGO_SETTINGS_MODULE'):
         from django.conf import settings
@@ -21,8 +29,11 @@
         for dirpath, dirnames, filenames in os.walk(basedir):
             for f in filenames:
                 if f.endswith('.po'):
-                    sys.stderr.write('processing file %s in %s\n' % (f, dirpath))
-                    pf = os.path.splitext(os.path.join(dirpath, f))[0]
+                    stderr.write('processing file %s in %s\n' % (f, dirpath))
+                    fn = os.path.join(dirpath, f)
+                    if has_bom(fn):
+                        raise CommandError("The %s file has a BOM (Byte Order Mark). Django only supports .po files encoded in UTF-8 and without any BOM." % fn)
+                    pf = os.path.splitext(fn)[0]
                     # Store the names of the .mo and .po files in an environment
                     # variable, rather than doing a string replacement into the
                     # command, so that we can take advantage of shell quoting, to
@@ -49,4 +60,4 @@
 
     def handle(self, **options):
         locale = options.get('locale')
-        compile_messages(locale)
+        compile_messages(self.stderr, locale=locale)
diff -Nru python-django-1.2.3/django/core/management/commands/loaddata.py python-django-1.2.4/django/core/management/commands/loaddata.py
--- python-django-1.2.3/django/core/management/commands/loaddata.py	2010-08-20 16:07:02.000000000 +0200
+++ python-django-1.2.4/django/core/management/commands/loaddata.py	2010-10-02 15:56:58.000000000 +0200
@@ -118,8 +118,9 @@
                 self.stderr.write(
                     self.style.ERROR("Problem installing fixture '%s': %s is not a known serialization format.\n" %
                         (fixture_name, format)))
-                transaction.rollback(using=using)
-                transaction.leave_transaction_management(using=using)
+                if commit:
+                    transaction.rollback(using=using)
+                    transaction.leave_transaction_management(using=using)
                 return
 
             if os.path.isabs(fixture_name):
@@ -152,8 +153,9 @@
                             fixture.close()
                             self.stderr.write(self.style.ERROR("Multiple fixtures named '%s' in %s. Aborting.\n" %
                                 (fixture_name, humanize(fixture_dir))))
-                            transaction.rollback(using=using)
-                            transaction.leave_transaction_management(using=using)
+                            if commit:
+                                transaction.rollback(using=using)
+                                transaction.leave_transaction_management(using=using)
                             return
                         else:
                             fixture_count += 1
@@ -178,8 +180,9 @@
                             except Exception:
                                 import traceback
                                 fixture.close()
-                                transaction.rollback(using=using)
-                                transaction.leave_transaction_management(using=using)
+                                if commit:
+                                    transaction.rollback(using=using)
+                                    transaction.leave_transaction_management(using=using)
                                 if show_traceback:
                                     traceback.print_exc()
                                 else:
@@ -196,8 +199,9 @@
                                 self.stderr.write(
                                     self.style.ERROR("No fixture data found for '%s'. (File format may be invalid.)\n" %
                                         (fixture_name)))
-                                transaction.rollback(using=using)
-                                transaction.leave_transaction_management(using=using)
+                                if commit:
+                                    transaction.rollback(using=using)
+                                    transaction.leave_transaction_management(using=using)
                                 return
 
                     except Exception, e:
diff -Nru python-django-1.2.3/django/core/management/commands/shell.py python-django-1.2.4/django/core/management/commands/shell.py
--- python-django-1.2.3/django/core/management/commands/shell.py	2008-03-18 15:54:39.000000000 +0100
+++ python-django-1.2.4/django/core/management/commands/shell.py	2010-12-13 14:58:09.000000000 +0100
@@ -23,11 +23,21 @@
             if use_plain:
                 # Don't bother loading IPython, because the user wants plain Python.
                 raise ImportError
-            import IPython
-            # Explicitly pass an empty list as arguments, because otherwise IPython
-            # would use sys.argv from this script.
-            shell = IPython.Shell.IPShell(argv=[])
-            shell.mainloop()
+            try:
+                from IPython.frontend.terminal.embed import TerminalInteractiveShell
+                shell = TerminalInteractiveShell()
+                shell.mainloop()
+            except ImportError:
+                # IPython < 0.11
+                # Explicitly pass an empty list as arguments, because otherwise
+                # IPython would use sys.argv from this script.
+                try:
+                    from IPython.Shell import IPShell
+                    shell = IPShell(argv=[])
+                    shell.mainloop()
+                except ImportError:
+                    # IPython not found at all, raise ImportError
+                    raise
         except ImportError:
             import code
             # Set up a dictionary to serve as the environment for the shell, so
diff -Nru python-django-1.2.3/django/core/management/sql.py python-django-1.2.4/django/core/management/sql.py
--- python-django-1.2.3/django/core/management/sql.py	2010-05-04 16:00:30.000000000 +0200
+++ python-django-1.2.4/django/core/management/sql.py	2010-10-28 14:15:46.000000000 +0200
@@ -2,12 +2,9 @@
 import re
 
 from django.conf import settings
-from django.contrib.contenttypes import generic
 from django.core.management.base import CommandError
-from django.dispatch import dispatcher
 from django.db import models
 from django.db.models import get_models
-from django.db.backends.util import truncate_name
 
 def sql_create(app, style, connection):
     "Returns a list of the CREATE TABLE SQL statements for the given app."
@@ -18,7 +15,7 @@
         raise CommandError("Django doesn't know which syntax to use for your SQL statements,\n" +
             "because you haven't specified the ENGINE setting for the database.\n" +
             "Edit your settings file and change DATBASES['default']['ENGINE'] to something like\n" +
-            "'django.db.backends.postgresql' or 'django.db.backends.mysql'")
+            "'django.db.backends.postgresql' or 'django.db.backends.mysql'.")
 
     # Get installed models, so we generate REFERENCES right.
     # We trim models from the current app so that the sqlreset command does not
diff -Nru python-django-1.2.3/django/core/management/validation.py python-django-1.2.4/django/core/management/validation.py
--- python-django-1.2.3/django/core/management/validation.py	2010-03-13 23:11:48.000000000 +0100
+++ python-django-1.2.4/django/core/management/validation.py	2010-11-15 00:36:40.000000000 +0100
@@ -1,7 +1,14 @@
 import sys
+
+from django.contrib.contenttypes.generic import GenericForeignKey, GenericRelation
 from django.core.management.color import color_style
 from django.utils.itercompat import is_iterable
 
+try:
+    any
+except NameError:
+    from django.utils.itercompat import any
+
 class ModelErrorCollection:
     def __init__(self, outfile=sys.stdout):
         self.errors = []
@@ -216,6 +223,12 @@
                 e.add(opts, "'%s' specifies an m2m relation through model %s, "
                     "which has not been installed" % (f.name, f.rel.through)
                 )
+            elif isinstance(f, GenericRelation):
+                if not any([isinstance(vfield, GenericForeignKey) for vfield in f.rel.to._meta.virtual_fields]):
+                    e.add(opts, "Model '%s' must have a GenericForeignKey in "
+                        "order to create a GenericRelation that points to it."
+                        % f.rel.to.__name__
+                    )
 
             rel_opts = f.rel.to._meta
             rel_name = RelatedObject(f.rel.to, cls, f).get_accessor_name()
@@ -257,7 +270,7 @@
                     continue
                 # Skip ordering in the format field1__field2 (FIXME: checking
                 # this format would be nice, but it's a little fiddly).
-                if '_' in field_name:
+                if '__' in field_name:
                     continue
                 try:
                     opts.get_field(field_name, many_to_many=False)
diff -Nru python-django-1.2.3/django/core/serializers/__init__.py python-django-1.2.4/django/core/serializers/__init__.py
--- python-django-1.2.3/django/core/serializers/__init__.py	2009-12-22 16:18:51.000000000 +0100
+++ python-django-1.2.4/django/core/serializers/__init__.py	2010-12-04 05:34:04.000000000 +0100
@@ -36,7 +36,7 @@
 _serializers = {}
 
 def register_serializer(format, serializer_module, serializers=None):
-    """"Register a new serializer.
+    """Register a new serializer.
 
     ``serializer_module`` should be the fully qualified module name
     for the serializer.
diff -Nru python-django-1.2.3/django/core/serializers/xml_serializer.py python-django-1.2.4/django/core/serializers/xml_serializer.py
--- python-django-1.2.3/django/core/serializers/xml_serializer.py	2010-03-18 16:22:15.000000000 +0100
+++ python-django-1.2.4/django/core/serializers/xml_serializer.py	2010-09-19 16:05:43.000000000 +0200
@@ -42,10 +42,16 @@
             raise base.SerializationError("Non-model object (%s) encountered during serialization" % type(obj))
 
         self.indent(1)
-        self.xml.startElement("object", {
-            "pk"    : smart_unicode(obj._get_pk_val()),
-            "model" : smart_unicode(obj._meta),
-        })
+        obj_pk = obj._get_pk_val()
+        if obj_pk is None:
+            attrs = {"model": smart_unicode(obj._meta),}
+        else:
+            attrs = {
+                "pk": smart_unicode(obj._get_pk_val()),
+                "model": smart_unicode(obj._meta),
+            }
+
+        self.xml.startElement("object", attrs)
 
     def end_object(self, obj):
         """
@@ -166,11 +172,12 @@
         # bail.
         Model = self._get_model_from_node(node, "model")
 
-        # Start building a data dictionary from the object.  If the node is
-        # missing the pk attribute, bail.
-        pk = node.getAttribute("pk")
-        if not pk:
-            raise base.DeserializationError("<object> node is missing the 'pk' attribute")
+        # Start building a data dictionary from the object.
+        # If the node is missing the pk set it to None
+        if node.hasAttribute("pk"):
+            pk = node.getAttribute("pk")
+        else:
+            pk = None
 
         data = {Model._meta.pk.attname : Model._meta.pk.to_python(pk)}
 
diff -Nru python-django-1.2.3/django/core/servers/fastcgi.py python-django-1.2.4/django/core/servers/fastcgi.py
--- python-django-1.2.3/django/core/servers/fastcgi.py	2009-04-01 23:37:34.000000000 +0200
+++ python-django-1.2.4/django/core/servers/fastcgi.py	2010-10-27 18:04:33.000000000 +0200
@@ -27,26 +27,26 @@
 
 Optional Fcgi settings: (setting=value)
   protocol=PROTOCOL    fcgi, scgi, ajp, ... (default fcgi)
-  host=HOSTNAME        hostname to listen on..
+  host=HOSTNAME        hostname to listen on.
   port=PORTNUM         port to listen on.
   socket=FILE          UNIX socket to listen on.
-  method=IMPL          prefork or threaded (default prefork)
-  maxrequests=NUMBER   number of requests a child handles before it is 
+  method=IMPL          prefork or threaded (default prefork).
+  maxrequests=NUMBER   number of requests a child handles before it is
                        killed and a new child is forked (0 = no limit).
-  maxspare=NUMBER      max number of spare processes / threads
+  maxspare=NUMBER      max number of spare processes / threads.
   minspare=NUMBER      min number of spare processes / threads.
-  maxchildren=NUMBER   hard limit number of processes / threads
+  maxchildren=NUMBER   hard limit number of processes / threads.
   daemonize=BOOL       whether to detach from terminal.
   pidfile=FILE         write the spawned process-id to this file.
   workdir=DIRECTORY    change to this directory when daemonizing.
-  debug=BOOL           set to true to enable flup tracebacks
+  debug=BOOL           set to true to enable flup tracebacks.
   outlog=FILE          write stdout to this file.
   errlog=FILE          write stderr to this file.
-  umask=UMASK          umask to use when daemonizing (default 022).
+  umask=UMASK          umask to use when daemonizing, in octal notation (default 022).
 
 Examples:
   Run a "standard" fastcgi process on a file-descriptor
-  (for webservers which spawn your processes for you)
+  (for Web servers which spawn your processes for you)
     $ manage.py runfcgi method=threaded
 
   Run a scgi server on a TCP host/port
@@ -166,7 +166,7 @@
     if options['errlog']:
         daemon_kwargs['err_log'] = options['errlog']
     if options['umask']:
-        daemon_kwargs['umask'] = int(options['umask'])
+        daemon_kwargs['umask'] = int(options['umask'], 8)
 
     if daemonize:
         from django.utils.daemonize import become_daemon
diff -Nru python-django-1.2.3/django/db/backends/__init__.py python-django-1.2.4/django/db/backends/__init__.py
--- python-django-1.2.3/django/db/backends/__init__.py	2010-05-28 15:46:12.000000000 +0200
+++ python-django-1.2.4/django/db/backends/__init__.py	2010-11-19 09:15:40.000000000 +0100
@@ -22,7 +22,7 @@
         self.alias = alias
 
     def __eq__(self, other):
-        return self.settings_dict == other.settings_dict
+        return self.alias == other.alias
 
     def __ne__(self, other):
         return not self == other
@@ -233,6 +233,13 @@
         """
         return "%s"
 
+    def max_in_list_size(self):
+        """
+        Returns the maximum number of items that can be passed in a single 'IN'
+        list condition, or None if the backend does not impose a limit.
+        """
+        return None
+
     def max_name_length(self):
         """
         Returns the maximum length of table and column names, or None if there
diff -Nru python-django-1.2.3/django/db/backends/oracle/base.py python-django-1.2.4/django/db/backends/oracle/base.py
--- python-django-1.2.3/django/db/backends/oracle/base.py	2010-08-30 15:25:22.000000000 +0200
+++ python-django-1.2.4/django/db/backends/oracle/base.py	2010-12-08 09:00:50.000000000 +0100
@@ -6,16 +6,38 @@
 
 
 import datetime
-import os
 import sys
 import time
 from decimal import Decimal
 
-# Oracle takes client-side character set encoding from the environment.
-os.environ['NLS_LANG'] = '.UTF8'
-# This prevents unicode from getting mangled by getting encoded into the
-# potentially non-unicode database character set.
-os.environ['ORA_NCHAR_LITERAL_REPLACE'] = 'TRUE'
+
+def _setup_environment(environ):
+    import platform
+    # Cygwin requires some special voodoo to set the environment variables
+    # properly so that Oracle will see them.
+    if platform.system().upper().startswith('CYGWIN'):
+        try:
+            import ctypes
+        except ImportError, e:
+            from django.core.exceptions import ImproperlyConfigured
+            raise ImproperlyConfigured("Error loading ctypes: %s; "
+                                       "the Oracle backend requires ctypes to "
+                                       "operate correctly under Cygwin." % e)
+        kernel32 = ctypes.CDLL('kernel32')
+        for name, value in environ:
+            kernel32.SetEnvironmentVariableA(name, value)
+    else:
+        import os
+        os.environ.update(environ)
+
+_setup_environment([
+    # Oracle takes client-side character set encoding from the environment.
+    ('NLS_LANG', '.UTF8'),
+    # This prevents unicode from getting mangled by getting encoded into the
+    # potentially non-unicode database character set.
+    ('ORA_NCHAR_LITERAL_REPLACE', 'TRUE'),
+])
+
 
 try:
     import cx_Oracle as Database
@@ -178,6 +200,9 @@
             return "UPPER(%s)"
         return "%s"
 
+    def max_in_list_size(self):
+        return 1000
+
     def max_name_length(self):
         return 30
 
@@ -326,11 +351,11 @@
         'istartswith': "LIKE UPPER(TRANSLATE(%s USING NCHAR_CS)) ESCAPE TRANSLATE('\\' USING NCHAR_CS)",
         'iendswith': "LIKE UPPER(TRANSLATE(%s USING NCHAR_CS)) ESCAPE TRANSLATE('\\' USING NCHAR_CS)",
     }
-    oracle_version = None
 
     def __init__(self, *args, **kwargs):
         super(DatabaseWrapper, self).__init__(*args, **kwargs)
 
+        self.oracle_version = None
         self.features = DatabaseFeatures()
         self.ops = DatabaseOperations()
         self.client = DatabaseClient(self)
@@ -343,9 +368,9 @@
 
     def _connect_string(self):
         settings_dict = self.settings_dict
-        if len(settings_dict['HOST'].strip()) == 0:
+        if not settings_dict['HOST'].strip():
             settings_dict['HOST'] = 'localhost'
-        if len(settings_dict['PORT'].strip()) != 0:
+        if settings_dict['PORT'].strip():
             dsn = Database.makedsn(settings_dict['HOST'],
                                    int(settings_dict['PORT']),
                                    settings_dict['NAME'])
@@ -393,6 +418,28 @@
     def _savepoint_commit(self, sid):
         pass
 
+    def _commit(self):
+        if self.connection is not None:
+            try:
+                return self.connection.commit()
+            except Database.IntegrityError, e:
+                # In case cx_Oracle implements (now or in a future version)
+                # raising this specific exception
+                raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2]
+            except Database.DatabaseError, e:
+                # cx_Oracle 5.0.4 raises a cx_Oracle.DatabaseError exception
+                # with the following attributes and values:
+                #  code = 2091
+                #  message = 'ORA-02091: transaction rolled back
+                #            'ORA-02291: integrity constraint (TEST_DJANGOTEST.SYS
+                #               _C00102056) violated - parent key not found'
+                # We convert that particular case to our IntegrityError exception
+                x = e.args[0]
+                if hasattr(x, 'code') and hasattr(x, 'message') \
+                   and x.code == 2091 and 'ORA-02291' in x.message:
+                    raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2]
+                raise utils.DatabaseError, utils.DatabaseError(*tuple(e)), sys.exc_info()[2]
+
 
 class OracleParam(object):
     """
@@ -641,19 +688,15 @@
     # TODO: colorize this SQL code with style.SQL_KEYWORD(), etc.
     return """
 DECLARE
-    startvalue integer;
-    cval integer;
+    table_value integer;
+    seq_value integer;
 BEGIN
-    LOCK TABLE %(table)s IN SHARE MODE;
-    SELECT NVL(MAX(%(column)s), 0) INTO startvalue FROM %(table)s;
-    SELECT "%(sequence)s".nextval INTO cval FROM dual;
-    cval := startvalue - cval;
-    IF cval != 0 THEN
-        EXECUTE IMMEDIATE 'ALTER SEQUENCE "%(sequence)s" MINVALUE 0 INCREMENT BY '||cval;
-        SELECT "%(sequence)s".nextval INTO cval FROM dual;
-        EXECUTE IMMEDIATE 'ALTER SEQUENCE "%(sequence)s" INCREMENT BY 1';
-    END IF;
-    COMMIT;
+    SELECT NVL(MAX(%(column)s), 0) INTO table_value FROM %(table)s;
+    SELECT NVL(last_number - cache_size, 0) INTO seq_value FROM user_sequences
+           WHERE sequence_name = '%(sequence)s';
+    WHILE table_value > seq_value LOOP
+        SELECT "%(sequence)s".nextval INTO seq_value FROM dual;
+    END LOOP;
 END;
 /"""
 
diff -Nru python-django-1.2.3/django/db/backends/oracle/creation.py python-django-1.2.4/django/db/backends/oracle/creation.py
--- python-django-1.2.3/django/db/backends/oracle/creation.py	2009-12-22 16:18:51.000000000 +0100
+++ python-django-1.2.4/django/db/backends/oracle/creation.py	2010-11-07 22:02:49.000000000 +0100
@@ -1,5 +1,4 @@
 import sys, time
-from django.core import management
 from django.db.backends.creation import BaseDatabaseCreation
 
 TEST_DATABASE_PREFIX = 'test_'
@@ -39,7 +38,9 @@
         'URLField':                     'VARCHAR2(%(max_length)s)',
     }
 
-    remember = {}
+    def __init__(self, connection):
+        self.remember = {}
+        super(DatabaseCreation, self).__init__(connection)
 
     def _create_test_db(self, verbosity=1, autoclobber=False):
         TEST_NAME = self._test_database_name()
@@ -135,9 +136,6 @@
             'tblspace_temp': TEST_TBLSPACE_TMP,
         }
 
-        self.remember['user'] = self.connection.settings_dict['USER']
-        self.remember['passwd'] = self.connection.settings_dict['PASSWORD']
-
         cursor = self.connection.cursor()
         time.sleep(1) # To avoid "database is being accessed by other users" errors.
         if self._test_user_create():
@@ -156,7 +154,7 @@
         statements = [
             """CREATE TABLESPACE %(tblspace)s
                DATAFILE '%(tblspace)s.dbf' SIZE 20M
-               REUSE AUTOEXTEND ON NEXT 10M MAXSIZE 100M
+               REUSE AUTOEXTEND ON NEXT 10M MAXSIZE 200M
             """,
             """CREATE TEMPORARY TABLESPACE %(tblspace_temp)s
                TEMPFILE '%(tblspace_temp)s.dbf' SIZE 20M
@@ -214,35 +212,13 @@
                 name = self.connection.settings_dict['TEST_NAME']
         except AttributeError:
             pass
-        except:
-            raise
         return name
 
     def _test_database_create(self):
-        name = True
-        try:
-            if self.connection.settings_dict['TEST_CREATE']:
-                name = True
-            else:
-                name = False
-        except KeyError:
-            pass
-        except:
-            raise
-        return name
+        return self.connection.settings_dict.get('TEST_CREATE', True)
 
     def _test_user_create(self):
-        name = True
-        try:
-            if self.connection.settings_dict['TEST_USER_CREATE']:
-                name = True
-            else:
-                name = False
-        except KeyError:
-            pass
-        except:
-            raise
-        return name
+        return self.connection.settings_dict.get('TEST_USER_CREATE', True)
 
     def _test_database_user(self):
         name = TEST_DATABASE_PREFIX + self.connection.settings_dict['USER']
@@ -251,8 +227,6 @@
                 name = self.connection.settings_dict['TEST_USER']
         except KeyError:
             pass
-        except:
-            raise
         return name
 
     def _test_database_passwd(self):
@@ -262,8 +236,6 @@
                 name = self.connection.settings_dict['TEST_PASSWD']
         except KeyError:
             pass
-        except:
-            raise
         return name
 
     def _test_database_tblspace(self):
@@ -273,8 +245,6 @@
                 name = self.connection.settings_dict['TEST_TBLSPACE']
         except KeyError:
             pass
-        except:
-            raise
         return name
 
     def _test_database_tblspace_tmp(self):
@@ -284,6 +254,4 @@
                 name = self.connection.settings_dict['TEST_TBLSPACE_TMP']
         except KeyError:
             pass
-        except:
-            raise
         return name
diff -Nru python-django-1.2.3/django/db/backends/postgresql/base.py python-django-1.2.4/django/db/backends/postgresql/base.py
--- python-django-1.2.3/django/db/backends/postgresql/base.py	2010-08-30 15:25:22.000000000 +0200
+++ python-django-1.2.4/django/db/backends/postgresql/base.py	2010-10-23 02:11:50.000000000 +0200
@@ -150,6 +150,13 @@
             cursor.execute("SET client_encoding to 'UNICODE'")
         return UnicodeCursorWrapper(cursor, 'utf-8')
 
+    def _commit(self):
+        if self.connection is not None:
+            try:
+                return self.connection.commit()
+            except Database.IntegrityError, e:
+                raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2]
+
 def typecast_string(s):
     """
     Cast all returned strings to unicode strings.
diff -Nru python-django-1.2.3/django/db/backends/postgresql_psycopg2/base.py python-django-1.2.4/django/db/backends/postgresql_psycopg2/base.py
--- python-django-1.2.3/django/db/backends/postgresql_psycopg2/base.py	2010-08-30 15:25:22.000000000 +0200
+++ python-django-1.2.4/django/db/backends/postgresql_psycopg2/base.py	2010-10-23 02:11:50.000000000 +0200
@@ -189,3 +189,10 @@
         finally:
             self.isolation_level = level
             self.features.uses_savepoints = bool(level)
+
+    def _commit(self):
+        if self.connection is not None:
+            try:
+                return self.connection.commit()
+            except Database.IntegrityError, e:
+                raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2]
diff -Nru python-django-1.2.3/django/db/backends/util.py python-django-1.2.4/django/db/backends/util.py
--- python-django-1.2.3/django/db/backends/util.py	2010-05-04 16:00:30.000000000 +0200
+++ python-django-1.2.4/django/db/backends/util.py	2010-11-21 16:19:46.000000000 +0100
@@ -81,7 +81,7 @@
     else:
         microseconds = '0'
     return datetime.datetime(int(dates[0]), int(dates[1]), int(dates[2]),
-        int(times[0]), int(times[1]), int(seconds), int(float('.'+microseconds) * 1000000))
+        int(times[0]), int(times[1]), int(seconds), int((microseconds + '000000')[:6]))
 
 def typecast_boolean(s):
     if s is None: return None
diff -Nru python-django-1.2.3/django/db/__init__.py python-django-1.2.4/django/db/__init__.py
--- python-django-1.2.3/django/db/__init__.py	2010-08-05 15:19:54.000000000 +0200
+++ python-django-1.2.4/django/db/__init__.py	2010-10-28 14:15:05.000000000 +0200
@@ -32,7 +32,7 @@
     }
 
 if DEFAULT_DB_ALIAS not in settings.DATABASES:
-    raise ImproperlyConfigured("You must default a '%s' database" % DEFAULT_DB_ALIAS)
+    raise ImproperlyConfigured("You must define a '%s' database" % DEFAULT_DB_ALIAS)
 
 for alias, database in settings.DATABASES.items():
     if 'ENGINE' not in database:
diff -Nru python-django-1.2.3/django/db/models/base.py python-django-1.2.4/django/db/models/base.py
--- python-django-1.2.3/django/db/models/base.py	2010-08-17 09:08:26.000000000 +0200
+++ python-django-1.2.4/django/db/models/base.py	2010-11-19 00:46:26.000000000 +0100
@@ -5,7 +5,8 @@
 from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned, FieldError, ValidationError, NON_FIELD_ERRORS
 from django.core import validators
 from django.db.models.fields import AutoField, FieldDoesNotExist
-from django.db.models.fields.related import OneToOneRel, ManyToOneRel, OneToOneField
+from django.db.models.fields.related import (OneToOneRel, ManyToOneRel,
+    OneToOneField, add_lazy_relation)
 from django.db.models.query import delete_objects, Q
 from django.db.models.query_utils import CollectedObjects, DeferredAttribute
 from django.db.models.options import Options
@@ -223,8 +224,25 @@
         if opts.order_with_respect_to:
             cls.get_next_in_order = curry(cls._get_next_or_previous_in_order, is_next=True)
             cls.get_previous_in_order = curry(cls._get_next_or_previous_in_order, is_next=False)
-            setattr(opts.order_with_respect_to.rel.to, 'get_%s_order' % cls.__name__.lower(), curry(method_get_order, cls))
-            setattr(opts.order_with_respect_to.rel.to, 'set_%s_order' % cls.__name__.lower(), curry(method_set_order, cls))
+            # defer creating accessors on the foreign class until we are
+            # certain it has been created
+            def make_foreign_order_accessors(field, model, cls):
+                setattr(
+                    field.rel.to,
+                    'get_%s_order' % cls.__name__.lower(),
+                    curry(method_get_order, cls)
+                )
+                setattr(
+                    field.rel.to,
+                    'set_%s_order' % cls.__name__.lower(),
+                    curry(method_set_order, cls)
+                )
+            add_lazy_relation(
+                cls,
+                opts.order_with_respect_to,
+                opts.order_with_respect_to.rel.to,
+                make_foreign_order_accessors
+            )
 
         # Give the class a docstring -- its definition.
         if cls.__doc__ is None:
@@ -242,6 +260,10 @@
     """
     def __init__(self, db=None):
         self.db = db
+        # If true, uniqueness validation checks will consider this a new, as-yet-unsaved object.
+        # Necessary for correct validation of new instances of objects with explicit (non-auto) PKs.
+        # This impacts validation only; it has no effect on the actual save.
+        self.adding = True
 
 class Model(object):
     __metaclass__ = ModelBase
@@ -535,12 +557,15 @@
 
         # Store the database on which the object was saved
         self._state.db = using
+        # Once saved, this is no longer a to-be-added instance.
+        self._state.adding = False
 
         # Signal that the save is complete
         if origin and not meta.auto_created:
             signals.post_save.send(sender=origin, instance=self,
                 created=(not record_exists), raw=raw)
 
+
     save_base.alters_data = True
 
     def _collect_sub_objects(self, seen_objs, parent=None, nullable=False):
@@ -765,7 +790,7 @@
                 if lookup_value is None:
                     # no value, skip the lookup
                     continue
-                if f.primary_key and not getattr(self, '_adding', False):
+                if f.primary_key and not self._state.adding:
                     # no need to check for unique primary key when editing
                     continue
                 lookup_kwargs[str(field_name)] = lookup_value
@@ -778,7 +803,7 @@
 
             # Exclude the current object from the query if we are editing an
             # instance (as opposed to creating a new one)
-            if not getattr(self, '_adding', False) and self.pk is not None:
+            if not self._state.adding and self.pk is not None:
                 qs = qs.exclude(pk=self.pk)
 
             if qs.exists():
@@ -808,7 +833,7 @@
             qs = model_class._default_manager.filter(**lookup_kwargs)
             # Exclude the current object from the query if we are editing an
             # instance (as opposed to creating a new one)
-            if not getattr(self, '_adding', False) and self.pk is not None:
+            if not self._state.adding and self.pk is not None:
                 qs = qs.exclude(pk=self.pk)
 
             if qs.exists():
diff -Nru python-django-1.2.3/django/db/models/fields/files.py python-django-1.2.4/django/db/models/fields/files.py
--- python-django-1.2.3/django/db/models/fields/files.py	2009-12-22 16:18:51.000000000 +0100
+++ python-django-1.2.4/django/db/models/fields/files.py	2010-12-13 14:56:02.000000000 +0100
@@ -73,7 +73,7 @@
     def _get_size(self):
         self._require_file()
         if not self._committed:
-            return len(self.file)
+            return self.file.size
         return self.storage.size(self.name)
     size = property(_get_size)
 
@@ -93,7 +93,7 @@
         setattr(self.instance, self.field.name, self.name)
 
         # Update the filesize cache
-        self._size = len(content)
+        self._size = content.size
         self._committed = True
 
         # Save the object because it has changed, unless save is False
diff -Nru python-django-1.2.3/django/db/models/fields/__init__.py python-django-1.2.4/django/db/models/fields/__init__.py
--- python-django-1.2.3/django/db/models/fields/__init__.py	2010-08-07 09:39:19.000000000 +0200
+++ python-django-1.2.4/django/db/models/fields/__init__.py	2010-10-09 10:25:01.000000000 +0200
@@ -514,7 +514,7 @@
         raise exceptions.ValidationError(self.error_messages['invalid'])
 
     def get_prep_lookup(self, lookup_type, value):
-        # Special-case handling for filters coming from a web request (e.g. the
+        # Special-case handling for filters coming from a Web request (e.g. the
         # admin interface). Only works for scalar values (not lists). If you're
         # passing in a list, you might as well make things the right type when
         # constructing the list.
@@ -622,7 +622,7 @@
 
     def pre_save(self, model_instance, add):
         if self.auto_now or (self.auto_now_add and add):
-            value = datetime.datetime.now()
+            value = datetime.date.today()
             setattr(model_instance, self.attname, value)
             return value
         else:
@@ -709,6 +709,14 @@
                 except ValueError:
                     raise exceptions.ValidationError(self.error_messages['invalid'])
 
+    def pre_save(self, model_instance, add):
+        if self.auto_now or (self.auto_now_add and add):
+            value = datetime.datetime.now()
+            setattr(model_instance, self.attname, value)
+            return value
+        else:
+            return super(DateTimeField, self).pre_save(model_instance, add)
+
     def get_prep_value(self, value):
         return self.to_python(value)
 
@@ -946,7 +954,7 @@
         raise exceptions.ValidationError(self.error_messages['invalid'])
 
     def get_prep_lookup(self, lookup_type, value):
-        # Special-case handling for filters coming from a web request (e.g. the
+        # Special-case handling for filters coming from a Web request (e.g. the
         # admin interface). Only works for scalar values (not lists). If you're
         # passing in a list, you might as well make things the right type when
         # constructing the list.
diff -Nru python-django-1.2.3/django/db/models/fields/related.py python-django-1.2.4/django/db/models/fields/related.py
--- python-django-1.2.3/django/db/models/fields/related.py	2010-07-30 04:59:14.000000000 +0200
+++ python-django-1.2.4/django/db/models/fields/related.py	2010-11-16 23:17:51.000000000 +0100
@@ -420,7 +420,7 @@
             def create(self, **kwargs):
                 kwargs.update({rel_field.name: instance})
                 db = router.db_for_write(rel_model, instance=instance)
-                return super(RelatedManager, self).using(db).create(**kwargs)
+                return super(RelatedManager, self.db_manager(db)).create(**kwargs)
             create.alters_data = True
 
             def get_or_create(self, **kwargs):
@@ -428,7 +428,7 @@
                 # ForeignRelatedObjectsDescriptor knows about.
                 kwargs.update({rel_field.name: instance})
                 db = router.db_for_write(rel_model, instance=instance)
-                return super(RelatedManager, self).using(db).get_or_create(**kwargs)
+                return super(RelatedManager, self.db_manager(db)).get_or_create(**kwargs)
             get_or_create.alters_data = True
 
             # remove() and clear() are only provided if the ForeignKey can have a value of null.
@@ -517,7 +517,7 @@
                 opts = through._meta
                 raise AttributeError("Cannot use create() on a ManyToManyField which specifies an intermediary model. Use %s.%s's Manager instead." % (opts.app_label, opts.object_name))
             db = router.db_for_write(self.instance.__class__, instance=self.instance)
-            new_obj = super(ManyRelatedManager, self).using(db).create(**kwargs)
+            new_obj = super(ManyRelatedManager, self.db_manager(db)).create(**kwargs)
             self.add(new_obj)
             return new_obj
         create.alters_data = True
@@ -525,7 +525,7 @@
         def get_or_create(self, **kwargs):
             db = router.db_for_write(self.instance.__class__, instance=self.instance)
             obj, created = \
-                super(ManyRelatedManager, self).using(db).get_or_create(**kwargs)
+                super(ManyRelatedManager, self.db_manager(db)).get_or_create(**kwargs)
             # We only need to add() if created because if we got an object back
             # from get() then the relationship already exists.
             if created:
@@ -829,7 +829,10 @@
         if value is None:
             return
 
-        qs = self.rel.to._default_manager.filter(**{self.rel.field_name:value})
+        using = router.db_for_read(model_instance.__class__, instance=model_instance)
+        qs = self.rel.to._default_manager.using(using).filter(
+                **{self.rel.field_name: value}
+             )
         qs = qs.complex_filter(self.rel.limit_choices_to)
         if not qs.exists():
             raise exceptions.ValidationError(self.error_messages['invalid'] % {
diff -Nru python-django-1.2.3/django/db/models/fields/subclassing.py python-django-1.2.4/django/db/models/fields/subclassing.py
--- python-django-1.2.3/django/db/models/fields/subclassing.py	2009-12-22 16:18:51.000000000 +0100
+++ python-django-1.2.4/django/db/models/fields/subclassing.py	2010-12-04 08:05:22.000000000 +0100
@@ -63,8 +63,8 @@
     A metaclass to normalize arguments give to the get_db_prep_* and db_type
     methods on fields.
     """
-    def __new__(cls, names, bases, attrs):
-        new_cls = super(LegacyConnection, cls).__new__(cls, names, bases, attrs)
+    def __new__(cls, name, bases, attrs):
+        new_cls = super(LegacyConnection, cls).__new__(cls, name, bases, attrs)
         for attr in ('db_type', 'get_db_prep_save'):
             setattr(new_cls, attr, call_with_connection(getattr(new_cls, attr)))
         for attr in ('get_db_prep_lookup', 'get_db_prep_value'):
@@ -76,10 +76,11 @@
     A metaclass for custom Field subclasses. This ensures the model's attribute
     has the descriptor protocol attached to it.
     """
-    def __new__(cls, base, name, attrs):
-        new_class = super(SubfieldBase, cls).__new__(cls, base, name, attrs)
+    def __new__(cls, name, bases, attrs):
+        new_class = super(SubfieldBase, cls).__new__(cls, name, bases, attrs)
         new_class.contribute_to_class = make_contrib(
-                attrs.get('contribute_to_class'))
+            new_class, attrs.get('contribute_to_class')
+        )
         return new_class
 
 class Creator(object):
@@ -97,7 +98,7 @@
     def __set__(self, obj, value):
         obj.__dict__[self.field.name] = self.field.to_python(value)
 
-def make_contrib(func=None):
+def make_contrib(superclass, func=None):
     """
     Returns a suitable contribute_to_class() method for the Field subclass.
 
@@ -110,7 +111,7 @@
         if func:
             func(self, cls, name)
         else:
-            super(self.__class__, self).contribute_to_class(cls, name)
+            super(superclass, self).contribute_to_class(cls, name)
         setattr(cls, self.name, Creator(self))
 
     return contribute_to_class
diff -Nru python-django-1.2.3/django/db/models/options.py python-django-1.2.4/django/db/models/options.py
--- python-django-1.2.3/django/db/models/options.py	2010-05-04 16:00:30.000000000 +0200
+++ python-django-1.2.4/django/db/models/options.py	2010-11-17 13:24:47.000000000 +0100
@@ -14,7 +14,7 @@
 # Calculate the verbose_name by converting from InitialCaps to "lowercase with spaces".
 get_verbose_name = lambda class_name: re.sub('(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|$)))', ' \\1', class_name).lower().strip()
 
-DEFAULT_NAMES = ('verbose_name', 'db_table', 'ordering',
+DEFAULT_NAMES = ('verbose_name', 'verbose_name_plural', 'db_table', 'ordering',
                  'unique_together', 'permissions', 'get_latest_by',
                  'order_with_respect_to', 'app_label', 'db_tablespace',
                  'abstract', 'managed', 'proxy', 'auto_created')
@@ -86,7 +86,8 @@
 
             # verbose_name_plural is a special case because it uses a 's'
             # by default.
-            setattr(self, 'verbose_name_plural', meta_attrs.pop('verbose_name_plural', string_concat(self.verbose_name, 's')))
+            if self.verbose_name_plural is None:
+                self.verbose_name_plural = string_concat(self.verbose_name, 's')
 
             # Any leftover attributes must be invalid.
             if meta_attrs != {}:
diff -Nru python-django-1.2.3/django/db/models/query.py python-django-1.2.4/django/db/models/query.py
--- python-django-1.2.3/django/db/models/query.py	2010-04-30 18:32:48.000000000 +0200
+++ python-django-1.2.4/django/db/models/query.py	2010-12-03 21:26:57.000000000 +0100
@@ -2,7 +2,6 @@
 The main QuerySet implementation. This provides the public API for the ORM.
 """
 
-from copy import deepcopy
 from itertools import izip
 
 from django.db import connections, router, transaction, IntegrityError
@@ -265,11 +264,14 @@
                     init_list.append(field.attname)
             model_cls = deferred_class_factory(self.model, skip)
 
-        compiler = self.query.get_compiler(using=self.db)
+        # Cache db and model outside the loop
+        db = self.db
+        model = self.model
+        compiler = self.query.get_compiler(using=db)
         for row in compiler.results_iter():
             if fill_cache:
-                obj, _ = get_cached_row(self.model, row,
-                            index_start, using=self.db, max_depth=max_depth,
+                obj, _ = get_cached_row(model, row,
+                            index_start, using=db, max_depth=max_depth,
                             requested=requested, offset=len(aggregate_select),
                             only_load=only_load)
             else:
@@ -279,17 +281,21 @@
                     obj = model_cls(**dict(zip(init_list, row_data)))
                 else:
                     # Omit aggregates in object creation.
-                    obj = self.model(*row[index_start:aggregate_start])
+                    obj = model(*row[index_start:aggregate_start])
 
                 # Store the source database of the object
-                obj._state.db = self.db
-
-            for i, k in enumerate(extra_select):
-                setattr(obj, k, row[i])
+                obj._state.db = db
+                # This object came from the database; it's not being added.
+                obj._state.adding = False
+
+            if extra_select:
+                for i, k in enumerate(extra_select):
+                    setattr(obj, k, row[i])
 
             # Add the aggregates to the model
-            for i, aggregate in enumerate(aggregate_select):
-                setattr(obj, aggregate, row[i+aggregate_start])
+            if aggregate_select:
+                for i, aggregate in enumerate(aggregate_select):
+                    setattr(obj, aggregate, row[i+aggregate_start])
 
             yield obj
 
@@ -620,8 +626,19 @@
         with data aggregated from related fields.
         """
         for arg in args:
+            if arg.default_alias in kwargs:
+                raise ValueError("The %s named annotation conflicts with the "
+                                 "default name for another annotation."
+                                 % arg.default_alias)
             kwargs[arg.default_alias] = arg
 
+        names = set(self.model._meta.get_all_field_names())
+        for aggregate in kwargs:
+            if aggregate in names:
+                raise ValueError("The %s annotation conflicts with a field on "
+                    "the model." % aggregate)
+
+
         obj = self._clone()
 
         obj._setup_aggregate_query(kwargs.keys())
@@ -959,8 +976,7 @@
             # If a field list has been specified, use it. Otherwise, use the
             # full list of fields, including extras and aggregates.
             if self._fields:
-                fields = list(self._fields) + filter(lambda f: f not in self._fields,
-                                                     aggregate_names)
+                fields = list(self._fields) + filter(lambda f: f not in self._fields, aggregate_names)
             else:
                 fields = names
 
@@ -970,7 +986,9 @@
 
     def _clone(self, *args, **kwargs):
         clone = super(ValuesListQuerySet, self)._clone(*args, **kwargs)
-        clone.flat = self.flat
+        if not hasattr(clone, "flat"):
+            # Only assign flat if the clone didn't already get it from kwargs
+            clone.flat = self.flat
         return clone
 
 
@@ -1022,7 +1040,7 @@
         pass
 
     def _clone(self, klass=None, setup=False, **kwargs):
-        c = super(EmptyQuerySet, self)._clone(klass, **kwargs)
+        c = super(EmptyQuerySet, self)._clone(klass, setup=setup, **kwargs)
         c._result_cache = []
         return c
 
@@ -1210,6 +1228,7 @@
     # If an object was retrieved, set the database state.
     if obj:
         obj._state.db = using
+        obj._state.adding = False
 
     index_end = index_start + field_count + offset
     # Iterate over each related object, populating any
@@ -1369,8 +1388,71 @@
         self.translations = translations or {}
 
     def __iter__(self):
-        for row in self.query:
-            yield self.transform_results(row)
+        # Mapping of attrnames to row column positions. Used for constructing
+        # the model using kwargs, needed when not all model's fields are present
+        # in the query.
+        model_init_field_names = {}
+        # A list of tuples of (column name, column position). Used for
+        # annotation fields.
+        annotation_fields = []
+
+        # Cache some things for performance reasons outside the loop.
+        db = self.db
+        compiler = connections[db].ops.compiler('SQLCompiler')(
+            self.query, connections[db], db
+        )
+        need_resolv_columns = hasattr(compiler, 'resolve_columns')
+
+        query = iter(self.query)
+
+        # Find out which columns are model's fields, and which ones should be
+        # annotated to the model.
+        for pos, column in enumerate(self.columns):
+            if column in self.model_fields:
+                model_init_field_names[self.model_fields[column].attname] = pos
+            else:
+                annotation_fields.append((column, pos))
+
+        # Find out which model's fields are not present in the query.
+        skip = set()
+        for field in self.model._meta.fields:
+            if field.attname not in model_init_field_names:
+                skip.add(field.attname)
+        if skip:
+            if self.model._meta.pk.attname in skip:
+                raise InvalidQuery('Raw query must include the primary key')
+            model_cls = deferred_class_factory(self.model, skip)
+        else:
+            model_cls = self.model
+            # All model's fields are present in the query. So, it is possible
+            # to use *args based model instantation. For each field of the model,
+            # record the query column position matching that field.
+            model_init_field_pos = []
+            for field in self.model._meta.fields:
+                model_init_field_pos.append(model_init_field_names[field.attname])
+        if need_resolv_columns:
+            fields = [self.model_fields.get(c, None) for c in self.columns]
+        # Begin looping through the query values.
+        for values in query:
+            if need_resolv_columns:
+                values = compiler.resolve_columns(values, fields)
+            # Associate fields to values
+            if skip:
+                model_init_kwargs = {}
+                for attname, pos in model_init_field_names.iteritems():
+                    model_init_kwargs[attname] = values[pos]
+                instance = model_cls(**model_init_kwargs)
+            else:
+                model_init_args = [values[pos] for pos in model_init_field_pos]
+                instance = model_cls(*model_init_args)
+            if annotation_fields:
+                for column, pos in annotation_fields:
+                    setattr(instance, column, values[pos])
+
+            instance._state.db = db
+            instance._state.adding = False
+
+            yield instance
 
     def __repr__(self):
         return "<RawQuerySet: %r>" % (self.raw_query % self.params)
@@ -1425,49 +1507,6 @@
                 self._model_fields[converter(column)] = field
         return self._model_fields
 
-    def transform_results(self, values):
-        model_init_kwargs = {}
-        annotations = ()
-
-        # Perform database backend type resolution
-        connection = connections[self.db]
-        compiler = connection.ops.compiler('SQLCompiler')(self.query, connection, self.db)
-        if hasattr(compiler, 'resolve_columns'):
-            fields = [self.model_fields.get(c,None) for c in self.columns]
-            values = compiler.resolve_columns(values, fields)
-
-        # Associate fields to values
-        for pos, value in enumerate(values):
-            column = self.columns[pos]
-
-            # Separate properties from annotations
-            if column in self.model_fields.keys():
-                model_init_kwargs[self.model_fields[column].attname] = value
-            else:
-                annotations += (column, value),
-
-        # Construct model instance and apply annotations
-        skip = set()
-        for field in self.model._meta.fields:
-            if field.attname not in model_init_kwargs.keys():
-                skip.add(field.attname)
-
-        if skip:
-            if self.model._meta.pk.attname in skip:
-                raise InvalidQuery('Raw query must include the primary key')
-            model_cls = deferred_class_factory(self.model, skip)
-        else:
-            model_cls = self.model
-
-        instance = model_cls(**model_init_kwargs)
-
-        for field, value in annotations:
-            setattr(instance, field, value)
-
-        instance._state.db = self.query.using
-
-        return instance
-
 def insert_query(model, values, return_id=False, raw_values=False, using=None):
     """
     Inserts a new record for the given model. This provides an interface to
diff -Nru python-django-1.2.3/django/db/models/sql/aggregates.py python-django-1.2.4/django/db/models/sql/aggregates.py
--- python-django-1.2.3/django/db/models/sql/aggregates.py	2009-12-22 16:18:51.000000000 +0100
+++ python-django-1.2.4/django/db/models/sql/aggregates.py	2010-11-17 03:58:59.000000000 +0100
@@ -8,6 +8,7 @@
     """
     def __init__(self, internal_type):
         self.internal_type = internal_type
+
     def get_internal_type(self):
         return self.internal_type
 
diff -Nru python-django-1.2.3/django/db/models/sql/compiler.py python-django-1.2.4/django/db/models/sql/compiler.py
--- python-django-1.2.3/django/db/models/sql/compiler.py	2010-04-23 16:25:29.000000000 +0200
+++ python-django-1.2.4/django/db/models/sql/compiler.py	2010-11-26 15:28:27.000000000 +0100
@@ -466,9 +466,11 @@
         qn = self.quote_name_unless_alias
         result, params = [], []
         if self.query.group_by is not None:
-            if len(self.query.model._meta.fields) == len(self.query.select) and \
-                self.connection.features.allows_group_by_pk:
-                self.query.group_by = [(self.query.model._meta.db_table, self.query.model._meta.pk.column)]
+            if (len(self.query.model._meta.fields) == len(self.query.select) and
+                self.connection.features.allows_group_by_pk):
+                self.query.group_by = [
+                    (self.query.model._meta.db_table, self.query.model._meta.pk.column)
+                ]
 
             group_by = self.query.group_by or []
 
@@ -476,11 +478,13 @@
             for extra_select, extra_params in self.query.extra_select.itervalues():
                 extra_selects.append(extra_select)
                 params.extend(extra_params)
-            for col in group_by + self.query.related_select_cols + extra_selects:
+            cols = (group_by + self.query.select +
+                self.query.related_select_cols + extra_selects)
+            for col in cols:
                 if isinstance(col, (list, tuple)):
                     result.append('%s.%s' % (qn(col[0]), qn(col[1])))
                 elif hasattr(col, 'as_sql'):
-                    result.append(col.as_sql(qn))
+                    result.append(col.as_sql(qn, self.connection))
                 else:
                     result.append('(%s)' % str(col))
         return result, params
@@ -669,6 +673,7 @@
         """
         resolve_columns = hasattr(self, 'resolve_columns')
         fields = None
+        has_aggregate_select = bool(self.query.aggregate_select)
         for rows in self.execute_sql(MULTI):
             for row in rows:
                 if resolve_columns:
@@ -689,7 +694,7 @@
                                       f.column in only_load[db_table]]
                     row = self.resolve_columns(row, fields)
 
-                if self.query.aggregate_select:
+                if has_aggregate_select:
                     aggregate_start = len(self.query.extra_select.keys()) + len(self.query.select)
                     aggregate_end = aggregate_start + len(self.query.aggregate_select)
                     row = tuple(row[:aggregate_start]) + tuple([
diff -Nru python-django-1.2.3/django/db/models/sql/expressions.py python-django-1.2.4/django/db/models/sql/expressions.py
--- python-django-1.2.3/django/db/models/sql/expressions.py	2009-12-22 16:18:51.000000000 +0100
+++ python-django-1.2.4/django/db/models/sql/expressions.py	2010-11-22 19:02:33.000000000 +0100
@@ -19,7 +19,10 @@
 
     def relabel_aliases(self, change_map):
         for node, col in self.cols.items():
-            self.cols[node] = (change_map.get(col[0], col[0]), col[1])
+            if hasattr(col, "relabel_aliases"):
+                col.relabel_aliases(change_map)
+            else:
+                self.cols[node] = (change_map.get(col[0], col[0]), col[1])
 
     #####################################################
     # Vistor methods for initial expression preparation #
diff -Nru python-django-1.2.3/django/db/models/sql/query.py python-django-1.2.4/django/db/models/sql/query.py
--- python-django-1.2.3/django/db/models/sql/query.py	2010-07-30 06:07:27.000000000 +0200
+++ python-django-1.2.4/django/db/models/sql/query.py	2010-11-26 15:28:27.000000000 +0100
@@ -195,8 +195,9 @@
         Unpickling support.
         """
         # Rebuild list of field instances
+        opts = obj_dict['model']._meta
         obj_dict['select_fields'] = [
-            name is not None and obj_dict['model']._meta.get_field(name) or None
+            name is not None and opts.get_field(name) or None
             for name in obj_dict['select_fields']
         ]
 
@@ -337,7 +338,7 @@
         # information but retrieves only the first row. Aggregate
         # over the subquery instead.
         if self.group_by is not None:
-            from subqueries import AggregateQuery
+            from django.db.models.sql.subqueries import AggregateQuery
             query = AggregateQuery(self.model)
 
             obj = self.clone()
@@ -349,7 +350,13 @@
                     query.aggregate_select[alias] = aggregate
                     del obj.aggregate_select[alias]
 
-            query.add_subquery(obj, using)
+            try:
+                query.add_subquery(obj, using)
+            except EmptyResultSet:
+                return dict(
+                    (alias, None)
+                    for alias in query.aggregate_select
+                )
         else:
             query = self
             self.select = []
@@ -382,13 +389,19 @@
             # If a select clause exists, then the query has already started to
             # specify the columns that are to be returned.
             # In this case, we need to use a subquery to evaluate the count.
-            from subqueries import AggregateQuery
+            from django.db.models.sql.subqueries import AggregateQuery
             subquery = obj
             subquery.clear_ordering(True)
             subquery.clear_limits()
 
             obj = AggregateQuery(obj.model)
-            obj.add_subquery(subquery, using=using)
+            try:
+                obj.add_subquery(subquery, using=using)
+            except EmptyResultSet:
+                # add_subquery evaluates the query, if it's an EmptyResultSet
+                # then there are can be no results, and therefore there the
+                # count is obviously 0
+                return 0
 
         obj.add_count_column()
         number = obj.get_aggregation(using=using)[None]
@@ -695,13 +708,20 @@
         # "group by", "where" and "having".
         self.where.relabel_aliases(change_map)
         self.having.relabel_aliases(change_map)
-        for columns in (self.select, self.aggregates.values(), self.group_by or []):
+        for columns in [self.select, self.group_by or []]:
             for pos, col in enumerate(columns):
                 if isinstance(col, (list, tuple)):
                     old_alias = col[0]
                     columns[pos] = (change_map.get(old_alias, old_alias), col[1])
                 else:
                     col.relabel_aliases(change_map)
+        for mapping in [self.aggregates]:
+            for key, col in mapping.items():
+                if isinstance(col, (list, tuple)):
+                    old_alias = col[0]
+                    mapping[key] = (change_map.get(old_alias, old_alias), col[1])
+                else:
+                    col.relabel_aliases(change_map)
 
         # 2. Rename the alias in the internal table/alias datastructures.
         for old_alias, new_alias in change_map.iteritems():
@@ -909,8 +929,7 @@
         """
         opts = model._meta
         field_list = aggregate.lookup.split(LOOKUP_SEP)
-        if (len(field_list) == 1 and
-            aggregate.lookup in self.aggregates.keys()):
+        if len(field_list) == 1 and aggregate.lookup in self.aggregates:
             # Aggregate is over an annotation
             field_name = field_list[0]
             col = field_name
@@ -1064,6 +1083,8 @@
 
 
         if having_clause:
+            if (alias, col) not in self.group_by:
+                self.group_by.append((alias, col))
             self.having.add((Constraint(alias, col, field), lookup_type, value),
                 connector)
         else:
@@ -1078,11 +1099,14 @@
                         if self.alias_map[alias][JOIN_TYPE] == self.LOUTER:
                             j_col = self.alias_map[alias][RHS_JOIN_COL]
                             entry = self.where_class()
-                            entry.add((Constraint(alias, j_col, None), 'isnull', True), AND)
+                            entry.add(
+                                (Constraint(alias, j_col, None), 'isnull', True),
+                                AND
+                            )
                             entry.negate()
                             self.where.add(entry, AND)
                             break
-                elif not (lookup_type == 'in'
+                if not (lookup_type == 'in'
                             and not hasattr(value, 'as_sql')
                             and not hasattr(value, '_as_sql')
                             and not value) and field.null:
diff -Nru python-django-1.2.3/django/db/models/sql/subqueries.py python-django-1.2.4/django/db/models/sql/subqueries.py
--- python-django-1.2.3/django/db/models/sql/subqueries.py	2010-04-03 13:45:31.000000000 +0200
+++ python-django-1.2.4/django/db/models/sql/subqueries.py	2010-12-01 18:54:06.000000000 +0100
@@ -10,6 +10,7 @@
 from django.db.models.sql.query import Query
 from django.db.models.sql.where import AND, Constraint
 
+
 __all__ = ['DeleteQuery', 'UpdateQuery', 'InsertQuery', 'DateQuery',
         'AggregateQuery']
 
diff -Nru python-django-1.2.3/django/db/models/sql/where.py python-django-1.2.4/django/db/models/sql/where.py
--- python-django-1.2.3/django/db/models/sql/where.py	2010-04-21 18:34:33.000000000 +0200
+++ python-django-1.2.4/django/db/models/sql/where.py	2010-09-16 21:58:25.000000000 +0200
@@ -2,6 +2,7 @@
 Code to manage the creation and SQL rendering of 'where' constraints.
 """
 import datetime
+from itertools import repeat
 
 from django.utils import tree
 from django.db.models.fields import Field
@@ -36,10 +37,10 @@
     def add(self, data, connector):
         """
         Add a node to the where-tree. If the data is a list or tuple, it is
-        expected to be of the form (alias, col_name, field_obj, lookup_type,
-        value), which is then slightly munged before being stored (to avoid
-        storing any reference to field objects). Otherwise, the 'data' is
-        stored unchanged and can be anything with an 'as_sql()' method.
+        expected to be of the form (obj, lookup_type, value), where obj is
+        a Constraint object, and is then slightly munged before being stored
+        (to avoid storing any reference to field objects). Otherwise, the 'data'
+        is stored unchanged and can be any class with an 'as_sql()' method.
         """
         if not isinstance(data, (list, tuple)):
             super(WhereNode, self).add(data, connector)
@@ -178,8 +179,24 @@
                 raise EmptyResultSet
             if extra:
                 return ('%s IN %s' % (field_sql, extra), params)
-            return ('%s IN (%s)' % (field_sql, ', '.join(['%s'] * len(params))),
-                    params)
+            max_in_list_size = connection.ops.max_in_list_size()
+            if max_in_list_size and len(params) > max_in_list_size:
+                # Break up the params list into an OR of manageable chunks.
+                in_clause_elements = ['(']
+                for offset in xrange(0, len(params), max_in_list_size):
+                    if offset > 0:
+                        in_clause_elements.append(' OR ')
+                    in_clause_elements.append('%s IN (' % field_sql)
+                    group_size = min(len(params) - offset, max_in_list_size)
+                    param_group = ', '.join(repeat('%s', group_size))
+                    in_clause_elements.append(param_group)
+                    in_clause_elements.append(')')
+                in_clause_elements.append(')')
+                return ''.join(in_clause_elements), params
+            else:
+                return ('%s IN (%s)' % (field_sql,
+                                        ', '.join(repeat('%s', len(params)))),
+                        params)
         elif lookup_type in ('range', 'year'):
             return ('%s BETWEEN %%s and %%s' % field_sql, params)
         elif lookup_type in ('month', 'day', 'week_day'):
diff -Nru python-django-1.2.3/django/db/transaction.py python-django-1.2.4/django/db/transaction.py
--- python-django-1.2.3/django/db/transaction.py	2010-05-04 16:00:30.000000000 +0200
+++ python-django-1.2.4/django/db/transaction.py	2010-10-09 10:25:01.000000000 +0200
@@ -288,7 +288,7 @@
     This decorator activates commit on response. This way, if the view function
     runs successfully, a commit is made; if the viewfunc produces an exception,
     a rollback is made. This is one of the most common ways to do transaction
-    control in web apps.
+    control in Web apps.
     """
     def inner_commit_on_success(func, db=None):
         def _commit_on_success(*args, **kw):
diff -Nru python-django-1.2.3/django/db/utils.py python-django-1.2.4/django/db/utils.py
--- python-django-1.2.3/django/db/utils.py	2010-01-29 16:45:55.000000000 +0100
+++ python-django-1.2.4/django/db/utils.py	2010-12-08 19:37:24.000000000 +0100
@@ -5,6 +5,7 @@
 from django.core.exceptions import ImproperlyConfigured
 from django.utils.importlib import import_module
 
+
 DEFAULT_DB_ALIAS = 'default'
 
 # Define some exceptions that mirror the PEP249 interface.
@@ -111,9 +112,11 @@
                 except ImportError, e:
                     raise ImproperlyConfigured('Error importing database router %s: "%s"' % (klass_name, e))
                 try:
-                    router = getattr(module, klass_name)()
+                    router_class = getattr(module, klass_name)
                 except AttributeError:
                     raise ImproperlyConfigured('Module "%s" does not define a database router name "%s"' % (module, klass_name))
+                else:
+                    router = router_class()
             else:
                 router = r
             self.routers.append(router)
@@ -123,12 +126,14 @@
             chosen_db = None
             for router in self.routers:
                 try:
-                    chosen_db = getattr(router, action)(model, **hints)
-                    if chosen_db:
-                        return chosen_db
+                    method = getattr(router, action)
                 except AttributeError:
                     # If the router doesn't have a method, skip to the next one.
                     pass
+                else:
+                    chosen_db = method(model, **hints)
+                    if chosen_db:
+                        return chosen_db
             try:
                 return hints['instance']._state.db or DEFAULT_DB_ALIAS
             except KeyError:
@@ -141,21 +146,25 @@
     def allow_relation(self, obj1, obj2, **hints):
         for router in self.routers:
             try:
-                allow = router.allow_relation(obj1, obj2, **hints)
-                if allow is not None:
-                    return allow
+                method = router.allow_relation
             except AttributeError:
                 # If the router doesn't have a method, skip to the next one.
                 pass
+            else:
+                allow = method(obj1, obj2, **hints)
+                if allow is not None:
+                    return allow
         return obj1._state.db == obj2._state.db
 
     def allow_syncdb(self, db, model):
         for router in self.routers:
             try:
-                allow = router.allow_syncdb(db, model)
-                if allow is not None:
-                    return allow
+                method = router.allow_syncdb
             except AttributeError:
                 # If the router doesn't have a method, skip to the next one.
                 pass
+            else:
+                allow = method(db, model)
+                if allow is not None:
+                    return allow
         return True
diff -Nru python-django-1.2.3/django/dispatch/dispatcher.py python-django-1.2.4/django/dispatch/dispatcher.py
--- python-django-1.2.3/django/dispatch/dispatcher.py	2010-05-04 16:00:30.000000000 +0200
+++ python-django-1.2.4/django/dispatch/dispatcher.py	2010-11-21 18:35:48.000000000 +0100
@@ -1,4 +1,5 @@
 import weakref
+import threading
 
 from django.dispatch import saferef
 
@@ -30,6 +31,7 @@
         if providing_args is None:
             providing_args = []
         self.providing_args = set(providing_args)
+        self.lock = threading.Lock()
 
     def connect(self, receiver, sender=None, weak=True, dispatch_uid=None):
         """
@@ -41,7 +43,7 @@
                 A function or an instance method which is to receive signals.
                 Receivers must be hashable objects.
 
-                if weak is True, then receiver must be weak-referencable (more
+                If weak is True, then receiver must be weak-referencable (more
                 precisely saferef.safeRef() must be able to create a reference
                 to the receiver).
         
@@ -52,11 +54,11 @@
                 dispatch_uid.
 
             sender
-                The sender to which the receiver should respond Must either be
+                The sender to which the receiver should respond. Must either be
                 of type Signal, or None to receive events from any sender.
 
             weak
-                Whether to use weak references to the receiver By default, the
+                Whether to use weak references to the receiver. By default, the
                 module will attempt to use weak references to the receiver
                 objects. If this parameter is false, then strong references will
                 be used.
@@ -97,11 +99,15 @@
         if weak:
             receiver = saferef.safeRef(receiver, onDelete=self._remove_receiver)
 
-        for r_key, _ in self.receivers:
-            if r_key == lookup_key:
-                break
-        else:
-            self.receivers.append((lookup_key, receiver))
+        self.lock.acquire()
+        try:
+            for r_key, _ in self.receivers:
+                if r_key == lookup_key:
+                    break
+            else:
+                self.receivers.append((lookup_key, receiver))
+        finally:
+            self.lock.release()
 
     def disconnect(self, receiver=None, sender=None, weak=True, dispatch_uid=None):
         """
@@ -130,11 +136,15 @@
         else:
             lookup_key = (_make_id(receiver), _make_id(sender))
         
-        for index in xrange(len(self.receivers)):
-            (r_key, _) = self.receivers[index]
-            if r_key == lookup_key:
-                del self.receivers[index]
-                break
+        self.lock.acquire()
+        try:
+            for index in xrange(len(self.receivers)):
+                (r_key, _) = self.receivers[index]
+                if r_key == lookup_key:
+                    del self.receivers[index]
+                    break
+        finally:
+            self.lock.release()
 
     def send(self, sender, **named):
         """
@@ -170,7 +180,7 @@
         Arguments:
         
             sender
-                The sender of the signal Can be any python object (normally one
+                The sender of the signal. Can be any python object (normally one
                 registered with a connect if you actually want something to
                 occur).
 
@@ -182,7 +192,7 @@
         Return a list of tuple pairs [(receiver, response), ... ]. May raise
         DispatcherKeyError.
 
-        if any receiver raises an error (specifically any subclass of
+        If any receiver raises an error (specifically any subclass of
         Exception), the error instance is returned as the result for that
         receiver.
         """
@@ -227,11 +237,20 @@
         Remove dead receivers from connections.
         """
 
-        to_remove = []
-        for key, connected_receiver in self.receivers:
-            if connected_receiver == receiver:
-                to_remove.append(key)
-        for key in to_remove:
-            for idx, (r_key, _) in enumerate(self.receivers):
-                if r_key == key:
-                    del self.receivers[idx]
+        self.lock.acquire()
+        try:
+            to_remove = []
+            for key, connected_receiver in self.receivers:
+                if connected_receiver == receiver:
+                    to_remove.append(key)
+            for key in to_remove:
+                last_idx = len(self.receivers) - 1
+                # enumerate in reverse order so that indexes are valid even
+                # after we delete some items
+                for idx, (r_key, _) in enumerate(reversed(self.receivers)):
+                    if r_key == key:
+                        del self.receivers[last_idx-idx]
+        finally:
+            self.lock.release()
+
+
diff -Nru python-django-1.2.3/django/dispatch/license.txt python-django-1.2.4/django/dispatch/license.txt
--- python-django-1.2.3/django/dispatch/license.txt	1970-01-01 01:00:00.000000000 +0100
+++ python-django-1.2.4/django/dispatch/license.txt	2008-08-06 17:32:46.000000000 +0200
@@ -0,0 +1,36 @@
+django.dispatch was originally forked from PyDispatcher.
+
+PyDispatcher License:
+
+    Copyright (c) 2001-2003, Patrick K. O'Brien and Contributors
+    All rights reserved.
+    
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+    
+        Redistributions of source code must retain the above copyright
+        notice, this list of conditions and the following disclaimer.
+    
+        Redistributions in binary form must reproduce the above
+        copyright notice, this list of conditions and the following
+        disclaimer in the documentation and/or other materials
+        provided with the distribution.
+    
+        The name of Patrick K. O'Brien, or the name of any Contributor,
+        may not be used to endorse or promote products derived from this 
+        software without specific prior written permission.
+    
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+    FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+    COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+    INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+    STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+    OF THE POSSIBILITY OF SUCH DAMAGE. 
+
diff -Nru python-django-1.2.3/django/forms/fields.py python-django-1.2.4/django/forms/fields.py
--- python-django-1.2.3/django/forms/fields.py	2010-08-14 14:07:25.000000000 +0200
+++ python-django-1.2.4/django/forms/fields.py	2010-12-02 02:03:00.000000000 +0100
@@ -399,6 +399,8 @@
             # components: date and time.
             if len(value) != 2:
                 raise ValidationError(self.error_messages['invalid'])
+            if value[0] in validators.EMPTY_VALUES and value[1] in validators.EMPTY_VALUES:
+                return None
             value = '%s %s' % tuple(value)
         for format in self.input_formats or formats.get_format('DATETIME_INPUT_FORMATS'):
             try:
@@ -431,6 +433,10 @@
     }
     default_validators = [validators.validate_email]
 
+    def clean(self, value):
+        value = self.to_python(value).strip()
+        return super(EmailField, self).clean(value)
+
 class FileField(Field):
     widget = FileInput
     default_error_messages = {
@@ -540,14 +546,23 @@
 
     def to_python(self, value):
         if value:
-            if '://' not in value:
-                # If no URL scheme given, assume http://
-                value = u'http://%s' % value
             url_fields = list(urlparse.urlsplit(value))
+            if not url_fields[0]:
+                # If no URL scheme given, assume http://
+                url_fields[0] = 'http'
+            if not url_fields[1]:
+                # Assume that if no domain is provided, that the path segment
+                # contains the domain. 
+                url_fields[1] = url_fields[2]
+                url_fields[2] = ''
+                # Rebuild the url_fields list, since the domain segment may now
+                # contain the path too.
+                value = urlparse.urlunsplit(url_fields)
+                url_fields = list(urlparse.urlsplit(value))
             if not url_fields[2]:
                 # the path portion may need to be added before query params
                 url_fields[2] = '/'
-                value = urlparse.urlunsplit(url_fields)
+            value = urlparse.urlunsplit(url_fields)
         return super(URLField, self).to_python(value)
 
 class BooleanField(Field):
@@ -817,14 +832,14 @@
             self.match_re = re.compile(self.match)
 
         if recursive:
-            for root, dirs, files in os.walk(self.path):
+            for root, dirs, files in sorted(os.walk(self.path)):
                 for f in files:
                     if self.match is None or self.match_re.search(f):
                         f = os.path.join(root, f)
                         self.choices.append((f, f.replace(path, "", 1)))
         else:
             try:
-                for f in os.listdir(self.path):
+                for f in sorted(os.listdir(self.path)):
                     full_file = os.path.join(self.path, f)
                     if os.path.isfile(full_file) and (self.match is None or self.match_re.search(f)):
                         self.choices.append((full_file, f))
diff -Nru python-django-1.2.3/django/forms/formsets.py python-django-1.2.4/django/forms/formsets.py
--- python-django-1.2.3/django/forms/formsets.py	2010-03-28 00:03:56.000000000 +0100
+++ python-django-1.2.4/django/forms/formsets.py	2010-12-21 16:16:05.000000000 +0100
@@ -254,6 +254,7 @@
         # We loop over every form.errors here rather than short circuiting on the
         # first failure to make sure validation gets triggered for every form.
         forms_valid = True
+        err = self.errors
         for i in range(0, self.total_form_count()):
             form = self.forms[i]
             if self.can_delete:
diff -Nru python-django-1.2.3/django/forms/models.py python-django-1.2.4/django/forms/models.py
--- python-django-1.2.3/django/forms/models.py	2010-09-11 00:54:52.000000000 +0200
+++ python-django-1.2.4/django/forms/models.py	2010-12-13 14:56:55.000000000 +0100
@@ -244,10 +244,8 @@
             # if we didn't get an instance, instantiate a new one
             self.instance = opts.model()
             object_data = {}
-            self.instance._adding = True
         else:
             self.instance = instance
-            self.instance._adding = False
             object_data = model_to_dict(instance, opts.fields, opts.exclude)
         # if initial was provided, it should override the values from instance
         if initial is not None:
@@ -516,10 +514,9 @@
                 # it's already invalid
                 if not hasattr(form, "cleaned_data"):
                     continue
-                # get each of the fields for which we have data on this form
-                if [f for f in unique_check if f in form.cleaned_data and form.cleaned_data[f] is not None]:
-                    # get the data itself
-                    row_data = tuple([form.cleaned_data[field] for field in unique_check])
+                # get data for each field of each of unique_check
+                row_data = tuple([form.cleaned_data[field] for field in unique_check if field in form.cleaned_data])
+                if row_data and not None in row_data:
                     # if we've aready seen it then we have a uniqueness failure
                     if row_data in seen_data:
                         # poke error messages into the right places and mark
@@ -996,7 +993,7 @@
         try:
             key = self.to_field_name or 'pk'
             value = self.queryset.get(**{key: value})
-        except self.queryset.model.DoesNotExist:
+        except (ValueError, self.queryset.model.DoesNotExist):
             raise ValidationError(self.error_messages['invalid_choice'])
         return value
 
@@ -1038,6 +1035,9 @@
         for val in value:
             if force_unicode(val) not in pks:
                 raise ValidationError(self.error_messages['invalid_choice'] % val)
+        # Since this overrides the inherited ModelChoiceField.clean
+        # we run custom validators here
+        self.run_validators(value)
         return qs
 
     def prepare_value(self, value):
diff -Nru python-django-1.2.3/django/forms/widgets.py python-django-1.2.4/django/forms/widgets.py
--- python-django-1.2.3/django/forms/widgets.py	2010-08-14 14:07:25.000000000 +0200
+++ python-django-1.2.4/django/forms/widgets.py	2010-12-13 14:57:15.000000000 +0100
@@ -527,10 +527,9 @@
             data = []
         if len(initial) != len(data):
             return True
-        for value1, value2 in zip(initial, data):
-            if force_unicode(value1) != force_unicode(value2):
-                return True
-        return False
+        initial_set = set([force_unicode(value) for value in initial])
+        data_set = set([force_unicode(value) for value in data])
+        return data_set != initial_set
 
 class RadioInput(StrAndUnicode):
     """
diff -Nru python-django-1.2.3/django/__init__.py python-django-1.2.4/django/__init__.py
--- python-django-1.2.3/django/__init__.py	2010-09-11 08:49:33.000000000 +0200
+++ python-django-1.2.4/django/__init__.py	2010-12-23 04:52:07.000000000 +0100
@@ -1,4 +1,4 @@
-VERSION = (1, 2, 3, 'final', 0)
+VERSION = (1, 2, 4, 'final', 0)
 
 def get_version():
     version = '%s.%s' % (VERSION[0], VERSION[1])
diff -Nru python-django-1.2.3/django/middleware/common.py python-django-1.2.4/django/middleware/common.py
--- python-django-1.2.3/django/middleware/common.py	2010-03-07 21:03:04.000000000 +0100
+++ python-django-1.2.4/django/middleware/common.py	2010-11-02 19:30:31.000000000 +0100
@@ -80,7 +80,7 @@
         return http.HttpResponsePermanentRedirect(newurl)
 
     def process_response(self, request, response):
-        "Check for a flat page (for 404s) and calculate the Etag, if needed."
+        "Send broken link emails and calculate the Etag, if needed."
         if response.status_code == 404:
             if settings.SEND_BROKEN_LINK_EMAILS:
                 # If the referrer was from an internal link or a non-search-engine site,
diff -Nru python-django-1.2.3/django/middleware/csrf.py python-django-1.2.4/django/middleware/csrf.py
--- python-django-1.2.3/django/middleware/csrf.py	2010-09-11 01:11:24.000000000 +0200
+++ python-django-1.2.4/django/middleware/csrf.py	2010-10-28 13:58:51.000000000 +0200
@@ -84,18 +84,22 @@
     This middleware should be used in conjunction with the csrf_token template
     tag.
     """
+    # The _accept and _reject methods currently only exist for the sake of the
+    # requires_csrf_token decorator.
+    def _accept(self, request):
+        # Avoid checking the request twice by adding a custom attribute to
+        # request.  This will be relevant when both decorator and middleware
+        # are used.
+        request.csrf_processing_done = True
+        return None
+
+    def _reject(self, request, reason):
+        return _get_failure_view()(request, reason=reason)
+
     def process_view(self, request, callback, callback_args, callback_kwargs):
         if getattr(request, 'csrf_processing_done', False):
             return None
 
-        reject = lambda s: _get_failure_view()(request, reason=s)
-        def accept():
-            # Avoid checking the request twice by adding a custom attribute to
-            # request.  This will be relevant when both decorator and middleware
-            # are used.
-            request.csrf_processing_done = True
-            return None
-
         # If the user doesn't have a CSRF cookie, generate one and store it in the
         # request, so it's available to the view.  We'll store it in a cookie when
         # we reach the response.
@@ -124,7 +128,7 @@
                 # the creation of CSRF cookies, so that everything else continues to
                 # work exactly the same (e.g. cookies are sent etc), but before the
                 # any branches that call reject()
-                return accept()
+                return self._accept(request)
 
             if request.is_ajax():
                 # .is_ajax() is based on the presence of X-Requested-With.  In
@@ -149,20 +153,20 @@
                 #      allowing the cross-domain POST request.
                 #
                 # So in all cases, it is safe to allow these requests through.
-                return accept()
+                return self._accept(request)
 
             if request.is_secure():
                 # Strict referer checking for HTTPS
                 referer = request.META.get('HTTP_REFERER')
                 if referer is None:
-                    return reject(REASON_NO_REFERER)
+                    return self._reject(request, REASON_NO_REFERER)
 
                 # The following check ensures that the referer is HTTPS,
                 # the domains match and the ports match.  This might be too strict.
                 good_referer = 'https://%s/' % request.get_host()
                 if not referer.startswith(good_referer):
-                    return reject(REASON_BAD_REFERER %
-                                  (referer, good_referer))
+                    return self._reject(request, REASON_BAD_REFERER %
+                                        (referer, good_referer))
 
             # If the user didn't already have a CSRF cookie, then fall back to
             # the Django 1.1 method (hash of session ID), so a request is not
@@ -176,7 +180,7 @@
                     # No CSRF cookie and no session cookie. For POST requests,
                     # we insist on a CSRF cookie, and in this way we can avoid
                     # all CSRF attacks, including login CSRF.
-                    return reject(REASON_NO_COOKIE)
+                    return self._reject(request, REASON_NO_COOKIE)
             else:
                 csrf_token = request.META["CSRF_COOKIE"]
 
@@ -185,11 +189,11 @@
             if request_csrf_token != csrf_token:
                 if cookie_is_new:
                     # probably a problem setting the CSRF cookie
-                    return reject(REASON_NO_CSRF_COOKIE)
+                    return self._reject(request, REASON_NO_CSRF_COOKIE)
                 else:
-                    return reject(REASON_BAD_TOKEN)
+                    return self._reject(request, REASON_BAD_TOKEN)
 
-        return accept()
+        return self._accept(request)
 
     def process_response(self, request, response):
         if getattr(response, 'csrf_processing_done', False):
diff -Nru python-django-1.2.3/django/template/defaultfilters.py python-django-1.2.4/django/template/defaultfilters.py
--- python-django-1.2.3/django/template/defaultfilters.py	2010-08-07 17:02:01.000000000 +0200
+++ python-django-1.2.4/django/template/defaultfilters.py	2010-10-21 23:21:43.000000000 +0200
@@ -601,6 +601,10 @@
         first_item, second_item = list_
         if second_item == []:
             return [first_item], True
+        try:
+            it = iter(second_item)  # see if second item is iterable
+        except TypeError:
+            return list_, False
         old_style_list = True
         new_second_item = []
         for sublist in second_item:
diff -Nru python-django-1.2.3/django/templatetags/i18n.py python-django-1.2.4/django/templatetags/i18n.py
--- python-django-1.2.3/django/templatetags/i18n.py	2010-02-22 00:43:28.000000000 +0100
+++ python-django-1.2.4/django/templatetags/i18n.py	2010-10-16 22:51:06.000000000 +0200
@@ -76,8 +76,9 @@
         if self.plural and self.countervar and self.counter:
             count = self.counter.resolve(context)
             context[self.countervar] = count
-            plural, vars = self.render_token_list(self.plural)
+            plural, plural_vars = self.render_token_list(self.plural)
             result = translation.ungettext(singular, plural, count)
+            vars.extend(plural_vars)
         else:
             result = translation.ugettext(singular)
         # Escape all isolated '%' before substituting in the context.
diff -Nru python-django-1.2.3/django/test/simple.py python-django-1.2.4/django/test/simple.py
--- python-django-1.2.3/django/test/simple.py	2010-05-04 16:00:30.000000000 +0200
+++ python-django-1.2.4/django/test/simple.py	2010-12-05 02:54:15.000000000 +0100
@@ -3,11 +3,18 @@
 import unittest
 
 from django.conf import settings
+from django.core.exceptions import ImproperlyConfigured
 from django.db.models import get_app, get_apps
 from django.test import _doctest as doctest
 from django.test.utils import setup_test_environment, teardown_test_environment
 from django.test.testcases import OutputChecker, DocTestRunner, TestCase
 
+
+try:
+    all
+except NameError:
+    from django.utils.itercompat import all
+
 # The module name for tests outside models.py
 TEST_MODULE = 'tests'
 
@@ -222,6 +229,40 @@
         bins[0].addTests(bins[i+1])
     return bins[0]
 
+def dependency_ordered(test_databases, dependencies):
+    """Reorder test_databases into an order that honors the dependencies
+    described in TEST_DEPENDENCIES.
+    """
+    ordered_test_databases = []
+    resolved_databases = set()
+    while test_databases:
+        changed = False
+        deferred = []
+
+        while test_databases:
+            signature, aliases = test_databases.pop()
+            dependencies_satisfied = True
+            for alias in aliases:
+                if alias in dependencies:
+                    if all(a in resolved_databases for a in dependencies[alias]):
+                        # all dependencies for this alias are satisfied
+                        dependencies.pop(alias)
+                        resolved_databases.add(alias)
+                    else:
+                        dependencies_satisfied = False
+                else:
+                    resolved_databases.add(alias)
+
+            if dependencies_satisfied:
+                ordered_test_databases.append((signature, aliases))
+                changed = True
+            else:
+                deferred.append((signature, aliases))
+
+        if not changed:
+            raise ImproperlyConfigured("Circular dependency in TEST_DEPENDENCIES")
+        test_databases = deferred
+    return ordered_test_databases
 
 class DjangoTestSuiteRunner(object):
     def __init__(self, verbosity=1, interactive=True, failfast=True, **kwargs):
@@ -254,20 +295,60 @@
         return reorder_suite(suite, (TestCase,))
 
     def setup_databases(self, **kwargs):
-        from django.db import connections
-        old_names = []
-        mirrors = []
+        from django.db import connections, DEFAULT_DB_ALIAS
+
+        # First pass -- work out which databases actually need to be created,
+        # and which ones are test mirrors or duplicate entries in DATABASES
+        mirrored_aliases = {}
+        test_databases = {}
+        dependencies = {}
         for alias in connections:
             connection = connections[alias]
-            # If the database is a test mirror, redirect it's connection
-            # instead of creating a test database.
             if connection.settings_dict['TEST_MIRROR']:
-                mirrors.append((alias, connection))
-                mirror_alias = connection.settings_dict['TEST_MIRROR']
-                connections._connections[alias] = connections[mirror_alias]
+                # If the database is marked as a test mirror, save
+                # the alias.
+                mirrored_aliases[alias] = connection.settings_dict['TEST_MIRROR']
             else:
-                old_names.append((connection, connection.settings_dict['NAME']))
-                connection.creation.create_test_db(self.verbosity, autoclobber=not self.interactive)
+                # Store the (engine, name) pair. If we have two aliases
+                # with the same pair, we only need to create the test database
+                # once.
+                test_databases.setdefault((
+                        connection.settings_dict['HOST'],
+                        connection.settings_dict['PORT'],
+                        connection.settings_dict['ENGINE'],
+                        connection.settings_dict['NAME'],
+                    ), []).append(alias)
+
+                if 'TEST_DEPENDENCIES' in connection.settings_dict:
+                    dependencies[alias] = connection.settings_dict['TEST_DEPENDENCIES']
+                else:
+                    if alias != 'default':
+                        dependencies[alias] = connection.settings_dict.get('TEST_DEPENDENCIES', ['default'])
+
+        # Second pass -- actually create the databases.
+        old_names = []
+        mirrors = []
+        for (host, port, engine, db_name), aliases in dependency_ordered(test_databases.items(), dependencies):
+            # Actually create the database for the first connection
+            connection = connections[aliases[0]]
+            old_names.append((connection, db_name, True))
+            test_db_name = connection.creation.create_test_db(self.verbosity, autoclobber=not self.interactive)
+            for alias in aliases[1:]:
+                connection = connections[alias]
+                if db_name:
+                    old_names.append((connection, db_name, False))
+                    connection.settings_dict['NAME'] = test_db_name
+                else:
+                    # If settings_dict['NAME'] isn't defined, we have a backend where
+                    # the name isn't important -- e.g., SQLite, which uses :memory:.
+                    # Force create the database instead of assuming it's a duplicate.
+                    old_names.append((connection, db_name, True))
+                    connection.creation.create_test_db(self.verbosity, autoclobber=not self.interactive)
+
+        for alias, mirror_alias in mirrored_aliases.items():
+            mirrors.append((alias, connections[alias].settings_dict['NAME']))
+            connections[alias].settings_dict['NAME'] = connections[mirror_alias].settings_dict['NAME']
+
         return old_names, mirrors
 
     def run_suite(self, suite, **kwargs):
@@ -277,11 +358,14 @@
         from django.db import connections
         old_names, mirrors = old_config
         # Point all the mirrors back to the originals
-        for alias, connection in mirrors:
-            connections._connections[alias] = connection
+        for alias, old_name in mirrors:
+            connections[alias].settings_dict['NAME'] = old_name
         # Destroy all the non-mirror databases
-        for connection, old_name in old_names:
-            connection.creation.destroy_test_db(old_name, self.verbosity)
+        for connection, old_name, destroy in old_names:
+            if destroy:
+                connection.creation.destroy_test_db(old_name, self.verbosity)
+            else:
+                connection.settings_dict['NAME'] = old_name
 
     def teardown_test_environment(self, **kwargs):
         teardown_test_environment()
diff -Nru python-django-1.2.3/django/test/testcases.py python-django-1.2.4/django/test/testcases.py
--- python-django-1.2.3/django/test/testcases.py	2010-05-28 13:15:36.000000000 +0200
+++ python-django-1.2.4/django/test/testcases.py	2010-12-04 08:49:31.000000000 +0100
@@ -11,6 +11,7 @@
 from django.http import QueryDict
 from django.test import _doctest as doctest
 from django.test.client import Client
+from django.test.utils import get_warnings_state, restore_warnings_state
 from django.utils import simplejson
 from django.utils.encoding import smart_str
 
@@ -286,6 +287,19 @@
             settings.ROOT_URLCONF = self._old_root_urlconf
             clear_url_caches()
 
+    def save_warnings_state(self):
+        """
+        Saves the state of the warnings module
+        """
+        self._warnings_state = get_warnings_state()
+
+    def restore_warnings_state(self):
+        """
+        Restores the sate of the warnings module to the state
+        saved by save_warnings_state()
+        """
+        restore_warnings_state(self._warnings_state)
+
     def assertRedirects(self, response, expected_url, status_code=302,
                         target_status_code=200, host=None, msg_prefix=''):
         """Asserts that a response redirected to a specific URL, and that the
@@ -299,7 +313,7 @@
 
         if hasattr(response, 'redirect_chain'):
             # The request was a followed redirect
-            self.failUnless(len(response.redirect_chain) > 0,
+            self.assertTrue(len(response.redirect_chain) > 0,
                 msg_prefix + "Response didn't redirect as expected: Response"
                 " code was %d (expected %d)" %
                     (response.status_code, status_code))
@@ -413,7 +427,7 @@
                 if field:
                     if field in context[form].errors:
                         field_errors = context[form].errors[field]
-                        self.failUnless(err in field_errors,
+                        self.assertTrue(err in field_errors,
                             msg_prefix + "The field '%s' on form '%s' in"
                             " context %d does not contain the error '%s'"
                             " (actual errors: %s)" %
@@ -428,7 +442,7 @@
                                       (form, i, field))
                 else:
                     non_field_errors = context[form].non_field_errors()
-                    self.failUnless(err in non_field_errors,
+                    self.assertTrue(err in non_field_errors,
                         msg_prefix + "The form '%s' in context %d does not"
                         " contain the non-field error '%s'"
                         " (actual errors: %s)" %
@@ -448,7 +462,7 @@
         template_names = [t.name for t in to_list(response.template)]
         if not template_names:
             self.fail(msg_prefix + "No templates used to render the response")
-        self.failUnless(template_name in template_names,
+        self.assertTrue(template_name in template_names,
             msg_prefix + "Template '%s' was not a template used to render"
             " the response. Actual template(s) used: %s" %
                 (template_name, u', '.join(template_names)))
@@ -462,7 +476,7 @@
             msg_prefix += ": "
 
         template_names = [t.name for t in to_list(response.template)]
-        self.failIf(template_name in template_names,
+        self.assertFalse(template_name in template_names,
             msg_prefix + "Template '%s' was used unexpectedly in rendering"
             " the response" % template_name)
 
diff -Nru python-django-1.2.3/django/test/utils.py python-django-1.2.4/django/test/utils.py
--- python-django-1.2.3/django/test/utils.py	2010-08-20 16:29:57.000000000 +0200
+++ python-django-1.2.4/django/test/utils.py	2010-11-11 16:30:13.000000000 +0100
@@ -1,6 +1,7 @@
 import sys
 import time
 import os
+import warnings
 from django.conf import settings
 from django.core import mail
 from django.core.mail.backends import locmem
@@ -36,6 +37,13 @@
         else:
             return super(ContextList, self).__getitem__(key)
 
+    def __contains__(self, key):
+        try:
+            value = self[key]
+        except KeyError:
+            return False
+        return True
+
 
 def instrumented_test_render(self, context):
     """
@@ -66,6 +74,7 @@
 
     deactivate()
 
+
 def teardown_test_environment():
     """Perform any global post-test teardown. This involves:
 
@@ -84,6 +93,25 @@
 
     del mail.outbox
 
+
+def get_warnings_state():
+    """
+    Returns an object containing the state of the warnings module
+    """
+    # There is no public interface for doing this, but this implementation of
+    # get_warnings_state and restore_warnings_state appears to work on Python
+    # 2.4 to 2.7.
+    return warnings.filters[:]
+
+
+def restore_warnings_state(state):
+    """
+    Restores the state of the warnings module when passed an object that was
+    returned by get_warnings_state()
+    """
+    warnings.filters = state[:]
+
+
 def get_runner(settings):
     test_path = settings.TEST_RUNNER.split('.')
     # Allow for Python 2.5 relative paths
diff -Nru python-django-1.2.3/django/utils/feedgenerator.py python-django-1.2.4/django/utils/feedgenerator.py
--- python-django-1.2.3/django/utils/feedgenerator.py	2010-05-08 23:38:27.000000000 +0200
+++ python-django-1.2.4/django/utils/feedgenerator.py	2010-10-09 10:25:01.000000000 +0200
@@ -7,7 +7,7 @@
 >>> feed = feedgenerator.Rss201rev2Feed(
 ...     title=u"Poynter E-Media Tidbits",
 ...     link=u"http://www.poynter.org/column.asp?id=31";,
-...     description=u"A group weblog by the sharpest minds in online media/journalism/publishing.",
+...     description=u"A group Weblog by the sharpest minds in online media/journalism/publishing.",
 ...     language=u"en",
 ... )
 >>> feed.add_item(
diff -Nru python-django-1.2.3/django/utils/formats.py python-django-1.2.4/django/utils/formats.py
--- python-django-1.2.3/django/utils/formats.py	2010-03-01 11:19:24.000000000 +0100
+++ python-django-1.2.4/django/utils/formats.py	2010-12-04 09:04:16.000000000 +0100
@@ -6,30 +6,38 @@
 from django.utils.importlib import import_module
 from django.utils.encoding import smart_str
 from django.utils import dateformat, numberformat, datetime_safe
+from django.utils.safestring import mark_safe
+
+# format_cache is a mapping from (format_type, lang) to the format string.
+# By using the cache, it is possible to avoid running get_format_modules
+# repeatedly.
+_format_cache = {}
+_format_modules_cache = {}
+
+def iter_format_modules(lang):
+    """
+    Does the heavy lifting of finding format modules.
+    """
+    if check_for_language(lang) or settings.USE_L10N:
+        format_locations = ['django.conf.locale.%s']
+        if settings.FORMAT_MODULE_PATH:
+            format_locations.append(settings.FORMAT_MODULE_PATH + '.%s')
+            format_locations.reverse()
+        locale = to_locale(lang)
+        locales = set((locale, locale.split('_')[0]))
+        for location in format_locations:
+            for loc in locales:
+                try:
+                    yield import_module('.formats', location % loc)
+                except ImportError:
+                    pass
 
 def get_format_modules(reverse=False):
     """
-    Returns an iterator over the format modules found in the project and Django
+    Returns an iterator over the format modules found
     """
-    modules = []
-    if not check_for_language(get_language()) or not settings.USE_L10N:
-        return modules
-    locale = to_locale(get_language())
-    if settings.FORMAT_MODULE_PATH:
-        format_locations = [settings.FORMAT_MODULE_PATH + '.%s']
-    else:
-        format_locations = []
-    format_locations.append('django.conf.locale.%s')
-    for location in format_locations:
-        for l in (locale, locale.split('_')[0]):
-            try:
-                mod = import_module('.formats', location % l)
-            except ImportError:
-                pass
-            else:
-                # Don't return duplicates
-                if mod not in modules:
-                    modules.append(mod)
+    lang = get_language()
+    modules = _format_modules_cache.setdefault(lang, list(iter_format_modules(lang)))
     if reverse:
         modules.reverse()
     return modules
@@ -42,11 +50,18 @@
     """
     format_type = smart_str(format_type)
     if settings.USE_L10N:
-        for module in get_format_modules():
-            try:
-                return getattr(module, format_type)
-            except AttributeError:
-                pass
+        cache_key = (format_type, get_language())
+        try:
+            return _format_cache[cache_key] or getattr(settings, format_type)
+        except KeyError:
+            for module in get_format_modules():
+                try:
+                    val = getattr(module, format_type)
+                    _format_cache[cache_key] = val
+                    return val
+                except AttributeError:
+                    pass
+            _format_cache[cache_key] = None
     return getattr(settings, format_type)
 
 def date_format(value, format=None):
@@ -79,23 +94,25 @@
     Checks if value is a localizable type (date, number...) and returns it
     formatted as a string using current locale format
     """
-    if settings.USE_L10N:
-        if isinstance(value, (decimal.Decimal, float, int)):
-            return number_format(value)
-        elif isinstance(value, datetime.datetime):
-            return date_format(value, 'DATETIME_FORMAT')
-        elif isinstance(value, datetime.date):
-            return date_format(value)
-        elif isinstance(value, datetime.time):
-            return time_format(value, 'TIME_FORMAT')
-    return value
+    if isinstance(value, bool):
+        return mark_safe(unicode(value))
+    elif isinstance(value, (decimal.Decimal, float, int, long)):
+        return number_format(value)
+    elif isinstance(value, datetime.datetime):
+        return date_format(value, 'DATETIME_FORMAT')
+    elif isinstance(value, datetime.date):
+        return date_format(value)
+    elif isinstance(value, datetime.time):
+        return time_format(value, 'TIME_FORMAT')
+    else:
+        return value
 
 def localize_input(value, default=None):
     """
     Checks if an input value is a localizable type and returns it
     formatted with the appropriate formatting string of the current locale.
     """
-    if isinstance(value, (decimal.Decimal, float, int)):
+    if isinstance(value, (decimal.Decimal, float, int, long)):
         return number_format(value)
     if isinstance(value, datetime.datetime):
         value = datetime_safe.new_datetime(value)
diff -Nru python-django-1.2.3/django/utils/http.py python-django-1.2.4/django/utils/http.py
--- python-django-1.2.3/django/utils/http.py	2009-03-22 08:58:29.000000000 +0100
+++ python-django-1.2.4/django/utils/http.py	2010-12-23 04:46:37.000000000 +0100
@@ -73,8 +73,13 @@
 
 def base36_to_int(s):
     """
-    Convertd a base 36 string to an integer
+    Converts a base 36 string to an ``int``. To prevent
+    overconsumption of server resources, raises ``ValueError` if the
+    input is longer than 13 base36 digits (13 digits is sufficient to
+    base36-encode any 64-bit integer).
     """
+    if len(s) > 13:
+        raise ValueError("Base36 input too large")
     return int(s, 36)
 
 def int_to_base36(i):
diff -Nru python-django-1.2.3/django/utils/itercompat.py python-django-1.2.4/django/utils/itercompat.py
--- python-django-1.2.3/django/utils/itercompat.py	2010-05-04 16:00:30.000000000 +0200
+++ python-django-1.2.4/django/utils/itercompat.py	2010-11-15 00:36:40.000000000 +0100
@@ -37,3 +37,9 @@
         if not item:
             return False
     return True
+
+def any(iterable):
+    for item in iterable:
+        if item:
+            return True
+    return False
diff -Nru python-django-1.2.3/django/utils/numberformat.py python-django-1.2.4/django/utils/numberformat.py
--- python-django-1.2.3/django/utils/numberformat.py	2010-03-20 16:26:41.000000000 +0100
+++ python-django-1.2.4/django/utils/numberformat.py	2010-09-27 17:27:07.000000000 +0200
@@ -1,4 +1,6 @@
 from django.conf import settings
+from django.utils.safestring import mark_safe
+
 
 def format(number, decimal_sep, decimal_pos, grouping=0, thousand_sep=''):
     """
@@ -11,15 +13,20 @@
     * thousand_sep: Thousand separator symbol (for example ",")
 
     """
+    use_grouping = settings.USE_L10N and \
+        settings.USE_THOUSAND_SEPARATOR and grouping
+    # Make the common case fast:
+    if isinstance(number, int) and not use_grouping and not decimal_pos:
+        return mark_safe(unicode(number))
     # sign
     if float(number) < 0:
         sign = '-'
     else:
         sign = ''
-    # decimal part
     str_number = unicode(number)
     if str_number[0] == '-':
         str_number = str_number[1:]
+    # decimal part
     if '.' in str_number:
         int_part, dec_part = str_number.split('.')
         if decimal_pos:
@@ -30,13 +37,12 @@
         dec_part = dec_part + ('0' * (decimal_pos - len(dec_part)))
     if dec_part: dec_part = decimal_sep + dec_part
     # grouping
-    if settings.USE_L10N and settings.USE_THOUSAND_SEPARATOR and grouping:
+    if use_grouping:
         int_part_gd = ''
         for cnt, digit in enumerate(int_part[::-1]):
             if cnt and not cnt % grouping:
                 int_part_gd += thousand_sep
             int_part_gd += digit
         int_part = int_part_gd[::-1]
-
     return sign + int_part + dec_part
 
diff -Nru python-django-1.2.3/django/utils/translation/trans_real.py python-django-1.2.4/django/utils/translation/trans_real.py
--- python-django-1.2.3/django/utils/translation/trans_real.py	2010-05-08 23:38:27.000000000 +0200
+++ python-django-1.2.4/django/utils/translation/trans_real.py	2010-11-04 15:15:16.000000000 +0100
@@ -439,10 +439,11 @@
                 else:
                     singular.append('%%(%s)s' % t.contents)
             elif t.token_type == TOKEN_TEXT:
+                contents = t.contents.replace('%', '%%')
                 if inplural:
-                    plural.append(t.contents)
+                    plural.append(contents)
                 else:
-                    singular.append(t.contents)
+                    singular.append(contents)
         else:
             if t.token_type == TOKEN_BLOCK:
                 imatch = inline_re.match(t.contents)
diff -Nru python-django-1.2.3/django/views/csrf.py python-django-1.2.4/django/views/csrf.py
--- python-django-1.2.3/django/views/csrf.py	2010-09-03 20:34:30.000000000 +0200
+++ python-django-1.2.4/django/views/csrf.py	2010-10-09 10:25:01.000000000 +0200
@@ -34,7 +34,7 @@
   <p>CSRF verification failed. Request aborted.</p>
 {% if no_referer %}
   <p>You are seeing this message because this HTTPS site requires a 'Referer
-   header' to be sent by your web browser, but none was sent. This header is
+   header' to be sent by your Web browser, but none was sent. This header is
    required for security reasons, to ensure that your browser is not being
    hijacked by third parties.</p>
 
diff -Nru python-django-1.2.3/django/views/debug.py python-django-1.2.4/django/views/debug.py
--- python-django-1.2.3/django/views/debug.py	2010-05-28 19:25:43.000000000 +0200
+++ python-django-1.2.4/django/views/debug.py	2010-12-13 14:55:46.000000000 +0100
@@ -2,6 +2,7 @@
 import os
 import re
 import sys
+import types
 
 from django.conf import settings
 from django.http import HttpResponse, HttpResponseServerError, HttpResponseNotFound
@@ -275,8 +276,13 @@
             # tried exists but is an empty list. The URLconf must've been empty.
             return empty_urlconf(request)
 
+    urlconf = getattr(request, 'urlconf', settings.ROOT_URLCONF)
+    if isinstance(urlconf, types.ModuleType):
+        urlconf = urlconf.__name__
+
     t = Template(TECHNICAL_404_TEMPLATE, name='Technical 404 template')
     c = Context({
+        'urlconf': urlconf,
         'root_urlconf': settings.ROOT_URLCONF,
         'request_path': request.path_info[1:], # Trim leading slash
         'urlpatterns': tried,
@@ -773,7 +779,7 @@
   <div id="info">
     {% if urlpatterns %}
       <p>
-      Using the URLconf defined in <code>{{ settings.ROOT_URLCONF }}</code>,
+      Using the URLconf defined in <code>{{ urlconf }}</code>,
       Django tried these URL patterns, in this order:
       </p>
       <ol>
diff -Nru python-django-1.2.3/django/views/decorators/cache.py python-django-1.2.4/django/views/decorators/cache.py
--- python-django-1.2.3/django/views/decorators/cache.py	2010-05-04 16:00:30.000000000 +0200
+++ python-django-1.2.4/django/views/decorators/cache.py	2010-12-04 08:05:57.000000000 +0100
@@ -1,16 +1,3 @@
-"""
-Decorator for views that tries getting the page from the cache and
-populates the cache if the page isn't in the cache yet.
-
-The cache is keyed by the URL and some data from the headers. Additionally
-there is the key prefix that is used to distinguish different cache areas
-in a multi-site setup. You could use the sites.get_current().domain, for
-example, as that is unique across a Django project.
-
-Additionally, all headers from the response's Vary header will be taken into
-account on caching -- just like the middleware does.
-"""
-
 try:
     from functools import wraps
 except ImportError:
@@ -22,6 +9,19 @@
 
 
 def cache_page(*args, **kwargs):
+    """
+    Decorator for views that tries getting the page from the cache and
+    populates the cache if the page isn't in the cache yet.
+
+    The cache is keyed by the URL and some data from the headers.
+    Additionally there is the key prefix that is used to distinguish different
+    cache areas in a multi-site setup. You could use the
+    sites.get_current().domain, for example, as that is unique across a Django
+    project.
+
+    Additionally, all headers from the response's Vary header will be taken
+    into account on caching -- just like the middleware does.
+    """
     # We need backwards compatibility with code which spells it this way:
     #   def my_view(): pass
     #   my_view = cache_page(my_view, 123)
@@ -33,6 +33,10 @@
     #   my_view = cache_page(123, key_prefix="foo")(my_view)
     # and possibly this way (?):
     #   my_view = cache_page(123, my_view)
+    # and also this way:
+    #   my_view = cache_page(my_view)
+    # and also this way:
+    #   my_view = cache_page()(my_view)
 
     # We also add some asserts to give better error messages in case people are
     # using other ways to call cache_page that no longer work.
@@ -45,9 +49,14 @@
         elif callable(args[1]):
             return decorator_from_middleware_with_args(CacheMiddleware)(cache_timeout=args[0], key_prefix=key_prefix)(args[1])
         else:
-            assert False, "cache_page must be passed either a single argument (timeout) or a view function and a timeout"
+            assert False, "cache_page must be passed a view function if called with two arguments"
+    elif len(args) == 1:
+        if callable(args[0]):
+            return decorator_from_middleware_with_args(CacheMiddleware)(key_prefix=key_prefix)(args[0])
+        else:
+            return decorator_from_middleware_with_args(CacheMiddleware)(cache_timeout=args[0], key_prefix=key_prefix)
     else:
-        return decorator_from_middleware_with_args(CacheMiddleware)(cache_timeout=args[0], key_prefix=key_prefix)
+        return decorator_from_middleware_with_args(CacheMiddleware)(key_prefix=key_prefix)
 
 
 def cache_control(**kwargs):
diff -Nru python-django-1.2.3/django/views/decorators/csrf.py python-django-1.2.4/django/views/decorators/csrf.py
--- python-django-1.2.3/django/views/decorators/csrf.py	2010-05-04 16:00:30.000000000 +0200
+++ python-django-1.2.4/django/views/decorators/csrf.py	2010-10-28 13:58:51.000000000 +0200
@@ -14,6 +14,22 @@
 using the decorator multiple times, is harmless and efficient.
 """
 
+
+class _EnsureCsrfToken(CsrfViewMiddleware):
+    # We need this to behave just like the CsrfViewMiddleware, but not reject
+    # requests.
+    def _reject(self, request, reason):
+        return None
+
+
+requires_csrf_token = decorator_from_middleware(_EnsureCsrfToken)
+requires_csrf_token.__name__ = 'requires_csrf_token'
+csrf_protect.__doc__ = """
+Use this decorator on views that need a correct csrf_token available to
+RequestContext, but without the CSRF protection that csrf_protect
+enforces.
+"""
+
 def csrf_response_exempt(view_func):
     """
     Modifies a view function so that its response is exempt
diff -Nru python-django-1.2.3/django/views/defaults.py python-django-1.2.4/django/views/defaults.py
--- python-django-1.2.3/django/views/defaults.py	2008-09-10 07:56:34.000000000 +0200
+++ python-django-1.2.4/django/views/defaults.py	2010-10-28 13:58:51.000000000 +0200
@@ -1,6 +1,11 @@
 from django import http
+from django.views.decorators.csrf import requires_csrf_token
 from django.template import Context, RequestContext, loader
 
+
+# This can be called when CsrfViewMiddleware.process_view has not run, therefore
+# need @requires_csrf_token in case the template needs {% csrf_token %}.
+@requires_csrf_token
 def page_not_found(request, template_name='404.html'):
     """
     Default 404 handler.
@@ -13,6 +18,8 @@
     t = loader.get_template(template_name) # You need to create a 404.html template.
     return http.HttpResponseNotFound(t.render(RequestContext(request, {'request_path': request.path})))
 
+
+@requires_csrf_token
 def server_error(request, template_name='500.html'):
     """
     500 error handler.
@@ -23,6 +30,7 @@
     t = loader.get_template(template_name) # You need to create a 500.html template.
     return http.HttpResponseServerError(t.render(Context({})))
 
+
 def shortcut(request, content_type_id, object_id):
     # TODO: Remove this in Django 2.0.
     # This is a legacy view that depends on the contenttypes framework.
diff -Nru python-django-1.2.3/django/views/i18n.py python-django-1.2.4/django/views/i18n.py
--- python-django-1.2.3/django/views/i18n.py	2010-05-13 15:29:31.000000000 +0200
+++ python-django-1.2.4/django/views/i18n.py	2010-12-13 14:58:38.000000000 +0100
@@ -177,7 +177,8 @@
     locale = to_locale(get_language())
     t = {}
     paths = []
-    en_catalog_missing = False
+    en_selected = locale.startswith('en')
+    en_catalog_missing = True
     # first load all english languages files for defaults
     for package in packages:
         p = importlib.import_module(package)
@@ -187,13 +188,12 @@
             catalog = gettext_module.translation(domain, path, ['en'])
             t.update(catalog._catalog)
         except IOError:
-            # 'en' catalog was missing.
-            if locale.startswith('en'):
-                # If 'en' is the selected language this would cause issues
-                # later on if default_locale is something other than 'en'.
-                en_catalog_missing = True
-            # Otherwise it is harmless.
             pass
+        else:
+            # 'en' is the selected language and at least one of the packages
+            # listed in `packages` has an 'en' catalog
+            if en_selected:
+                en_catalog_missing = False
     # next load the settings.LANGUAGE_CODE translations if it isn't english
     if default_locale != 'en':
         for path in paths:
@@ -205,12 +205,11 @@
                 t.update(catalog._catalog)
     # last load the currently selected language, if it isn't identical to the default.
     if locale != default_locale:
-        # If the flag en_catalog_missing has been set, the currently
-        # selected language is English but it doesn't have a translation
-        # catalog (presumably due to being the language translated from).
-        # If that is the case, a wrong language catalog might have been
-        # loaded in the previous step. It needs to be discarded.
-        if en_catalog_missing:
+        # If the currently selected language is English but it doesn't have a
+        # translation catalog (presumably due to being the language translated
+        # from) then a wrong language catalog might have been loaded in the
+        # previous step. It needs to be discarded.
+        if en_selected and en_catalog_missing:
             t = {}
         else:
             locale_t = {}
diff -Nru python-django-1.2.3/django/views/static.py python-django-1.2.4/django/views/static.py
--- python-django-1.2.3/django/views/static.py	2010-01-10 19:36:20.000000000 +0100
+++ python-django-1.2.4/django/views/static.py	2010-11-30 22:32:11.000000000 +0100
@@ -56,7 +56,8 @@
         raise Http404('"%s" does not exist' % fullpath)
     # Respect the If-Modified-Since header.
     statobj = os.stat(fullpath)
-    mimetype = mimetypes.guess_type(fullpath)[0] or 'application/octet-stream'
+    mimetype, encoding = mimetypes.guess_type(fullpath)
+    mimetype = mimetype or 'application/octet-stream'
     if not was_modified_since(request.META.get('HTTP_IF_MODIFIED_SINCE'),
                               statobj[stat.ST_MTIME], statobj[stat.ST_SIZE]):
         return HttpResponseNotModified(mimetype=mimetype)
@@ -64,6 +65,8 @@
     response = HttpResponse(contents, mimetype=mimetype)
     response["Last-Modified"] = http_date(statobj[stat.ST_MTIME])
     response["Content-Length"] = len(contents)
+    if encoding:
+        response["Content-Encoding"] = encoding
     return response
 
 DEFAULT_DIRECTORY_INDEX_TEMPLATE = """
@@ -126,12 +129,15 @@
             raise ValueError
         matches = re.match(r"^([^;]+)(; length=([0-9]+))?$", header,
                            re.IGNORECASE)
-        header_mtime = mktime_tz(parsedate_tz(matches.group(1)))
+        header_date = parsedate_tz(matches.group(1))
+        if header_date is None:
+            raise ValueError
+        header_mtime = mktime_tz(header_date)
         header_len = matches.group(3)
         if header_len and int(header_len) != size:
             raise ValueError
         if mtime > header_mtime:
             raise ValueError
-    except (AttributeError, ValueError):
+    except (AttributeError, ValueError, OverflowError):
         return True
     return False
diff -Nru python-django-1.2.3/docs/conf.py python-django-1.2.4/docs/conf.py
diff -Nru python-django-1.2.3/docs/contents.txt python-django-1.2.4/docs/contents.txt
diff -Nru python-django-1.2.3/docs/_ext/djangodocs.py python-django-1.2.4/docs/_ext/djangodocs.py
diff -Nru python-django-1.2.3/docs/faq/admin.txt python-django-1.2.4/docs/faq/admin.txt
diff -Nru python-django-1.2.3/docs/faq/general.txt python-django-1.2.4/docs/faq/general.txt
diff -Nru python-django-1.2.3/docs/faq/usage.txt python-django-1.2.4/docs/faq/usage.txt
diff -Nru python-django-1.2.3/docs/howto/auth-remote-user.txt python-django-1.2.4/docs/howto/auth-remote-user.txt
diff -Nru python-django-1.2.3/docs/howto/custom-model-fields.txt python-django-1.2.4/docs/howto/custom-model-fields.txt
diff -Nru python-django-1.2.3/docs/howto/custom-template-tags.txt python-django-1.2.4/docs/howto/custom-template-tags.txt
diff -Nru python-django-1.2.3/docs/howto/deployment/fastcgi.txt python-django-1.2.4/docs/howto/deployment/fastcgi.txt
diff -Nru python-django-1.2.3/docs/howto/deployment/index.txt python-django-1.2.4/docs/howto/deployment/index.txt
diff -Nru python-django-1.2.3/docs/howto/deployment/modpython.txt python-django-1.2.4/docs/howto/deployment/modpython.txt
diff -Nru python-django-1.2.3/docs/howto/deployment/modwsgi.txt python-django-1.2.4/docs/howto/deployment/modwsgi.txt
diff -Nru python-django-1.2.3/docs/howto/error-reporting.txt python-django-1.2.4/docs/howto/error-reporting.txt
diff -Nru python-django-1.2.3/docs/howto/i18n.txt python-django-1.2.4/docs/howto/i18n.txt
diff -Nru python-django-1.2.3/docs/howto/jython.txt python-django-1.2.4/docs/howto/jython.txt
diff -Nru python-django-1.2.3/docs/howto/outputting-csv.txt python-django-1.2.4/docs/howto/outputting-csv.txt
diff -Nru python-django-1.2.3/docs/howto/outputting-pdf.txt python-django-1.2.4/docs/howto/outputting-pdf.txt
diff -Nru python-django-1.2.3/docs/index.txt python-django-1.2.4/docs/index.txt
diff -Nru python-django-1.2.3/docs/internals/committers.txt python-django-1.2.4/docs/internals/committers.txt
diff -Nru python-django-1.2.3/docs/internals/contributing.txt python-django-1.2.4/docs/internals/contributing.txt
diff -Nru python-django-1.2.3/docs/internals/documentation.txt python-django-1.2.4/docs/internals/documentation.txt
diff -Nru python-django-1.2.3/docs/internals/svn.txt python-django-1.2.4/docs/internals/svn.txt
diff -Nru python-django-1.2.3/docs/intro/index.txt python-django-1.2.4/docs/intro/index.txt
diff -Nru python-django-1.2.3/docs/intro/install.txt python-django-1.2.4/docs/intro/install.txt
diff -Nru python-django-1.2.3/docs/intro/overview.txt python-django-1.2.4/docs/intro/overview.txt
diff -Nru python-django-1.2.3/docs/intro/tutorial01.txt python-django-1.2.4/docs/intro/tutorial01.txt
diff -Nru python-django-1.2.3/docs/intro/tutorial02.txt python-django-1.2.4/docs/intro/tutorial02.txt
diff -Nru python-django-1.2.3/docs/intro/tutorial03.txt python-django-1.2.4/docs/intro/tutorial03.txt
diff -Nru python-django-1.2.3/docs/intro/tutorial04.txt python-django-1.2.4/docs/intro/tutorial04.txt
diff -Nru python-django-1.2.3/docs/intro/whatsnext.txt python-django-1.2.4/docs/intro/whatsnext.txt
diff -Nru python-django-1.2.3/docs/man/daily_cleanup.1 python-django-1.2.4/docs/man/daily_cleanup.1
diff -Nru python-django-1.2.3/docs/man/django-admin.1 python-django-1.2.4/docs/man/django-admin.1
diff -Nru python-django-1.2.3/docs/man/gather_profile_stats.1 python-django-1.2.4/docs/man/gather_profile_stats.1
diff -Nru python-django-1.2.3/docs/misc/api-stability.txt python-django-1.2.4/docs/misc/api-stability.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/admin/actions.txt python-django-1.2.4/docs/ref/contrib/admin/actions.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/admin/admindocs.txt python-django-1.2.4/docs/ref/contrib/admin/admindocs.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/admin/index.txt python-django-1.2.4/docs/ref/contrib/admin/index.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/comments/custom.txt python-django-1.2.4/docs/ref/contrib/comments/custom.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/comments/moderation.txt python-django-1.2.4/docs/ref/contrib/comments/moderation.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/formtools/form-wizard.txt python-django-1.2.4/docs/ref/contrib/formtools/form-wizard.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/gis/deployment.txt python-django-1.2.4/docs/ref/contrib/gis/deployment.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/gis/index.txt python-django-1.2.4/docs/ref/contrib/gis/index.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/gis/install.txt python-django-1.2.4/docs/ref/contrib/gis/install.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/gis/model-api.txt python-django-1.2.4/docs/ref/contrib/gis/model-api.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/gis/ogrinspect.txt python-django-1.2.4/docs/ref/contrib/gis/ogrinspect.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/gis/testing.txt python-django-1.2.4/docs/ref/contrib/gis/testing.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/gis/tutorial.txt python-django-1.2.4/docs/ref/contrib/gis/tutorial.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/gis/utils.txt python-django-1.2.4/docs/ref/contrib/gis/utils.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/humanize.txt python-django-1.2.4/docs/ref/contrib/humanize.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/localflavor.txt python-django-1.2.4/docs/ref/contrib/localflavor.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/markup.txt python-django-1.2.4/docs/ref/contrib/markup.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/sitemaps.txt python-django-1.2.4/docs/ref/contrib/sitemaps.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/sites.txt python-django-1.2.4/docs/ref/contrib/sites.txt
diff -Nru python-django-1.2.3/docs/ref/contrib/syndication.txt python-django-1.2.4/docs/ref/contrib/syndication.txt
diff -Nru python-django-1.2.3/docs/ref/databases.txt python-django-1.2.4/docs/ref/databases.txt
diff -Nru python-django-1.2.3/docs/ref/django-admin.txt python-django-1.2.4/docs/ref/django-admin.txt
diff -Nru python-django-1.2.3/docs/ref/exceptions.txt python-django-1.2.4/docs/ref/exceptions.txt
diff -Nru python-django-1.2.3/docs/ref/files/file.txt python-django-1.2.4/docs/ref/files/file.txt
diff -Nru python-django-1.2.3/docs/ref/files/index.txt python-django-1.2.4/docs/ref/files/index.txt
diff -Nru python-django-1.2.3/docs/ref/files/storage.txt python-django-1.2.4/docs/ref/files/storage.txt
diff -Nru python-django-1.2.3/docs/ref/forms/fields.txt python-django-1.2.4/docs/ref/forms/fields.txt
diff -Nru python-django-1.2.3/docs/ref/forms/index.txt python-django-1.2.4/docs/ref/forms/index.txt
diff -Nru python-django-1.2.3/docs/ref/forms/widgets.txt python-django-1.2.4/docs/ref/forms/widgets.txt
diff -Nru python-django-1.2.3/docs/ref/generic-views.txt python-django-1.2.4/docs/ref/generic-views.txt
diff -Nru python-django-1.2.3/docs/ref/middleware.txt python-django-1.2.4/docs/ref/middleware.txt
diff -Nru python-django-1.2.3/docs/ref/models/fields.txt python-django-1.2.4/docs/ref/models/fields.txt
diff -Nru python-django-1.2.3/docs/ref/models/instances.txt python-django-1.2.4/docs/ref/models/instances.txt
diff -Nru python-django-1.2.3/docs/ref/models/options.txt python-django-1.2.4/docs/ref/models/options.txt
diff -Nru python-django-1.2.3/docs/ref/models/querysets.txt python-django-1.2.4/docs/ref/models/querysets.txt
diff -Nru python-django-1.2.3/docs/ref/models/relations.txt python-django-1.2.4/docs/ref/models/relations.txt
diff -Nru python-django-1.2.3/docs/ref/request-response.txt python-django-1.2.4/docs/ref/request-response.txt
diff -Nru python-django-1.2.3/docs/ref/settings.txt python-django-1.2.4/docs/ref/settings.txt
diff -Nru python-django-1.2.3/docs/ref/signals.txt python-django-1.2.4/docs/ref/signals.txt
diff -Nru python-django-1.2.3/docs/ref/templates/api.txt python-django-1.2.4/docs/ref/templates/api.txt
diff -Nru python-django-1.2.3/docs/ref/templates/builtins.txt python-django-1.2.4/docs/ref/templates/builtins.txt
diff -Nru python-django-1.2.3/docs/ref/utils.txt python-django-1.2.4/docs/ref/utils.txt
diff -Nru python-django-1.2.3/docs/ref/validators.txt python-django-1.2.4/docs/ref/validators.txt
diff -Nru python-django-1.2.3/docs/releases/1.0-porting-guide.txt python-django-1.2.4/docs/releases/1.0-porting-guide.txt
diff -Nru python-django-1.2.3/docs/releases/1.0.txt python-django-1.2.4/docs/releases/1.0.txt
diff -Nru python-django-1.2.3/docs/releases/1.1-beta-1.txt python-django-1.2.4/docs/releases/1.1-beta-1.txt
diff -Nru python-django-1.2.3/docs/releases/1.1.txt python-django-1.2.4/docs/releases/1.1.txt
diff -Nru python-django-1.2.3/docs/releases/1.2.2.txt python-django-1.2.4/docs/releases/1.2.2.txt
diff -Nru python-django-1.2.3/docs/releases/1.2.4.txt python-django-1.2.4/docs/releases/1.2.4.txt
diff -Nru python-django-1.2.3/docs/releases/1.2.txt python-django-1.2.4/docs/releases/1.2.txt
diff -Nru python-django-1.2.3/docs/releases/index.txt python-django-1.2.4/docs/releases/index.txt
diff -Nru python-django-1.2.3/docs/topics/auth.txt python-django-1.2.4/docs/topics/auth.txt
diff -Nru python-django-1.2.3/docs/topics/cache.txt python-django-1.2.4/docs/topics/cache.txt
diff -Nru python-django-1.2.3/docs/topics/conditional-view-processing.txt python-django-1.2.4/docs/topics/conditional-view-processing.txt
diff -Nru python-django-1.2.3/docs/topics/db/models.txt python-django-1.2.4/docs/topics/db/models.txt
diff -Nru python-django-1.2.3/docs/topics/db/optimization.txt python-django-1.2.4/docs/topics/db/optimization.txt
diff -Nru python-django-1.2.3/docs/topics/db/queries.txt python-django-1.2.4/docs/topics/db/queries.txt
diff -Nru python-django-1.2.3/docs/topics/db/sql.txt python-django-1.2.4/docs/topics/db/sql.txt
diff -Nru python-django-1.2.3/docs/topics/db/transactions.txt python-django-1.2.4/docs/topics/db/transactions.txt
diff -Nru python-django-1.2.3/docs/topics/email.txt python-django-1.2.4/docs/topics/email.txt
diff -Nru python-django-1.2.3/docs/topics/files.txt python-django-1.2.4/docs/topics/files.txt
diff -Nru python-django-1.2.3/docs/topics/forms/formsets.txt python-django-1.2.4/docs/topics/forms/formsets.txt
diff -Nru python-django-1.2.3/docs/topics/forms/index.txt python-django-1.2.4/docs/topics/forms/index.txt
diff -Nru python-django-1.2.3/docs/topics/forms/media.txt python-django-1.2.4/docs/topics/forms/media.txt
diff -Nru python-django-1.2.3/docs/topics/forms/modelforms.txt python-django-1.2.4/docs/topics/forms/modelforms.txt
diff -Nru python-django-1.2.3/docs/topics/generic-views.txt python-django-1.2.4/docs/topics/generic-views.txt
diff -Nru python-django-1.2.3/docs/topics/http/file-uploads.txt python-django-1.2.4/docs/topics/http/file-uploads.txt
diff -Nru python-django-1.2.3/docs/topics/http/middleware.txt python-django-1.2.4/docs/topics/http/middleware.txt
diff -Nru python-django-1.2.3/docs/topics/http/shortcuts.txt python-django-1.2.4/docs/topics/http/shortcuts.txt
diff -Nru python-django-1.2.3/docs/topics/http/urls.txt python-django-1.2.4/docs/topics/http/urls.txt
diff -Nru python-django-1.2.3/docs/topics/http/views.txt python-django-1.2.4/docs/topics/http/views.txt
diff -Nru python-django-1.2.3/docs/topics/i18n/deployment.txt python-django-1.2.4/docs/topics/i18n/deployment.txt
diff -Nru python-django-1.2.3/docs/topics/i18n/internationalization.txt python-django-1.2.4/docs/topics/i18n/internationalization.txt
diff -Nru python-django-1.2.3/docs/topics/i18n/localization.txt python-django-1.2.4/docs/topics/i18n/localization.txt
diff -Nru python-django-1.2.3/docs/topics/install.txt python-django-1.2.4/docs/topics/install.txt
diff -Nru python-django-1.2.3/docs/topics/signals.txt python-django-1.2.4/docs/topics/signals.txt
diff -Nru python-django-1.2.3/docs/topics/templates.txt python-django-1.2.4/docs/topics/templates.txt
diff -Nru python-django-1.2.3/docs/topics/testing.txt python-django-1.2.4/docs/topics/testing.txt
diff -Nru python-django-1.2.3/MANIFEST.in python-django-1.2.4/MANIFEST.in
--- python-django-1.2.3/MANIFEST.in	2010-09-10 21:22:06.000000000 +0200
+++ python-django-1.2.4/MANIFEST.in	2010-09-12 08:39:02.000000000 +0200
@@ -5,11 +5,10 @@
 include MANIFEST.in
 include django/contrib/gis/gdal/LICENSE
 include django/contrib/gis/geos/LICENSE
-include django/dispatch/LICENSE.txt
+include django/dispatch/license.txt
 include django/utils/simplejson/LICENSE.txt
 recursive-include docs *
 recursive-include scripts *
-recursive-include examples *
 recursive-include extras *
 recursive-include tests *
 recursive-include django/conf/locale *
diff -Nru python-django-1.2.3/PKG-INFO python-django-1.2.4/PKG-INFO
--- python-django-1.2.3/PKG-INFO	2010-09-11 08:50:26.000000000 +0200
+++ python-django-1.2.4/PKG-INFO	2010-12-23 05:14:34.000000000 +0100
@@ -1,12 +1,12 @@
 Metadata-Version: 1.0
 Name: Django
-Version: 1.2.3
+Version: 1.2.4
 Summary: A high-level Python Web framework that encourages rapid development and clean, pragmatic design.
 Home-page: http://www.djangoproject.com/
 Author: Django Software Foundation
 Author-email: foundation@djangoproject.com
 License: UNKNOWN
-Download-URL: http://media.djangoproject.com/releases/1.2/Django-1.2.3.tar.gz
+Download-URL: http://media.djangoproject.com/releases/1.2/Django-1.2.4.tar.gz
 Description: UNKNOWN
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
diff -Nru python-django-1.2.3/setup.py python-django-1.2.4/setup.py
--- python-django-1.2.3/setup.py	2010-09-11 08:49:33.000000000 +0200
+++ python-django-1.2.4/setup.py	2010-12-23 05:12:24.000000000 +0100
@@ -77,7 +77,7 @@
     author = 'Django Software Foundation',
     author_email = 'foundation@djangoproject.com',
     description = 'A high-level Python Web framework that encourages rapid development and clean, pragmatic design.',
-    download_url = 'http://media.djangoproject.com/releases/1.2/Django-1.2.3.tar.gz',
+    download_url = 'http://media.djangoproject.com/releases/1.2/Django-1.2.4.tar.gz',
     packages = packages,
     cmdclass = cmdclasses,
     data_files = data_files,
diff -Nru python-django-1.2.3/tests/modeltests/basic/models.py python-django-1.2.4/tests/modeltests/basic/models.py
diff -Nru python-django-1.2.3/tests/modeltests/basic/tests.py python-django-1.2.4/tests/modeltests/basic/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/custom_columns/models.py python-django-1.2.4/tests/modeltests/custom_columns/models.py
diff -Nru python-django-1.2.3/tests/modeltests/custom_columns/tests.py python-django-1.2.4/tests/modeltests/custom_columns/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/custom_managers/models.py python-django-1.2.4/tests/modeltests/custom_managers/models.py
diff -Nru python-django-1.2.3/tests/modeltests/custom_managers/tests.py python-django-1.2.4/tests/modeltests/custom_managers/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/custom_methods/models.py python-django-1.2.4/tests/modeltests/custom_methods/models.py
diff -Nru python-django-1.2.3/tests/modeltests/custom_methods/tests.py python-django-1.2.4/tests/modeltests/custom_methods/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/custom_pk/fields.py python-django-1.2.4/tests/modeltests/custom_pk/fields.py
diff -Nru python-django-1.2.3/tests/modeltests/custom_pk/models.py python-django-1.2.4/tests/modeltests/custom_pk/models.py
diff -Nru python-django-1.2.3/tests/modeltests/custom_pk/tests.py python-django-1.2.4/tests/modeltests/custom_pk/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/defer/models.py python-django-1.2.4/tests/modeltests/defer/models.py
diff -Nru python-django-1.2.3/tests/modeltests/defer/tests.py python-django-1.2.4/tests/modeltests/defer/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/delete/models.py python-django-1.2.4/tests/modeltests/delete/models.py
diff -Nru python-django-1.2.3/tests/modeltests/delete/tests.py python-django-1.2.4/tests/modeltests/delete/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/empty/models.py python-django-1.2.4/tests/modeltests/empty/models.py
diff -Nru python-django-1.2.3/tests/modeltests/empty/tests.py python-django-1.2.4/tests/modeltests/empty/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/expressions/models.py python-django-1.2.4/tests/modeltests/expressions/models.py
diff -Nru python-django-1.2.3/tests/modeltests/expressions/tests.py python-django-1.2.4/tests/modeltests/expressions/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/field_defaults/models.py python-django-1.2.4/tests/modeltests/field_defaults/models.py
diff -Nru python-django-1.2.3/tests/modeltests/field_defaults/tests.py python-django-1.2.4/tests/modeltests/field_defaults/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/field_subclassing/fields.py python-django-1.2.4/tests/modeltests/field_subclassing/fields.py
diff -Nru python-django-1.2.3/tests/modeltests/field_subclassing/models.py python-django-1.2.4/tests/modeltests/field_subclassing/models.py
diff -Nru python-django-1.2.3/tests/modeltests/field_subclassing/tests.py python-django-1.2.4/tests/modeltests/field_subclassing/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/files/models.py python-django-1.2.4/tests/modeltests/files/models.py
diff -Nru python-django-1.2.3/tests/modeltests/files/tests.py python-django-1.2.4/tests/modeltests/files/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/force_insert_update/models.py python-django-1.2.4/tests/modeltests/force_insert_update/models.py
diff -Nru python-django-1.2.3/tests/modeltests/force_insert_update/tests.py python-django-1.2.4/tests/modeltests/force_insert_update/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/generic_relations/models.py python-django-1.2.4/tests/modeltests/generic_relations/models.py
diff -Nru python-django-1.2.3/tests/modeltests/generic_relations/tests.py python-django-1.2.4/tests/modeltests/generic_relations/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/get_latest/models.py python-django-1.2.4/tests/modeltests/get_latest/models.py
diff -Nru python-django-1.2.3/tests/modeltests/get_latest/tests.py python-django-1.2.4/tests/modeltests/get_latest/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/get_object_or_404/models.py python-django-1.2.4/tests/modeltests/get_object_or_404/models.py
diff -Nru python-django-1.2.3/tests/modeltests/get_object_or_404/tests.py python-django-1.2.4/tests/modeltests/get_object_or_404/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/get_or_create/models.py python-django-1.2.4/tests/modeltests/get_or_create/models.py
diff -Nru python-django-1.2.3/tests/modeltests/get_or_create/tests.py python-django-1.2.4/tests/modeltests/get_or_create/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/invalid_models/models.py python-django-1.2.4/tests/modeltests/invalid_models/models.py
diff -Nru python-django-1.2.3/tests/modeltests/lookup/models.py python-django-1.2.4/tests/modeltests/lookup/models.py
diff -Nru python-django-1.2.3/tests/modeltests/lookup/tests.py python-django-1.2.4/tests/modeltests/lookup/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/m2m_and_m2o/models.py python-django-1.2.4/tests/modeltests/m2m_and_m2o/models.py
diff -Nru python-django-1.2.3/tests/modeltests/m2m_and_m2o/tests.py python-django-1.2.4/tests/modeltests/m2m_and_m2o/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/m2m_intermediary/models.py python-django-1.2.4/tests/modeltests/m2m_intermediary/models.py
diff -Nru python-django-1.2.3/tests/modeltests/m2m_intermediary/tests.py python-django-1.2.4/tests/modeltests/m2m_intermediary/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/m2m_multiple/models.py python-django-1.2.4/tests/modeltests/m2m_multiple/models.py
diff -Nru python-django-1.2.3/tests/modeltests/m2m_multiple/tests.py python-django-1.2.4/tests/modeltests/m2m_multiple/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/m2m_recursive/models.py python-django-1.2.4/tests/modeltests/m2m_recursive/models.py
diff -Nru python-django-1.2.3/tests/modeltests/m2m_recursive/tests.py python-django-1.2.4/tests/modeltests/m2m_recursive/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/m2m_signals/models.py python-django-1.2.4/tests/modeltests/m2m_signals/models.py
diff -Nru python-django-1.2.3/tests/modeltests/m2m_signals/tests.py python-django-1.2.4/tests/modeltests/m2m_signals/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/m2m_through/models.py python-django-1.2.4/tests/modeltests/m2m_through/models.py
diff -Nru python-django-1.2.3/tests/modeltests/m2m_through/tests.py python-django-1.2.4/tests/modeltests/m2m_through/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/m2o_recursive/models.py python-django-1.2.4/tests/modeltests/m2o_recursive/models.py
diff -Nru python-django-1.2.3/tests/modeltests/m2o_recursive/tests.py python-django-1.2.4/tests/modeltests/m2o_recursive/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/m2o_recursive2/models.py python-django-1.2.4/tests/modeltests/m2o_recursive2/models.py
diff -Nru python-django-1.2.3/tests/modeltests/many_to_many/models.py python-django-1.2.4/tests/modeltests/many_to_many/models.py
diff -Nru python-django-1.2.3/tests/modeltests/many_to_many/tests.py python-django-1.2.4/tests/modeltests/many_to_many/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/many_to_one/models.py python-django-1.2.4/tests/modeltests/many_to_one/models.py
diff -Nru python-django-1.2.3/tests/modeltests/many_to_one/tests.py python-django-1.2.4/tests/modeltests/many_to_one/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/many_to_one_null/models.py python-django-1.2.4/tests/modeltests/many_to_one_null/models.py
diff -Nru python-django-1.2.3/tests/modeltests/many_to_one_null/tests.py python-django-1.2.4/tests/modeltests/many_to_one_null/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/model_formsets/models.py python-django-1.2.4/tests/modeltests/model_formsets/models.py
diff -Nru python-django-1.2.3/tests/modeltests/model_formsets/tests.py python-django-1.2.4/tests/modeltests/model_formsets/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/model_inheritance/models.py python-django-1.2.4/tests/modeltests/model_inheritance/models.py
diff -Nru python-django-1.2.3/tests/modeltests/model_inheritance/tests.py python-django-1.2.4/tests/modeltests/model_inheritance/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/model_package/tests.py python-django-1.2.4/tests/modeltests/model_package/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/mutually_referential/models.py python-django-1.2.4/tests/modeltests/mutually_referential/models.py
diff -Nru python-django-1.2.3/tests/modeltests/mutually_referential/tests.py python-django-1.2.4/tests/modeltests/mutually_referential/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/one_to_one/models.py python-django-1.2.4/tests/modeltests/one_to_one/models.py
diff -Nru python-django-1.2.3/tests/modeltests/one_to_one/tests.py python-django-1.2.4/tests/modeltests/one_to_one/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/ordering/models.py python-django-1.2.4/tests/modeltests/ordering/models.py
diff -Nru python-django-1.2.3/tests/modeltests/ordering/tests.py python-django-1.2.4/tests/modeltests/ordering/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/order_with_respect_to/models.py python-django-1.2.4/tests/modeltests/order_with_respect_to/models.py
diff -Nru python-django-1.2.3/tests/modeltests/order_with_respect_to/tests.py python-django-1.2.4/tests/modeltests/order_with_respect_to/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/or_lookups/models.py python-django-1.2.4/tests/modeltests/or_lookups/models.py
diff -Nru python-django-1.2.3/tests/modeltests/or_lookups/tests.py python-django-1.2.4/tests/modeltests/or_lookups/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/pagination/models.py python-django-1.2.4/tests/modeltests/pagination/models.py
diff -Nru python-django-1.2.3/tests/modeltests/pagination/tests.py python-django-1.2.4/tests/modeltests/pagination/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/properties/models.py python-django-1.2.4/tests/modeltests/properties/models.py
diff -Nru python-django-1.2.3/tests/modeltests/properties/tests.py python-django-1.2.4/tests/modeltests/properties/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/proxy_model_inheritance/tests.py python-django-1.2.4/tests/modeltests/proxy_model_inheritance/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/proxy_models/models.py python-django-1.2.4/tests/modeltests/proxy_models/models.py
diff -Nru python-django-1.2.3/tests/modeltests/proxy_models/tests.py python-django-1.2.4/tests/modeltests/proxy_models/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/raw_query/tests.py python-django-1.2.4/tests/modeltests/raw_query/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/reserved_names/models.py python-django-1.2.4/tests/modeltests/reserved_names/models.py
diff -Nru python-django-1.2.3/tests/modeltests/reserved_names/tests.py python-django-1.2.4/tests/modeltests/reserved_names/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/reverse_lookup/models.py python-django-1.2.4/tests/modeltests/reverse_lookup/models.py
diff -Nru python-django-1.2.3/tests/modeltests/reverse_lookup/tests.py python-django-1.2.4/tests/modeltests/reverse_lookup/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/save_delete_hooks/models.py python-django-1.2.4/tests/modeltests/save_delete_hooks/models.py
diff -Nru python-django-1.2.3/tests/modeltests/save_delete_hooks/tests.py python-django-1.2.4/tests/modeltests/save_delete_hooks/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/select_related/models.py python-django-1.2.4/tests/modeltests/select_related/models.py
diff -Nru python-django-1.2.3/tests/modeltests/select_related/tests.py python-django-1.2.4/tests/modeltests/select_related/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/serializers/models.py python-django-1.2.4/tests/modeltests/serializers/models.py
diff -Nru python-django-1.2.3/tests/modeltests/serializers/tests.py python-django-1.2.4/tests/modeltests/serializers/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/signals/models.py python-django-1.2.4/tests/modeltests/signals/models.py
diff -Nru python-django-1.2.3/tests/modeltests/signals/tests.py python-django-1.2.4/tests/modeltests/signals/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/str/models.py python-django-1.2.4/tests/modeltests/str/models.py
diff -Nru python-django-1.2.3/tests/modeltests/str/tests.py python-django-1.2.4/tests/modeltests/str/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/test_client/models.py python-django-1.2.4/tests/modeltests/test_client/models.py
diff -Nru python-django-1.2.3/tests/modeltests/test_client/views.py python-django-1.2.4/tests/modeltests/test_client/views.py
diff -Nru python-django-1.2.3/tests/modeltests/transactions/models.py python-django-1.2.4/tests/modeltests/transactions/models.py
diff -Nru python-django-1.2.3/tests/modeltests/transactions/tests.py python-django-1.2.4/tests/modeltests/transactions/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/unmanaged_models/models.py python-django-1.2.4/tests/modeltests/unmanaged_models/models.py
diff -Nru python-django-1.2.3/tests/modeltests/unmanaged_models/tests.py python-django-1.2.4/tests/modeltests/unmanaged_models/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/update/models.py python-django-1.2.4/tests/modeltests/update/models.py
diff -Nru python-django-1.2.3/tests/modeltests/update/tests.py python-django-1.2.4/tests/modeltests/update/tests.py
diff -Nru python-django-1.2.3/tests/modeltests/user_commands/management/commands/dance.py python-django-1.2.4/tests/modeltests/user_commands/management/commands/dance.py
diff -Nru python-django-1.2.3/tests/modeltests/user_commands/models.py python-django-1.2.4/tests/modeltests/user_commands/models.py
diff -Nru python-django-1.2.3/tests/modeltests/user_commands/tests.py python-django-1.2.4/tests/modeltests/user_commands/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/admin_changelist/tests.py python-django-1.2.4/tests/regressiontests/admin_changelist/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/admin_inlines/models.py python-django-1.2.4/tests/regressiontests/admin_inlines/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/admin_inlines/tests.py python-django-1.2.4/tests/regressiontests/admin_inlines/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/admin_ordering/models.py python-django-1.2.4/tests/regressiontests/admin_ordering/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/admin_ordering/tests.py python-django-1.2.4/tests/regressiontests/admin_ordering/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/admin_registration/models.py python-django-1.2.4/tests/regressiontests/admin_registration/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/admin_registration/tests.py python-django-1.2.4/tests/regressiontests/admin_registration/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/admin_scripts/tests.py python-django-1.2.4/tests/regressiontests/admin_scripts/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/admin_util/models.py python-django-1.2.4/tests/regressiontests/admin_util/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/admin_util/tests.py python-django-1.2.4/tests/regressiontests/admin_util/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/admin_validation/models.py python-django-1.2.4/tests/regressiontests/admin_validation/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/admin_validation/tests.py python-django-1.2.4/tests/regressiontests/admin_validation/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/admin_views/models.py python-django-1.2.4/tests/regressiontests/admin_views/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/admin_views/tests.py python-django-1.2.4/tests/regressiontests/admin_views/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/admin_widgets/models.py python-django-1.2.4/tests/regressiontests/admin_widgets/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/admin_widgets/tests.py python-django-1.2.4/tests/regressiontests/admin_widgets/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/aggregation_regress/models.py python-django-1.2.4/tests/regressiontests/aggregation_regress/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/aggregation_regress/tests.py python-django-1.2.4/tests/regressiontests/aggregation_regress/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/app_loading/tests.py python-django-1.2.4/tests/regressiontests/app_loading/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/backends/models.py python-django-1.2.4/tests/regressiontests/backends/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/backends/tests.py python-django-1.2.4/tests/regressiontests/backends/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/bug8245/tests.py python-django-1.2.4/tests/regressiontests/bug8245/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/builtin_server/tests.py python-django-1.2.4/tests/regressiontests/builtin_server/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/cache/liberal_backend.py python-django-1.2.4/tests/regressiontests/cache/liberal_backend.py
diff -Nru python-django-1.2.3/tests/regressiontests/cache/tests.py python-django-1.2.4/tests/regressiontests/cache/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/comment_tests/tests/comment_form_tests.py python-django-1.2.4/tests/regressiontests/comment_tests/tests/comment_form_tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/comment_tests/tests/comment_view_tests.py python-django-1.2.4/tests/regressiontests/comment_tests/tests/comment_view_tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/comment_tests/tests/model_tests.py python-django-1.2.4/tests/regressiontests/comment_tests/tests/model_tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/comment_tests/tests/moderation_view_tests.py python-django-1.2.4/tests/regressiontests/comment_tests/tests/moderation_view_tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/comment_tests/urls_admin.py python-django-1.2.4/tests/regressiontests/comment_tests/urls_admin.py
diff -Nru python-django-1.2.3/tests/regressiontests/csrf_tests/tests.py python-django-1.2.4/tests/regressiontests/csrf_tests/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/custom_columns_regress/models.py python-django-1.2.4/tests/regressiontests/custom_columns_regress/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/custom_columns_regress/tests.py python-django-1.2.4/tests/regressiontests/custom_columns_regress/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/custom_managers_regress/models.py python-django-1.2.4/tests/regressiontests/custom_managers_regress/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/custom_managers_regress/tests.py python-django-1.2.4/tests/regressiontests/custom_managers_regress/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/datastructures/tests.py python-django-1.2.4/tests/regressiontests/datastructures/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/datatypes/models.py python-django-1.2.4/tests/regressiontests/datatypes/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/datatypes/tests.py python-django-1.2.4/tests/regressiontests/datatypes/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/dateformat/tests.py python-django-1.2.4/tests/regressiontests/dateformat/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/db_typecasts/tests.py python-django-1.2.4/tests/regressiontests/db_typecasts/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/decorators/tests.py python-django-1.2.4/tests/regressiontests/decorators/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/defaultfilters/tests.py python-django-1.2.4/tests/regressiontests/defaultfilters/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/defer_regress/models.py python-django-1.2.4/tests/regressiontests/defer_regress/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/defer_regress/tests.py python-django-1.2.4/tests/regressiontests/defer_regress/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/expressions_regress/models.py python-django-1.2.4/tests/regressiontests/expressions_regress/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/expressions_regress/tests.py python-django-1.2.4/tests/regressiontests/expressions_regress/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/extra_regress/models.py python-django-1.2.4/tests/regressiontests/extra_regress/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/extra_regress/tests.py python-django-1.2.4/tests/regressiontests/extra_regress/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/file_storage/tests.py python-django-1.2.4/tests/regressiontests/file_storage/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/file_uploads/tests.py python-django-1.2.4/tests/regressiontests/file_uploads/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/fixtures_regress/fixtures/thingy.json python-django-1.2.4/tests/regressiontests/fixtures_regress/fixtures/thingy.json
diff -Nru python-django-1.2.3/tests/regressiontests/fixtures_regress/models.py python-django-1.2.4/tests/regressiontests/fixtures_regress/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/fixtures_regress/tests.py python-django-1.2.4/tests/regressiontests/fixtures_regress/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/error_messages.py python-django-1.2.4/tests/regressiontests/forms/error_messages.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/extra.py python-django-1.2.4/tests/regressiontests/forms/extra.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/fields.py python-django-1.2.4/tests/regressiontests/forms/fields.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/formsets.py python-django-1.2.4/tests/regressiontests/forms/formsets.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/forms.py python-django-1.2.4/tests/regressiontests/forms/forms.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/input_formats.py python-django-1.2.4/tests/regressiontests/forms/input_formats.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/ar.py python-django-1.2.4/tests/regressiontests/forms/localflavor/ar.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/at.py python-django-1.2.4/tests/regressiontests/forms/localflavor/at.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/au.py python-django-1.2.4/tests/regressiontests/forms/localflavor/au.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/br.py python-django-1.2.4/tests/regressiontests/forms/localflavor/br.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/ca.py python-django-1.2.4/tests/regressiontests/forms/localflavor/ca.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/ch.py python-django-1.2.4/tests/regressiontests/forms/localflavor/ch.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/cl.py python-django-1.2.4/tests/regressiontests/forms/localflavor/cl.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/de.py python-django-1.2.4/tests/regressiontests/forms/localflavor/de.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/es.py python-django-1.2.4/tests/regressiontests/forms/localflavor/es.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/fi.py python-django-1.2.4/tests/regressiontests/forms/localflavor/fi.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/fr.py python-django-1.2.4/tests/regressiontests/forms/localflavor/fr.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/generic.py python-django-1.2.4/tests/regressiontests/forms/localflavor/generic.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/id.py python-django-1.2.4/tests/regressiontests/forms/localflavor/id.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/ie.py python-django-1.2.4/tests/regressiontests/forms/localflavor/ie.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/__init__.py python-django-1.2.4/tests/regressiontests/forms/localflavor/__init__.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/is_.py python-django-1.2.4/tests/regressiontests/forms/localflavor/is_.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/it.py python-django-1.2.4/tests/regressiontests/forms/localflavor/it.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/jp.py python-django-1.2.4/tests/regressiontests/forms/localflavor/jp.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/kw.py python-django-1.2.4/tests/regressiontests/forms/localflavor/kw.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/nl.py python-django-1.2.4/tests/regressiontests/forms/localflavor/nl.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/pl.py python-django-1.2.4/tests/regressiontests/forms/localflavor/pl.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/pt.py python-django-1.2.4/tests/regressiontests/forms/localflavor/pt.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/ro.py python-django-1.2.4/tests/regressiontests/forms/localflavor/ro.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/sk.py python-django-1.2.4/tests/regressiontests/forms/localflavor/sk.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/uk.py python-django-1.2.4/tests/regressiontests/forms/localflavor/uk.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/us.py python-django-1.2.4/tests/regressiontests/forms/localflavor/us.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/utils.py python-django-1.2.4/tests/regressiontests/forms/localflavor/utils.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/uy.py python-django-1.2.4/tests/regressiontests/forms/localflavor/uy.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavor/za.py python-django-1.2.4/tests/regressiontests/forms/localflavor/za.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/localflavortests.py python-django-1.2.4/tests/regressiontests/forms/localflavortests.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/media.py python-django-1.2.4/tests/regressiontests/forms/media.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/models.py python-django-1.2.4/tests/regressiontests/forms/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/regressions.py python-django-1.2.4/tests/regressiontests/forms/regressions.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/tests/error_messages.py python-django-1.2.4/tests/regressiontests/forms/tests/error_messages.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/tests/extra.py python-django-1.2.4/tests/regressiontests/forms/tests/extra.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/tests/fields.py python-django-1.2.4/tests/regressiontests/forms/tests/fields.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/tests/formsets.py python-django-1.2.4/tests/regressiontests/forms/tests/formsets.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/tests/forms.py python-django-1.2.4/tests/regressiontests/forms/tests/forms.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/tests/__init__.py python-django-1.2.4/tests/regressiontests/forms/tests/__init__.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/tests/input_formats.py python-django-1.2.4/tests/regressiontests/forms/tests/input_formats.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/tests/media.py python-django-1.2.4/tests/regressiontests/forms/tests/media.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/tests/models.py python-django-1.2.4/tests/regressiontests/forms/tests/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/tests/regressions.py python-django-1.2.4/tests/regressiontests/forms/tests/regressions.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/tests/util.py python-django-1.2.4/tests/regressiontests/forms/tests/util.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/tests/validators.py python-django-1.2.4/tests/regressiontests/forms/tests/validators.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/tests/widgets.py python-django-1.2.4/tests/regressiontests/forms/tests/widgets.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/tests.py python-django-1.2.4/tests/regressiontests/forms/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/util.py python-django-1.2.4/tests/regressiontests/forms/util.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/validators.py python-django-1.2.4/tests/regressiontests/forms/validators.py
diff -Nru python-django-1.2.3/tests/regressiontests/forms/widgets.py python-django-1.2.4/tests/regressiontests/forms/widgets.py
diff -Nru python-django-1.2.3/tests/regressiontests/generic_inline_admin/tests.py python-django-1.2.4/tests/regressiontests/generic_inline_admin/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/get_or_create_regress/models.py python-django-1.2.4/tests/regressiontests/get_or_create_regress/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/get_or_create_regress/tests.py python-django-1.2.4/tests/regressiontests/get_or_create_regress/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/httpwrappers/tests.py python-django-1.2.4/tests/regressiontests/httpwrappers/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/humanize/tests.py python-django-1.2.4/tests/regressiontests/humanize/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/i18n/models.py python-django-1.2.4/tests/regressiontests/i18n/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/i18n/tests.py python-django-1.2.4/tests/regressiontests/i18n/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/initial_sql_regress/models.py python-django-1.2.4/tests/regressiontests/initial_sql_regress/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/initial_sql_regress/tests.py python-django-1.2.4/tests/regressiontests/initial_sql_regress/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/inline_formsets/models.py python-django-1.2.4/tests/regressiontests/inline_formsets/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/inline_formsets/tests.py python-django-1.2.4/tests/regressiontests/inline_formsets/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/m2m_regress/models.py python-django-1.2.4/tests/regressiontests/m2m_regress/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/m2m_regress/tests.py python-django-1.2.4/tests/regressiontests/m2m_regress/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/mail/tests.py python-django-1.2.4/tests/regressiontests/mail/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/makemessages/extraction.py python-django-1.2.4/tests/regressiontests/makemessages/extraction.py
diff -Nru python-django-1.2.3/tests/regressiontests/makemessages/templates/test.html python-django-1.2.4/tests/regressiontests/makemessages/templates/test.html
diff -Nru python-django-1.2.3/tests/regressiontests/managers_regress/models.py python-django-1.2.4/tests/regressiontests/managers_regress/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/managers_regress/tests.py python-django-1.2.4/tests/regressiontests/managers_regress/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/many_to_one_regress/models.py python-django-1.2.4/tests/regressiontests/many_to_one_regress/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/many_to_one_regress/tests.py python-django-1.2.4/tests/regressiontests/many_to_one_regress/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/middleware/tests.py python-django-1.2.4/tests/regressiontests/middleware/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/modeladmin/models.py python-django-1.2.4/tests/regressiontests/modeladmin/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/modeladmin/tests.py python-django-1.2.4/tests/regressiontests/modeladmin/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/model_forms_regress/tests.py python-django-1.2.4/tests/regressiontests/model_forms_regress/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/model_inheritance_regress/models.py python-django-1.2.4/tests/regressiontests/model_inheritance_regress/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/model_inheritance_regress/tests.py python-django-1.2.4/tests/regressiontests/model_inheritance_regress/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/model_inheritance_select_related/models.py python-django-1.2.4/tests/regressiontests/model_inheritance_select_related/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/model_inheritance_select_related/tests.py python-django-1.2.4/tests/regressiontests/model_inheritance_select_related/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/model_regress/models.py python-django-1.2.4/tests/regressiontests/model_regress/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/model_regress/tests.py python-django-1.2.4/tests/regressiontests/model_regress/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/multiple_database/models.py python-django-1.2.4/tests/regressiontests/multiple_database/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/multiple_database/tests.py python-django-1.2.4/tests/regressiontests/multiple_database/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/null_fk/models.py python-django-1.2.4/tests/regressiontests/null_fk/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/null_fk/tests.py python-django-1.2.4/tests/regressiontests/null_fk/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/null_fk_ordering/models.py python-django-1.2.4/tests/regressiontests/null_fk_ordering/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/null_fk_ordering/tests.py python-django-1.2.4/tests/regressiontests/null_fk_ordering/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/null_queries/models.py python-django-1.2.4/tests/regressiontests/null_queries/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/null_queries/tests.py python-django-1.2.4/tests/regressiontests/null_queries/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/one_to_one_regress/models.py python-django-1.2.4/tests/regressiontests/one_to_one_regress/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/one_to_one_regress/tests.py python-django-1.2.4/tests/regressiontests/one_to_one_regress/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/queries/models.py python-django-1.2.4/tests/regressiontests/queries/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/queries/tests.py python-django-1.2.4/tests/regressiontests/queries/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/requests/tests.py python-django-1.2.4/tests/regressiontests/requests/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/reverse_single_related/models.py python-django-1.2.4/tests/regressiontests/reverse_single_related/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/reverse_single_related/tests.py python-django-1.2.4/tests/regressiontests/reverse_single_related/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/select_related_regress/models.py python-django-1.2.4/tests/regressiontests/select_related_regress/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/select_related_regress/tests.py python-django-1.2.4/tests/regressiontests/select_related_regress/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/servers/tests.py python-django-1.2.4/tests/regressiontests/servers/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/signals_regress/models.py python-django-1.2.4/tests/regressiontests/signals_regress/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/signals_regress/tests.py python-django-1.2.4/tests/regressiontests/signals_regress/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/sites_framework/models.py python-django-1.2.4/tests/regressiontests/sites_framework/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/sites_framework/tests.py python-django-1.2.4/tests/regressiontests/sites_framework/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/string_lookup/models.py python-django-1.2.4/tests/regressiontests/string_lookup/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/string_lookup/tests.py python-django-1.2.4/tests/regressiontests/string_lookup/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/syndication/tests.py python-django-1.2.4/tests/regressiontests/syndication/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/templates/context.py python-django-1.2.4/tests/regressiontests/templates/context.py
diff -Nru python-django-1.2.3/tests/regressiontests/templates/custom.py python-django-1.2.4/tests/regressiontests/templates/custom.py
diff -Nru python-django-1.2.3/tests/regressiontests/templates/filters.py python-django-1.2.4/tests/regressiontests/templates/filters.py
diff -Nru python-django-1.2.3/tests/regressiontests/templates/loaders.py python-django-1.2.4/tests/regressiontests/templates/loaders.py
diff -Nru python-django-1.2.3/tests/regressiontests/templates/parser.py python-django-1.2.4/tests/regressiontests/templates/parser.py
diff -Nru python-django-1.2.3/tests/regressiontests/templates/tests.py python-django-1.2.4/tests/regressiontests/templates/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/templates/unicode.py python-django-1.2.4/tests/regressiontests/templates/unicode.py
diff -Nru python-django-1.2.3/tests/regressiontests/test_client_regress/models.py python-django-1.2.4/tests/regressiontests/test_client_regress/models.py
diff -Nru python-django-1.2.3/tests/regressiontests/test_runner/tests.py python-django-1.2.4/tests/regressiontests/test_runner/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/text/tests.py python-django-1.2.4/tests/regressiontests/text/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/urlpatterns_reverse/tests.py python-django-1.2.4/tests/regressiontests/urlpatterns_reverse/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/utils/checksums.py python-django-1.2.4/tests/regressiontests/utils/checksums.py
diff -Nru python-django-1.2.3/tests/regressiontests/utils/datastructures.py python-django-1.2.4/tests/regressiontests/utils/datastructures.py
diff -Nru python-django-1.2.3/tests/regressiontests/utils/dateformat.py python-django-1.2.4/tests/regressiontests/utils/dateformat.py
diff -Nru python-django-1.2.3/tests/regressiontests/utils/datetime_safe.py python-django-1.2.4/tests/regressiontests/utils/datetime_safe.py
diff -Nru python-django-1.2.3/tests/regressiontests/utils/feedgenerator.py python-django-1.2.4/tests/regressiontests/utils/feedgenerator.py
diff -Nru python-django-1.2.3/tests/regressiontests/utils/functional.py python-django-1.2.4/tests/regressiontests/utils/functional.py
diff -Nru python-django-1.2.3/tests/regressiontests/utils/html.py python-django-1.2.4/tests/regressiontests/utils/html.py
diff -Nru python-django-1.2.3/tests/regressiontests/utils/module_loading.py python-django-1.2.4/tests/regressiontests/utils/module_loading.py
diff -Nru python-django-1.2.3/tests/regressiontests/utils/simplelazyobject.py python-django-1.2.4/tests/regressiontests/utils/simplelazyobject.py
diff -Nru python-django-1.2.3/tests/regressiontests/utils/termcolors.py python-django-1.2.4/tests/regressiontests/utils/termcolors.py
diff -Nru python-django-1.2.3/tests/regressiontests/utils/tests.py python-django-1.2.4/tests/regressiontests/utils/tests.py
diff -Nru python-django-1.2.3/tests/regressiontests/utils/text.py python-django-1.2.4/tests/regressiontests/utils/text.py
diff -Nru python-django-1.2.3/tests/regressiontests/utils/timesince.py python-django-1.2.4/tests/regressiontests/utils/timesince.py
diff -Nru python-django-1.2.3/tests/regressiontests/utils/tzinfo.py python-django-1.2.4/tests/regressiontests/utils/tzinfo.py
diff -Nru python-django-1.2.3/tests/regressiontests/views/app0/__init__.py python-django-1.2.4/tests/regressiontests/views/app0/__init__.py
Les fichiers binaires /tmp/k4Rha17U_b/python-django-1.2.3/tests/regressiontests/views/app0/locale/en/LC_MESSAGES/djangojs.mo et /tmp/JNRzoxahpQ/python-django-1.2.4/tests/regressiontests/views/app0/locale/en/LC_MESSAGES/djangojs.mo sont différents.
diff -Nru python-django-1.2.3/tests/regressiontests/views/app0/locale/en/LC_MESSAGES/djangojs.po python-django-1.2.4/tests/regressiontests/views/app0/locale/en/LC_MESSAGES/djangojs.po
Les fichiers binaires /tmp/k4Rha17U_b/python-django-1.2.3/tests/regressiontests/views/media/file.txt.gz et /tmp/JNRzoxahpQ/python-django-1.2.4/tests/regressiontests/views/media/file.txt.gz sont différents.
diff -Nru python-django-1.2.3/tests/regressiontests/views/tests/debug.py python-django-1.2.4/tests/regressiontests/views/tests/debug.py
diff -Nru python-django-1.2.3/tests/regressiontests/views/tests/defaults.py python-django-1.2.4/tests/regressiontests/views/tests/defaults.py
diff -Nru python-django-1.2.3/tests/regressiontests/views/tests/generic/create_update.py python-django-1.2.4/tests/regressiontests/views/tests/generic/create_update.py
diff -Nru python-django-1.2.3/tests/regressiontests/views/tests/i18n.py python-django-1.2.4/tests/regressiontests/views/tests/i18n.py
diff -Nru python-django-1.2.3/tests/regressiontests/views/tests/static.py python-django-1.2.4/tests/regressiontests/views/tests/static.py
diff -Nru python-django-1.2.3/tests/regressiontests/views/urls.py python-django-1.2.4/tests/regressiontests/views/urls.py
diff -Nru python-django-1.2.3/tests/runtests.py python-django-1.2.4/tests/runtests.py
diff -Nru python-django-1.2.3/tests/test_sqlite.py python-django-1.2.4/tests/test_sqlite.py

Reply to: