Commits

loe...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed f3a1a91

Merged revisions 16743,16745,16747-16750,16752-16754,16756-16760,16770,16773-16800,16802-16804,16806,16808,16811,16813,16815,16817-16826,16829-16833,16835-16836,16838-16843,16845-16858,16860-16866,16868,16871-16877,16882-16890,16893-16947 via svnmerge from
https://code.djangoproject.com/svn/django/trunk

........
r16743 | gabrielhurley | 2011-09-09 23:36:58 +0200 (Fr, 09 Sep 2011) | 2 lines

Fixed #16791 -- Updated a broken URL in the README file. Thanks to paulcwatts for the report and patch.
........
r16745 | Alex | 2011-09-09 23:45:58 +0200 (Fr, 09 Sep 2011) | 1 line

Switch to using explicit new-style division behavior, rather than relying on teh classic behavior.
........
r16747 | SmileyChris | 2011-09-10 00:32:38 +0200 (Sa, 10 Sep 2011) | 1 line

Fix and test for cleaning a non-string value in a URLField
........
r16748 | gabrielhurley | 2011-09-10 00:33:28 +0200 (Sa, 10 Sep 2011) | 2 lines

Fixed #16786 -- Minor cleanups in the memcached section of the caching topic guide. Thanks to jamesp for the report and patch.
........
r16749 | jbronn | 2011-09-10 00:34:23 +0200 (Sa, 10 Sep 2011) | 1 line

Fixed #16408 -- Fixed conversion of dates, and other problems with the SpatiaLite backend.
........
r16750 | jbronn | 2011-09-10 00:47:18 +0200 (Sa, 10 Sep 2011) | 1 line

Removed extra call to `syncdb` that slipped in with r16749.
........
r16752 | SmileyChris | 2011-09-10 00:57:12 +0200 (Sa, 10 Sep 2011) | 1 line

Fixes #16664 -- URLField's to_python method fails with ValueError on some urls on python 2.7. Based on patch by zigzag.
........
r16753 | russellm | 2011-09-10 01:02:33 +0200 (Sa, 10 Sep 2011) | 1 line

Added two pointless query repeats to work around a known issue with MySQL that was causing failures in our test suite.
........
r16754 | gabrielhurley | 2011-09-10 01:25:48 +0200 (Sa, 10 Sep 2011) | 2 lines

Fixed #16782 -- Corrected a broken cross-reference to the database engine setting in the tutorial. Thanks to mjumbewu for the report and patch.
........
r16756 | kmtracey | 2011-09-10 02:05:48 +0200 (Sa, 10 Sep 2011) | 2 lines

Fixed #15722: ensure formsets evaluate to True even if they have no forms. Thanks mlavin.
........
r16757 | jbronn | 2011-09-10 02:29:34 +0200 (Sa, 10 Sep 2011) | 1 line

Fixed #13670 -- Comparisons with the spatial adapter won't blow up in some corner cases. Thanks, milosu for the bug report and jpaulett for the patch.
........
r16758 | russellm | 2011-09-10 02:46:38 +0200 (Sa, 10 Sep 2011) | 1 line

Added protection against spoofing of X_FORWARDED_HOST headers. A security announcement will be made shortly.
........
r16759 | russellm | 2011-09-10 02:46:48 +0200 (Sa, 10 Sep 2011) | 1 line

Corrected an issue which could allow attackers to manipulate session data using the cache. A security announcement will be made shortly.
........
r16760 | russellm | 2011-09-10 02:47:00 +0200 (Sa, 10 Sep 2011) | 1 line

Altered the behavior of URLField to avoid a potential DOS vector, and to avoid potential leakage of local filesystem data. A security announcement will be made shortly.
........
r16770 | Alex | 2011-09-10 03:53:56 +0200 (Sa, 10 Sep 2011) | 1 line

Make ``Formset.__getitem__`` O(1), rather than O(n). If you override ``__iter__`` you now need to also override ``__getitem__`` for consistant behavior. Thanks to Carl and Russ for the review.
........
r16773 | Alex | 2011-09-10 04:42:05 +0200 (Sa, 10 Sep 2011) | 1 line

Fixed #11404. Added ``FormSet.has_changed``, for consistancy with ``Form.has_changed``. Thanks to michelts for the patch.
........
r16774 | Alex | 2011-09-10 04:52:37 +0200 (Sa, 10 Sep 2011) | 1 line

Fixed #16793. Added more cross referencing to the load tag's documentation. Thanks to bluejeansummer for the patch.
........
r16775 | jbronn | 2011-09-10 05:04:30 +0200 (Sa, 10 Sep 2011) | 1 line

Fixed #16790 -- Modified the geographic admin to work after r16594. Thanks, jdiego, for the bug report and patch.
........
r16776 | carljm | 2011-09-10 05:26:13 +0200 (Sa, 10 Sep 2011) | 1 line

Corrected documentation inconsistencies regarding deprecation of URLField.verify_exists.
........
r16777 | carljm | 2011-09-10 05:33:54 +0200 (Sa, 10 Sep 2011) | 1 line

Added basic release notes for 1.2.6 and 1.3.1.
........
r16778 | Alex | 2011-09-10 19:09:23 +0200 (Sa, 10 Sep 2011) | 1 line

Fixed #16162. Added timeout arg to `DummyCache.set_many`, for compatiblity with other caches. Thanks to aaugustin for the patch.
........
r16779 | jbronn | 2011-09-10 19:19:05 +0200 (Sa, 10 Sep 2011) | 1 line

Fixed #16537 -- Fixed multi-db issues with GeoDjango utilities. Thanks, Shane Shifflett for the bug report and aaugustin for the initial patch.
........
r16780 | Alex | 2011-09-10 19:20:31 +0200 (Sa, 10 Sep 2011) | 1 line

Fixed #16280. Document that both args and kwargs cannot be passed to reverse at the same time.
........
r16781 | russellm | 2011-09-10 19:29:33 +0200 (Sa, 10 Sep 2011) | 1 line

Refs #16490 - Add a commit to ensure that a fresh read is provided; this is only a problem for databases in REPEATABLE READ mode, which is MySQL InnoDB's default. Thanks to Jim Dalton for the report and patch.
........
r16782 | Alex | 2011-09-10 19:38:58 +0200 (Sa, 10 Sep 2011) | 1 line

Fixed #16808, removed some dead code from teh ORM. Thanks to aaugustin for the patch.
........
r16783 | jbronn | 2011-09-10 20:04:27 +0200 (Sa, 10 Sep 2011) | 1 line

Fixed #16553 -- Refactored the `GeoIP` module, moving it `django.contrib.gis.geoip`; fixed memory leaks, and encoding issues.
........
r16784 | russellm | 2011-09-10 20:44:33 +0200 (Sa, 10 Sep 2011) | 1 line

Fixed #16490 -- Skipped a test failure that only occurs under Python 2.6.1 (it's the old iteration-eats-exceptions problem).
........
r16785 | russellm | 2011-09-10 20:58:30 +0200 (Sa, 10 Sep 2011) | 1 line

Fixed #16809 -- Forced MySQL to behave like a database. This avoids a problem where queries that do IS NONE checks can return the wrong result the first time they are executed if there is a recently inserted row. Thanks to James Pyrich for the debug work and patch.
........
r16786 | Alex | 2011-09-10 21:45:16 +0200 (Sa, 10 Sep 2011) | 1 line

Make a comment more accurate.
........
r16787 | russellm | 2011-09-10 22:06:10 +0200 (Sa, 10 Sep 2011) | 1 line

Fixed #16592 -- More test changes and documentation to account for MySQL's casual relationship with sanity. Thanks to Jim Dalton for the report and patch.
........
r16788 | Alex | 2011-09-10 23:00:25 +0200 (Sa, 10 Sep 2011) | 1 line

Remove this deprecated alias.
........
r16789 | Alex | 2011-09-10 23:00:32 +0200 (Sa, 10 Sep 2011) | 1 line

Removed the deprecated-since-1.2 "supports_object_permissions" and "supports_anonymous_user" flags on authentication backends. If you have an authenication backend it now *must* suport these.
........
r16790 | Alex | 2011-09-10 23:29:21 +0200 (Sa, 10 Sep 2011) | 1 line

Fixed #16810, corrected a bad docstring. Thanks to kenkam for the patch.
........
r16791 | Alex | 2011-09-10 23:44:57 +0200 (Sa, 10 Sep 2011) | 1 line

Ensure bulk_create returns what it is supposed to.
........
r16792 | Alex | 2011-09-10 23:46:59 +0200 (Sa, 10 Sep 2011) | 1 line

Ensure bulk_create returns the right value if the argument is an empty list.
........
r16793 | Alex | 2011-09-11 00:02:13 +0200 (So, 11 Sep 2011) | 1 line

Fixed bulk_insertion on databases which don't yet support it. Thanks to Justin Bronn for his Oracle wizardry.
........
r16794 | Alex | 2011-09-11 00:31:38 +0200 (So, 11 Sep 2011) | 1 line

Remove a bunch of deadcode/dead imports.
........
r16795 | Alex | 2011-09-11 00:46:44 +0200 (So, 11 Sep 2011) | 1 line

Kill some more dead code.
........
r16796 | jbronn | 2011-09-11 00:53:26 +0200 (So, 11 Sep 2011) | 1 line

Fixed #14648 -- Fixed annotated date querysets when `GeoManager` is used. Thanks, codysoyland, for the bug report.
........
r16797 | jbronn | 2011-09-11 02:00:15 +0200 (So, 11 Sep 2011) | 1 line

Fixed #15305 -- Made `Count` aggregate and `.values()` play nice together on `GeoQuerySets`. Thanks, vrehak for the bug report and milosu for initial patch.
........
r16798 | jbronn | 2011-09-11 02:15:43 +0200 (So, 11 Sep 2011) | 1 line

Fixed #13429 -- Changed `WorldBorders` to just `WorldBorder` in GeoDjango tutorial. Thanks, tubaman for the bug report.
........
r16799 | ramiro | 2011-09-11 02:52:03 +0200 (So, 11 Sep 2011) | 4 lines

Fixed #14138 -- Removed a superfluous import in the sqlite3 DB backend.

This could be of help with some issues people were seeing when deploying
Django with sqlite and Apache.
........
r16800 | jbronn | 2011-09-11 02:52:08 +0200 (So, 11 Sep 2011) | 1 line

Fixed #16231 -- Added support for GML and KML on the SpatiaLite backend. Thanks, steko for the bug report and jpaulett for the patch.
........
r16802 | julien | 2011-09-11 03:12:11 +0200 (So, 11 Sep 2011) | 1 line

Fixed #16276 -- Noted in the deployment documentation index that the Django Book 2nd ed. was written against Django 1.1. Thanks to bshaurette and bluejeansummer for the patch.
........
r16803 | carljm | 2011-09-11 04:28:08 +0200 (So, 11 Sep 2011) | 1 line

Added basic release notes for 1.2.7.
........
r16804 | ubernostrum | 2011-09-11 06:01:41 +0200 (So, 11 Sep 2011) | 1 line

Fixed #16079: Clarified (for real this time) how handler404 and handler500 work, and that they only work in a root URLconf.
........
r16806 | ubernostrum | 2011-09-11 07:31:00 +0200 (So, 11 Sep 2011) | 1 line

Fixed #16552: Noted that contrib.sessions is a requirement for the admin.
........
r16808 | ubernostrum | 2011-09-11 07:37:55 +0200 (So, 11 Sep 2011) | 1 line

Fixed #16293: Document a way to return dicts with column names from a DB cursor.
........
r16811 | ubernostrum | 2011-09-11 07:44:21 +0200 (So, 11 Sep 2011) | 1 line

Fixed #16109: Corrected an inconsistency in URLconf examples for matching a numeric month.
........
r16813 | ubernostrum | 2011-09-11 07:47:48 +0200 (So, 11 Sep 2011) | 1 line

Fixed #16094: Added clear example of how to refer to custom permissions.
........
r16815 | ubernostrum | 2011-09-11 07:57:38 +0200 (So, 11 Sep 2011) | 1 line

Fixed #16334: Make it quite clear that cache_page's 'cache' argument refers to the name of a cache in the CACHES setting.
........
r16817 | julien | 2011-09-11 21:28:18 +0200 (So, 11 Sep 2011) | 1 line

Fixed #16742 -- Provided code examples in the models documentation for accessing extra fields on many-to-many relationships. Many thanks to aj for the suggestion and to Nick Lang for the patch.
........
r16818 | ramiro | 2011-09-12 00:36:16 +0200 (Mo, 12 Sep 2011) | 9 lines

Fixed #14675 -- Completed removal of `from django.conf.urls.default import *` usage.

This applies to both our own [test] code and documentation examples. Also:
* Moved the functions and handlers from `django.conf.urls.defaults` up to
`django.conf.urls` deprecating the former module.
* Added documentation for `handler403`.
* Tweaked the URLs topic document a bit.

Thanks to pupeno and cdestigter for their great work contributing patches.
........
r16819 | ramiro | 2011-09-12 01:02:53 +0200 (Mo, 12 Sep 2011) | 3 lines

Added an implementation of bulk insert via the ORM to the Oracle DB backend.

Refs #7596, r16739 and http://troels.arvin.dk/db/rdbms/#insert-multiple
........
r16820 | julien | 2011-09-12 09:12:28 +0200 (Mo, 12 Sep 2011) | 1 line

Fixed #16291 -- Documented that TypedChoiceField does not coerce empty_value. Thanks to vanschelven and taavi223.
........
r16821 | julien | 2011-09-12 09:15:47 +0200 (Mo, 12 Sep 2011) | 1 line

Fixed some improper quotes in the form fields reference doc.
........
r16822 | julien | 2011-09-13 05:10:07 +0200 (Di, 13 Sep 2011) | 1 line

Fixed #4198 -- Fixed a small styling issue in the admin calendar widget. Thanks to Gary Wilson and fcurella.
........
r16823 | julien | 2011-09-13 10:22:53 +0200 (Di, 13 Sep 2011) | 1 line

Fixed #16815 -- Rectified the code example for hidden_fields and visible_fields in the forms documentation. Thanks, joonas.
........
r16824 | jezdez | 2011-09-13 17:10:49 +0200 (Di, 13 Sep 2011) | 1 line

Fixed #16833 -- Removed undocumented `mixin` parameter from the `Storage.open()` method as this was an undocumented and obscure feature. Thanks to Marty and Russell for sanity-checking.
........
r16825 | jbronn | 2011-09-13 22:30:24 +0200 (Di, 13 Sep 2011) | 1 line

Updated versions and added `libproj-dev` to the GeoDjango installation docs.
........
r16826 | jbronn | 2011-09-13 22:43:33 +0200 (Di, 13 Sep 2011) | 1 line

Fixed #16778 -- Improved escaping of geometries on PostgreSQL, allowing GeoDjango to work on 9.1. Thanks, piro for ticket and patch.
........
r16829 | PaulM | 2011-09-15 01:27:35 +0200 (Do, 15 Sep 2011) | 2 lines

Fixed #16494 by normalizing HttpResponse behavior with non-string input. HttpResponse now always converts content to string on output, regardless of input type.
........
r16830 | PaulM | 2011-09-15 01:58:12 +0200 (Do, 15 Sep 2011) | 2 lines

Slight cleanup to r16829, thanks Alex Gaynor for the note.
........
r16831 | carljm | 2011-09-15 09:26:35 +0200 (Do, 15 Sep 2011) | 6 lines

Fixed #16848 - Adjusted SimpleTemplateResponse.__init__ to be less brittle.

Could have reverted r16830 instead, but HttpResponse shouldn't have to dance
around and do non-obvious things to keep TemplateResponse happy,
TemplateResponse should be robust against the possibility that
HttpResponse.__init__ might set self.content.
........
r16832 | Alex | 2011-09-16 01:55:30 +0200 (Fr, 16 Sep 2011) | 1 line

Fixed #16854 -- corrected an AttributeError coming from the contenttypes post-syncdb hook. Thanks to desh for the report.
........
r16833 | carljm | 2011-09-16 03:16:25 +0200 (Fr, 16 Sep 2011) | 9 lines

Fixed #16770 -- Eliminated TemplateSyntaxError wrapping of exceptions. Thanks to Justin Myles-Holmes for report and draft patch.

Exceptions raised in templates were previously wrapped in TemplateSyntaxError
(in TEMPLATE_DEBUG mode only) in order to provide template source details on
the debug 500 page. The same debug information is now provided by annotating
exceptions rather than wrapping them. This makes catching exceptions raised
from templates more sane, as it's consistent in or out of DEBUG, and you can
catch the specific exception(s) you care about rather than having to also catch
TemplateSyntaxError and unwrap it.
........
r16835 | julien | 2011-09-16 08:30:05 +0200 (Fr, 16 Sep 2011) | 1 line

Reverted the change in r16683, which, while fixing an alignment issue in IE7 with the admin's "Save and continue editing" and "Save and add another" buttons, caused the swapping of those buttons' order. Thanks to jocmeh for the report. Refs #16852.
........
r16836 | carljm | 2011-09-16 12:53:15 +0200 (Fr, 16 Sep 2011) | 1 line

Fixed #16094 -- Added missing colon in custom permissions docs.
........
r16838 | carljm | 2011-09-16 13:12:35 +0200 (Fr, 16 Sep 2011) | 1 line

Fixed #16812 -- Percent-encode URLs in verify_exists, to fix test failures on Python 2.5 and 2.6.
........
r16839 | carljm | 2011-09-16 13:57:03 +0200 (Fr, 16 Sep 2011) | 1 line

Fixed #16803 -- Use model verbose_name directly as ContentType unicode representation so it can be translated. Thanks to bronger for the report and Ivan Sagalaev for the patch.
........
r16840 | carljm | 2011-09-16 18:41:38 +0200 (Fr, 16 Sep 2011) | 1 line

Fixed #16568 -- Added RequireDebugFalse filter to prevent sending 500 error emails when DEBUG is True in projects with no explicit LOGGING setting. Thanks to Andreas Pelme for report and patch.
........
r16841 | carljm | 2011-09-16 19:07:19 +0200 (Fr, 16 Sep 2011) | 1 line

Added release note and updated TEMPLATE_DEBUG documentation for r16833. Thanks jezdez for the reminder.
........
r16842 | carljm | 2011-09-16 20:06:42 +0200 (Fr, 16 Sep 2011) | 9 lines

Fixed #16863 -- Corrected ReST markup to avoid errors building docs.

Although directives such as "note" and "warning" will accept content
immediately following the directive, this is technically where arguments to the
directive should go (see http://sphinx.pocoo.org/rest.html#directives). Putting
the content there means that any lines beginning with an inline text role
(e.g. ":setting:`DEBUG`") will be mis-interpreted as an option block for the
directive. To avoid this error, there should always be a blank line between the
directive start and the directive content.
........
r16843 | jbronn | 2011-09-16 23:19:30 +0200 (Fr, 16 Sep 2011) | 1 line

Fixed #16864 -- WKT regex now allows negative SRIDs. Thanks, Marcel Dancak for bug report and initial patch.
........
r16845 | jbronn | 2011-09-17 21:54:52 +0200 (Sa, 17 Sep 2011) | 1 line

Fixed #15277 -- Cleaned up `ogrinspect` command, added tests and extended support beyond file-based OGR data sources. Thanks, willinoed for bug report and jpaulett for initial patch.
........
r16846 | jbronn | 2011-09-17 22:06:00 +0200 (Sa, 17 Sep 2011) | 1 line

Updated the geographic admin to use OpenLayers 2.11.
........
r16847 | jbronn | 2011-09-18 01:01:46 +0200 (So, 18 Sep 2011) | 1 line

OpenLayers has had built-in OSM support since 2.10, no need for extra JS.
........
r16848 | SmileyChris | 2011-09-18 06:09:44 +0200 (So, 18 Sep 2011) | 1 line

Fixes #8103 -- Select widget should only allow for one selected option
........
r16849 | julien | 2011-09-18 09:24:16 +0200 (So, 18 Sep 2011) | 1 line

Fixed #13211 -- Added the `Group` API reference and a `Permission` API example to the `contrib.auth` documentation. Thanks to b14ck for the report and to jpaulett and CrazyGir for the patch.
........
r16850 | julien | 2011-09-18 09:50:50 +0200 (So, 18 Sep 2011) | 1 line

Rectified the settings reference documentation to indicate that `USE_L10N` (and not `USE_I18N`) controls the activation of locale-dictated formats.
........
r16851 | julien | 2011-09-18 10:33:39 +0200 (So, 18 Sep 2011) | 1 line

Fixed #16676 -- Corrected the behavior of the 'add' template filter to return an empty string instead of the given value unchanged in the case of an invalid use. Thanks to dtrebbien for the report and to Aymeric Augustin for the patch.
........
r16852 | PaulM | 2011-09-18 23:33:14 +0200 (So, 18 Sep 2011) | 2 lines

Removed an unused function definition.
........
r16853 | jbronn | 2011-09-19 00:28:17 +0200 (Mo, 19 Sep 2011) | 1 line

Updated geoadmin tests to reflect that OSM js is no longer required as of r16847.
........
r16854 | julien | 2011-09-19 09:25:59 +0200 (Mo, 19 Sep 2011) | 1 line

Fixed #16659 -- Made the admin's date drilldown links in the changelist have a variable width to play nicer with languages with long month names.
........
r16855 | julien | 2011-09-19 09:33:32 +0200 (Mo, 19 Sep 2011) | 1 line

Fixed #16876 -- Fixed a cross reference in the settings reference doc. Thanks to Gumnos for the report.
........
r16856 | ramiro | 2011-09-20 20:16:49 +0200 (Di, 20 Sep 2011) | 11 lines

Improved test isolation of the admin tests and assigned custom admin sites to
prevent test order dependant failures.

This involves introducing usage of `TestCase.urls` and implementing proper
admin.py modules for some of the test apps.

Thanks Florian Apolloner for finding the issue and contributing the patch.

Refs #15294 (it solves these problems so the fix for that ticket we are going
to commit doesn't introduce obscure and hard to reproduce test failures when
running the Django test suite.)
........
r16857 | ramiro | 2011-09-20 20:30:06 +0200 (Di, 20 Sep 2011) | 8 lines

Converted internal link generation in the admin and admin document generator to use named URLs.

Thanks to Florian Apolloner for both the initial patch and his final push to get
this fixed, to Dario Ocles for his great work on the admin templates and
switching the admin_doc application to also use named URLs, to Mikko Hellsing
for his comments and to Jannis and Julien for their review and design guidance.

Fixes #15294.
........
r16858 | DrMeers | 2011-09-21 03:33:14 +0200 (Mi, 21 Sep 2011) | 1 line

Fixed #16886 -- Memcached socket file documentation. Thanks ddbeck for the report and patch.
........
r16860 | carljm | 2011-09-21 16:00:58 +0200 (Mi, 21 Sep 2011) | 1 line

Fixed #16838 -- Corrected broken add-another inline JS in admin with related_name="+". Thanks jamesp for report and patch.
........
r16861 | carljm | 2011-09-21 16:20:18 +0200 (Mi, 21 Sep 2011) | 1 line

Fixed #16866 -- Clearer error message if empty list is passed to select_template. Thanks Silver_Ghost for report and patch.
........
r16862 | jezdez | 2011-09-21 17:58:21 +0200 (Mi, 21 Sep 2011) | 1 line

Fixed the relative static file resolution of the CachedStaticFilesStorage backend and the post processing of deeply nested static files.
........
r16863 | jezdez | 2011-09-21 17:58:32 +0200 (Mi, 21 Sep 2011) | 1 line

Fixed #16703 -- Raise an exception if the storage location of the DefaultStorageFinder is empty.
........
r16864 | julien | 2011-09-21 19:25:13 +0200 (Mi, 21 Sep 2011) | 1 line

Fixed #16897 -- Fixed some docstrings and help texts for the `makemessages` management command. Thanks, Simon Meers.
........
r16865 | Alex | 2011-09-21 23:19:18 +0200 (Mi, 21 Sep 2011) | 1 line

Switch a few examples in the docs to use newstyle classes.
........
r16866 | DrMeers | 2011-09-22 00:43:41 +0200 (Do, 22 Sep 2011) | 1 line

Fixed #16904 -- Additional clarification regarding contrib.messages iteration. Thanks murphyke for the report and patch.
........
r16868 | carljm | 2011-09-22 00:46:48 +0200 (Do, 22 Sep 2011) | 1 line

Fixed #16353 -- don't try to create Site objects on all databases. Refs #15573, #15346. Thanks Aymeric Augustin for the report and the patch.
........
r16871 | PaulM | 2011-09-22 06:10:02 +0200 (Do, 22 Sep 2011) | 2 lines

Fixed #16907 -- Deprecate databrowse.
........
r16872 | PaulM | 2011-09-22 06:16:21 +0200 (Do, 22 Sep 2011) | 2 lines

Fixed #16837 -- Improved error message for admin login.
........
r16873 | PaulM | 2011-09-22 06:30:20 +0200 (Do, 22 Sep 2011) | 2 lines

Fixed #16026 -- loaddata now identifies which object triggered an error.
........
r16874 | PaulM | 2011-09-22 06:36:15 +0200 (Do, 22 Sep 2011) | 2 lines

Fixed #15633 -- Improved docs for post_syncdb signal.
........
r16875 | PaulM | 2011-09-22 06:52:43 +0200 (Do, 22 Sep 2011) | 2 lines

Fixed 11674 -- Clarified docs on excluded fields of ModelForms.
........
r16876 | PaulM | 2011-09-22 07:10:52 +0200 (Do, 22 Sep 2011) | 2 lines

Fixed #7198 -- Improved error message when missing models.py. Thanks Silver_Ghost and for the patch.
........
r16877 | PaulM | 2011-09-22 07:21:51 +0200 (Do, 22 Sep 2011) | 2 lines

Fixed #6011 -- Improved help text for flush command. Thanks Julien for the patch.
........
r16882 | PaulM | 2011-09-22 07:56:47 +0200 (Do, 22 Sep 2011) | 2 lines

Refs r16873 and #16026 -- Missed adding the fixture.
........
r16883 | PaulM | 2011-09-22 08:37:50 +0200 (Do, 22 Sep 2011) | 2 lines

Fixed #16565 -- Fixed a databrowse error on null foreign key, even though databrowse is deprecated. Thanks aaugustin for the patch.
........
r16884 | jezdez | 2011-09-22 17:04:27 +0200 (Do, 22 Sep 2011) | 1 line

Fixed #16909 -- Pass language to get_format_modules when calling it from get_format to make sure the correct module is returned.
........
r16885 | jezdez | 2011-09-22 17:04:34 +0200 (Do, 22 Sep 2011) | 1 line

Added versionadded directive for the `bulk_create` Queryset method introduced in r16739.
........
r16886 | Alex | 2011-09-22 18:32:30 +0200 (Do, 22 Sep 2011) | 1 line

Slight english readability fix for the signals docs.
........
r16887 | ramiro | 2011-09-22 19:04:05 +0200 (Do, 22 Sep 2011) | 1 line

Fixed #16912 -- Fixed breadcrumb styling in a couple of admin pages, broken since r16857. Thanks Florian Apolloner for the report.
........
r16888 | gabrielhurley | 2011-09-22 23:09:00 +0200 (Do, 22 Sep 2011) | 2 lines

Fixed #7198 (again) -- Corrects a problem with string interpolation from r16876 and adds tests for the new error message.
........
r16889 | lukeplant | 2011-09-22 23:52:00 +0200 (Do, 22 Sep 2011) | 1 line

Fixed ReST errors that stopped some staticfiles docs being rendered
........
r16890 | PaulM | 2011-09-23 00:44:00 +0200 (Fr, 23 Sep 2011) | 2 lines

Fixed #16907 (again) -- Added deprecation of databrowse to the deprecation docs.
........
r16893 | PaulM | 2011-09-23 01:03:53 +0200 (Fr, 23 Sep 2011) | 2 lines

Fixed #16910 -- Misleading regex in urlpatterns inclusion docs.
........
r16894 | PaulM | 2011-09-23 01:30:05 +0200 (Fr, 23 Sep 2011) | 2 lines

Fixed a typo in test docstring.
........
r16895 | carljm | 2011-09-23 06:22:30 +0200 (Fr, 23 Sep 2011) | 1 line

Fixed #16917 -- Don't try to use the model name for a ContentType's unicode representation if the model no longer exists. Thanks Ivan Sagalaev for report and patch.
........
r16896 | jacob | 2011-09-23 18:33:52 +0200 (Fr, 23 Sep 2011) | 1 line

Test commit - please ignore.
........
r16897 | jezdez | 2011-09-23 18:45:40 +0200 (Fr, 23 Sep 2011) | 1 line

Fixed #16878 -- Improved intword filter to support numbers up to decillion and googol. Thanks to crodjer for the initial patch.
........
r16898 | ramiro | 2011-09-24 01:57:06 +0200 (Sa, 24 Sep 2011) | 5 lines

Removed unused code from admindocs app now that it supports reversing URLs.

As a consequence the undocumented `ADMIN_SITE_ROOT_URL` setting isn't used anymore.

Refs r8718 and r16857.
........
r16899 | julien | 2011-09-24 08:17:53 +0200 (Sa, 24 Sep 2011) | 1 line

Simplified the admin changelist multi-sort interface specifically by removing the popup window, adding explicit tooltip help texts, improving the hover visual states and allowing all operations (i.e. removing a column from sorting and toggling the sorting with and without changing the sorting priority) to be actionable with just one click. Many thanks to Idan Gazit for the feedback and direction. Refs #16212.
........
r16900 | jezdez | 2011-09-24 15:32:57 +0200 (Sa, 24 Sep 2011) | 1 line

Fixed a regression introduced in r16897. Thanks to Julien for the eagle eyes and Florian Apolloner for the review.
........
r16901 | ramiro | 2011-09-24 21:48:27 +0200 (Sa, 24 Sep 2011) | 4 lines

Fixed #16789 -- Added names to URLs in convenience contrib.auth urls.py.

Thanks wim AT go2people DOT nl for the report, cmheisel for the patch and
fcurella for reviewing it.
........
r16902 | julien | 2011-09-25 07:21:29 +0200 (So, 25 Sep 2011) | 1 line

Fixed #16927 -- Corrected the `{% ifchanged %}` template tag's documentation. Thanks to sebastian for the report and patch.
........
r16903 | ramiro | 2011-09-25 19:08:31 +0200 (So, 25 Sep 2011) | 3 lines

Fixed #16924 -- Corrected `date` template filter handling of negative (West of UTC) timezone offsets.

The 'O' format specifier output was incorrect. Thanks mrgriscom and Aymeric Augustin.
........
r16904 | ramiro | 2011-09-26 03:37:57 +0200 (Mo, 26 Sep 2011) | 3 lines

Fixed #16597 -- Added Sphinx cross-reference metadata to the form wizard docs. Thanks FunkyBob for the report and jkistler for the patch.

Also, additional fixes in that document and in the WizardView docstrings.
........
r16905 | Alex | 2011-09-26 12:11:18 +0200 (Mo, 26 Sep 2011) | 1 line

Fixed #16925 -- Make sure a signal is disconnected if the test fails. Thanks to aaugustin for the patch.
........
r16906 | ramiro | 2011-09-26 13:24:38 +0200 (Mo, 26 Sep 2011) | 1 line

Tweaked the formwizard docs a bit more.
........
r16907 | lukeplant | 2011-09-26 19:20:20 +0200 (Mo, 26 Sep 2011) | 1 line

Removed unused parameter 'join_table' in various bits of RelatedManager code
........
r16908 | julien | 2011-09-27 14:15:15 +0200 (Di, 27 Sep 2011) | 1 line

Fixed #13956 -- Enabled `*args` and `**kwargs` support for `simple_tag`, `inclusion_tag` and `assignment_tag`. Many thanks to Stephen Burrows for the report and initial patch, to Gregor Müllegger for the initial tests, to SamBull for the suggestions, and to Jannis Leidel for the review and PEP8 cleanup.
........
r16909 | julien | 2011-09-27 15:56:10 +0200 (Di, 27 Sep 2011) | 1 line

Brushed up the custom template tag 'howto' guide by moving the assignment_tag doc to a more appropriate place (i.e. under the "Setting a variable in the context" section), adding cross references, fixing a few minor inaccuracies and doing a little PEP8 cleanup.
........
r16910 | PaulM | 2011-09-28 04:26:12 +0200 (Mi, 28 Sep 2011) | 2 lines

Fixed incorrect pluralized argument in Files docs
........
r16911 | julien | 2011-09-28 16:00:43 +0200 (Mi, 28 Sep 2011) | 1 line

Fixed #16949 -- Fixed a small typo in the GIS tutorial and also made some minor PEP8 fixes and added some code-block directives while I was at it. Thanks to jgomo3 for the report.
........
r16912 | lukeplant | 2011-09-29 17:30:19 +0200 (Do, 29 Sep 2011) | 1 line

Small cleanups of 'related manager' code for consistency
........
r16913 | lukeplant | 2011-09-29 17:30:29 +0200 (Do, 29 Sep 2011) | 7 lines

Cleanups to related manager code, especially in use of closures.

The related manager classes are defined within functions, and the methods
had inconsistent and confusing usage of closures vs. parameters on self to
retrieve needed information. Everything is stored on self now.

Also some methods were not using super() where they should have been.
........
r16914 | lukeplant | 2011-09-29 17:30:37 +0200 (Do, 29 Sep 2011) | 3 lines

Made GenericRelatedObjectManager consistent with other related managers w.r.t. use of core_filters attribute.

Previously it had an unused keyword argument.
........
r16915 | jezdez | 2011-09-30 12:28:39 +0200 (Fr, 30 Sep 2011) | 1 line

Fixed doc references to `django.db.models.query.QuerySet` and converted some tabs that were introduced in r16699 to spaces.
........
r16916 | lukeplant | 2011-09-30 12:41:25 +0200 (Fr, 30 Sep 2011) | 4 lines

Fixed #14270 - related manager classes should be cached

Thanks to Alex Gaynor for the report and initial patch, and mrmachine for
more work on it.
........
r16917 | lukeplant | 2011-09-30 13:46:23 +0200 (Fr, 30 Sep 2011) | 8 lines

Fixed #16935 - misleading message if AttributeError escapes during SimpleTemplateResponse.render

Thanks to isagalaev for the report.

As discussed on django-devs, this reverts some of the changes in [16568]
i.e. the addition of `SimpleTemplateResponse.__getattr__`, because this
makes it much harder to debug the common case of an AttributeError somewhere
during the rendering of a SimpleTemplateResponse.
........
r16918 | ramiro | 2011-09-30 22:53:39 +0200 (Fr, 30 Sep 2011) | 6 lines

Fixed #8160 -- Made sure `modelformset_factory` takes in account `fields' and `exclude` ModelForm options.

Thanks Andrew McMurry for the report and Claude Paroz for creating these tests.

(Actually, this had been fixed in r10619 but the tests added then exercise the
code in the context of ModelAdmin. This commit adds more generic tests.)
........
r16919 | ikelly | 2011-09-30 23:40:56 +0200 (Fr, 30 Sep 2011) | 1 line

Fixed #16645: fixed a broken test to work in Oracle.
........
r16920 | lukeplant | 2011-10-01 17:43:01 +0200 (Sa, 01 Okt 2011) | 1 line

Attempted to sort new features in 1.4 release notes into related topics
........
r16921 | ramiro | 2011-10-02 04:53:58 +0200 (So, 02 Okt 2011) | 5 lines

Fixed #10841 -- Switched response served when DEBUG=True and request.is_ajax() returns True (indicating request has been generated by a JS library) to a plain text version for easier debugging.

Contents of this response are similar to its HTML counterpart modulo frame variables values in the Python traceback section.

Thanks to Riz for the report, to SmileyChris for the patch and to Julien for reviewing.
........
r16922 | julien | 2011-10-03 10:06:01 +0200 (Mo, 03 Okt 2011) | 1 line

Added some sphinx cross-reference links to the built-in template tags and filters in multiple areas of the documentation. Also fixed a few minor inconsistencies and did a little PEP8 cleanup while I was at it.
........
r16923 | aaugustin | 2011-10-04 07:57:51 +0200 (Di, 04 Okt 2011) | 3 lines

Added self to committers.
........
r16924 | aaugustin | 2011-10-04 22:11:41 +0200 (Di, 04 Okt 2011) | 2 lines

Fixed #16971 - Made the parsing of javascript files by 'makemessages' much faster. Thanks Antti Haapala for the implementation and Ned Batchelder for the patch.
........
r16925 | Alex | 2011-10-05 01:54:12 +0200 (Mi, 05 Okt 2011) | 1 line

Fixed #16985 -- corrected a few grammar errors in the docs.
........
r16926 | PaulM | 2011-10-05 07:21:47 +0200 (Mi, 05 Okt 2011) | 2 lines

Fixed #16987 -- Improved error message for session tests. Thanks jMyles and DiskSpace for the patch.
........
r16927 | lukeplant | 2011-10-05 11:54:01 +0200 (Mi, 05 Okt 2011) | 1 line

Very small docstring correction.
........
r16928 | julien | 2011-10-05 14:50:44 +0200 (Mi, 05 Okt 2011) | 1 line

Fixed #16990 -- Fixed a couple of small docstring typos in the `django/test/testcases.py` module and did some minor cleanup while I was in the area.
........
r16929 | lukeplant | 2011-10-06 00:56:09 +0200 (Do, 06 Okt 2011) | 5 lines

Fixed #16902 - select_related() results in a poor perfomance

Thanks to ivan_virabyan for the great patch!

(For the record, some very small tweaks were made by me).
........
r16930 | lukeplant | 2011-10-06 01:14:52 +0200 (Do, 06 Okt 2011) | 4 lines

Fixed #16937 - added `QuerySet.prefetch_related` to prefetch many related objects.

Many thanks to akaariai for lots of review and feedback, bug finding,
additional unit tests and performance testing.
........
r16931 | lukeplant | 2011-10-06 13:08:11 +0200 (Do, 06 Okt 2011) | 4 lines

Removed ForeignRelatedObjectsDescriptor.RelatedManager.delete_manager, which has been unused since [14507]

And cleaned up the result, allowing more consistency with the other related
descriptors.
........
r16932 | carljm | 2011-10-06 19:31:18 +0200 (Do, 06 Okt 2011) | 1 line

Fixed #16988 - Clean up the deprecation timeline for language consistency. Thanks ptone.
........
r16933 | aaugustin | 2011-10-06 22:39:15 +0200 (Do, 06 Okt 2011) | 3 lines

Fixed #16705 - Made the test client adhere to the WSGI spec -- in particular, removed the assumption that environ['QUERY_STRING'] exists.
........
r16934 | carljm | 2011-10-07 02:41:25 +0200 (Fr, 07 Okt 2011) | 1 line

Fixed #8060 - Added permissions-checking for admin inlines. Thanks p.patruno for report and Stephan Jaensch for work on the patch.
........
r16935 | aaugustin | 2011-10-07 10:35:20 +0200 (Fr, 07 Okt 2011) | 3 lines

Fixed #17012 - Removed references to the 'hasNoProfanities' validator. Refs #8794.
........
r16936 | aaugustin | 2011-10-07 17:33:55 +0200 (Fr, 07 Okt 2011) | 2 lines

Fixed typo in r16935. Refs #17012.
........
r16937 | carljm | 2011-10-07 17:45:52 +0200 (Fr, 07 Okt 2011) | 1 line

Fixed #14678 -- Added validation to catch flatpages with the same URL on the same site. Thanks seler for the report, and joni, graham_king, and j4nu5 for work on the patch.
........
r16938 | carljm | 2011-10-07 17:48:30 +0200 (Fr, 07 Okt 2011) | 1 line

Corrected backwards middleware-ordering note in flatpage documentation.
........
r16939 | lukeplant | 2011-10-07 18:05:53 +0200 (Fr, 07 Okt 2011) | 3 lines

Fixed #17003 - prefetch_related should support foreign keys/one-to-one

Support for `GenericForeignKey` is also included.
........
r16940 | lukeplant | 2011-10-07 18:06:02 +0200 (Fr, 07 Okt 2011) | 7 lines

Fixed #17014 - added protection against infinite recursion.

Thanks to akaariai for the report and tests.

No tests have been added, since unittests for termination are basically
impossible, and the failure condition will take down the developer's machine
in this case. It has been tested against the cases in #17014.
........
r16941 | aaugustin | 2011-10-07 18:52:58 +0200 (Fr, 07 Okt 2011) | 2 lines

Moved myself in the primary authors section.
........
r16942 | carljm | 2011-10-08 10:16:17 +0200 (Sa, 08 Okt 2011) | 1 line

Fixed #17011 - Made override_settings modify a decorated class in-place rather than creating a dynamic subclass, so as to avoid infinite recursion when used with super(). Thanks jsdalton for the report and patch.
........
r16943 | julien | 2011-10-08 13:36:05 +0200 (Sa, 08 Okt 2011) | 1 line

Made the tests introduced in r16942 use old-style class decoration to run with Python < 2.6.
........
r16944 | lukeplant | 2011-10-08 15:50:29 +0200 (Sa, 08 Okt 2011) | 4 lines

More efficient IN clauses for prefetch_related queries by use of sets to eliminate duplicates

This simply reduces the size of the IN clause in the SQL, which can be
significant in some cases.
........
r16945 | lukeplant | 2011-10-08 20:07:30 +0200 (Sa, 08 Okt 2011) | 1 line

Fixed some ReST errors in docs.
........
r16946 | carljm | 2011-10-08 21:23:37 +0200 (Sa, 08 Okt 2011) | 1 line

Fixed #16873 - Added dummy database backend in default settings, so that just importing django.db doesn't trigger ImproperlyConfigured if there is no DATABASES setting.
........
r16947 | julien | 2011-10-09 13:37:48 +0200 (So, 09 Okt 2011) | 1 line

Fixed #17019 -- Fixed a minor margin issue in multi-field admin form rows for right-to-left languages. Thanks to rem for the report and patch.
........

  • Participants
  • Parent commits 0f2d7eb
  • Branches features/py3k

Comments (0)

Files changed (385)

     * Idan Gazit
     * Paul McMillan
     * Julien Phalip
+    * Aymeric Augustin
 
 More information on the main contributors to Django can be found in
 docs/internals/committers.txt.
     atlithorn <atlithorn@gmail.com>
     Jökull Sólberg Auðunsson <jokullsolberg@gmail.com>
     Arthur <avandorp@gmail.com>
-    Aymeric Augustin <aymeric.augustin@m4x.org>
     av0000@mail.ru
     David Avsajanishvili <avsd05@gmail.com>
     Mike Axiak <axiak@mit.edu>
     Janos Guljas
     Thomas Güttler <hv@tbz-pariv.de>
     Horst Gutmann <zerok@zerokspot.com>
+    Antti Haapala <antti@industrialwebandmagic.com>
     Scot Hacker <shacker@birdhouse.org>
     dAniel hAhler
     hambaloney
     Jay Parlar <parlar@gmail.com>
     Claude Paroz <claude@2xlibre.net>
     Carlos Eduardo de Paula <carlosedp@gmail.com>
+    John Paulett <john@paulett.org>
     pavithran s <pavithran.s@gmail.com>
     Barry Pederson <bp@barryp.org>
     Andreas Pelme <andreas@pelme.se>
 
     * Follow the instructions in the "Unit tests" section of
       docs/internals/contributing/writing-code/unit-tests.txt, published online at
-      http://docs.djangoproject.com/en/dev/internals/contributing/#running-the-unit-tests
-
-
+      https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/#running-the-unit-tests

File django/conf/__init__.py

         while filter_name in filters:
             filter_name = filter_name + "_"
 
-        def _callback(record):
-            from django.conf import settings
-            return not settings.DEBUG
-
         filters[filter_name] = {
-            "()": "django.utils.log.CallbackFilter",
-            "callback": _callback
-            }
+            "()": "django.utils.log.RequireDebugFalse",
+        }
 
         logging_config["handlers"]["mail_admins"]["filters"] = [filter_name]

File django/conf/global_settings.py

 
 # Database connection info.
 DATABASES = {
+    'default': {
+        'ENGINE': 'django.db.backends.dummy',
+    },
 }
 
 # Classes used to implement db routing behaviour
 # Default X-Frame-Options header value
 X_FRAME_OPTIONS = 'SAMEORIGIN'
 
+USE_X_FORWARDED_HOST = False
+
 ##############
 # MIDDLEWARE #
 ##############
 
 COMMENTS_ALLOW_PROFANITIES = False
 
-# The profanities that will trigger a validation error in the
-# 'hasNoProfanities' validator. All of these should be in lowercase.
+# The profanities that will trigger a validation error in
+# CommentDetailsForm.clean_comment. All of these should be in lowercase.
 PROFANITIES_LIST = ()
 
 ##################
 # The default logging configuration. This sends an email to
 # the site admins on every HTTP 500 error. All other log
 # records are sent to the bit bucket.
+
 LOGGING = {
     'version': 1,
     'disable_existing_loggers': False,
     'filters': {
         'require_debug_false': {
-            '()': 'django.utils.log.CallbackFilter',
-            'callback': lambda r: not DEBUG
+            '()': 'django.utils.log.RequireDebugFalse',
         }
     },
     'handlers': {

File django/conf/project_template/settings.py

     'disable_existing_loggers': False,
     'filters': {
         'require_debug_false': {
-            '()': 'django.utils.log.CallbackFilter',
-            'callback': lambda r: not DEBUG
+            '()': 'django.utils.log.RequireDebugFalse'
         }
     },
     'handlers': {

File django/conf/project_template/urls.py

-from django.conf.urls.defaults import patterns, include, url
+from django.conf.urls import patterns, include, url
 
 # Uncomment the next two lines to enable the admin:
 # from django.contrib import admin

File django/conf/urls/__init__.py

+from django.core.urlresolvers import (RegexURLPattern,
+    RegexURLResolver, LocaleRegexURLResolver)
+from django.core.exceptions import ImproperlyConfigured
+from django.utils.importlib import import_module
+
+
+__all__ = ['handler403', 'handler404', 'handler500', 'include', 'patterns', 'url']
+
+handler403 = 'django.views.defaults.permission_denied'
+handler404 = 'django.views.defaults.page_not_found'
+handler500 = 'django.views.defaults.server_error'
+
+def include(arg, namespace=None, app_name=None):
+    if isinstance(arg, tuple):
+        # callable returning a namespace hint
+        if namespace:
+            raise ImproperlyConfigured('Cannot override the namespace for a dynamic module that provides a namespace')
+        urlconf_module, app_name, namespace = arg
+    else:
+        # No namespace hint - use manually provided namespace
+        urlconf_module = arg
+
+    if isinstance(urlconf_module, basestring):
+        urlconf_module = import_module(urlconf_module)
+    patterns = getattr(urlconf_module, 'urlpatterns', urlconf_module)
+
+    # Make sure we can iterate through the patterns (without this, some
+    # testcases will break).
+    if isinstance(patterns, (list, tuple)):
+        for url_pattern in patterns:
+            # Test if the LocaleRegexURLResolver is used within the include;
+            # this should throw an error since this is not allowed!
+            if isinstance(url_pattern, LocaleRegexURLResolver):
+                raise ImproperlyConfigured(
+                    'Using i18n_patterns in an included URLconf is not allowed.')
+
+    return (urlconf_module, app_name, namespace)
+
+def patterns(prefix, *args):
+    pattern_list = []
+    for t in args:
+        if isinstance(t, (list, tuple)):
+            t = url(prefix=prefix, *t)
+        elif isinstance(t, RegexURLPattern):
+            t.add_prefix(prefix)
+        pattern_list.append(t)
+    return pattern_list
+
+def url(regex, view, kwargs=None, name=None, prefix=''):
+    if isinstance(view, (list,tuple)):
+        # For include(...) processing.
+        urlconf_module, app_name, namespace = view
+        return RegexURLResolver(regex, urlconf_module, kwargs, app_name=app_name, namespace=namespace)
+    else:
+        if isinstance(view, basestring):
+            if not view:
+                raise ImproperlyConfigured('Empty URL pattern view name not permitted (for pattern %r)' % regex)
+            if prefix:
+                view = prefix + '.' + view
+        return RegexURLPattern(regex, view, kwargs, name)
+

File django/conf/urls/defaults.py

-from django.core.urlresolvers import (RegexURLPattern,
-    RegexURLResolver, LocaleRegexURLResolver)
-from django.core.exceptions import ImproperlyConfigured
-from django.utils.importlib import import_module
+import warnings
+warnings.warn("django.conf.urls.defaults is deprecated; use django.conf.urls instead",
+              PendingDeprecationWarning)
 
-
-__all__ = ['handler404', 'handler500', 'include', 'patterns', 'url']
-
-handler403 = 'django.views.defaults.permission_denied'
-handler404 = 'django.views.defaults.page_not_found'
-handler500 = 'django.views.defaults.server_error'
-
-def include(arg, namespace=None, app_name=None):
-    if isinstance(arg, tuple):
-        # callable returning a namespace hint
-        if namespace:
-            raise ImproperlyConfigured('Cannot override the namespace for a dynamic module that provides a namespace')
-        urlconf_module, app_name, namespace = arg
-    else:
-        # No namespace hint - use manually provided namespace
-        urlconf_module = arg
-
-    if isinstance(urlconf_module, basestring):
-        urlconf_module = import_module(urlconf_module)
-    patterns = getattr(urlconf_module, 'urlpatterns', urlconf_module)
-
-    # Make sure we can iterate through the patterns (without this, some
-    # testcases will break).
-    if isinstance(patterns, (list, tuple)):
-        for url_pattern in patterns:
-            # Test if the LocaleRegexURLResolver is used within the include;
-            # this should throw an error since this is not allowed!
-            if isinstance(url_pattern, LocaleRegexURLResolver):
-                raise ImproperlyConfigured(
-                    'Using i18n_patterns in an included URLconf is not allowed.')
-
-    return (urlconf_module, app_name, namespace)
-
-def patterns(prefix, *args):
-    pattern_list = []
-    for t in args:
-        if isinstance(t, (list, tuple)):
-            t = url(prefix=prefix, *t)
-        elif isinstance(t, RegexURLPattern):
-            t.add_prefix(prefix)
-        pattern_list.append(t)
-    return pattern_list
-
-def url(regex, view, kwargs=None, name=None, prefix=''):
-    if isinstance(view, (list,tuple)):
-        # For include(...) processing.
-        urlconf_module, app_name, namespace = view
-        return RegexURLResolver(regex, urlconf_module, kwargs, app_name=app_name, namespace=namespace)
-    else:
-        if isinstance(view, basestring):
-            if not view:
-                raise ImproperlyConfigured('Empty URL pattern view name not permitted (for pattern %r)' % regex)
-            if prefix:
-                view = prefix + '.' + view
-        return RegexURLPattern(regex, view, kwargs, name)
-
+from django.conf.urls import (handler403, handler404, handler500,
+        include, patterns, url)

File django/conf/urls/i18n.py

 from django.conf import settings
-from django.conf.urls.defaults import patterns
+from django.conf.urls import patterns
 from django.core.urlresolvers import LocaleRegexURLResolver
 
 def i18n_patterns(prefix, *args):

File django/conf/urls/shortcut.py

-from django.conf.urls.defaults import *
+from django.conf.urls import patterns
 
 urlpatterns = patterns('django.views',
     (r'^(?P<content_type_id>\d+)/(?P<object_id>.*)/$', 'defaults.shortcut'),

File django/conf/urls/static.py

 import re
 from django.conf import settings
-from django.conf.urls.defaults import patterns, url
+from django.conf.urls import patterns, url
 from django.core.exceptions import ImproperlyConfigured
 
 def static(prefix, view='django.views.static.serve', **kwargs):

File django/contrib/admin/forms.py

 
 from django.utils.translation import ugettext_lazy, ugettext as _
 
-ERROR_MESSAGE = ugettext_lazy("Please enter a correct username and password. "
-                              "Note that both fields are case-sensitive.")
+ERROR_MESSAGE = ugettext_lazy("Please enter the correct username and password "
+        "for a staff account. Note that both fields are case-sensitive.")
 
 class AdminAuthenticationForm(AuthenticationForm):
     """

File django/contrib/admin/options.py

 from django.views.decorators.csrf import csrf_protect
 from django.core.exceptions import PermissionDenied, ValidationError
 from django.core.paginator import Paginator
+from django.core.urlresolvers import reverse
 from django.db import models, transaction, router
 from django.db.models.related import RelatedObject
 from django.db.models.fields import BLANK_CHOICE_DASH, FieldDoesNotExist
             clean_lookup = LOOKUP_SEP.join(parts)
             return clean_lookup in self.list_filter or clean_lookup == self.date_hierarchy
 
+    def has_add_permission(self, request):
+        """
+        Returns True if the given request has permission to add an object.
+        Can be overriden by the user in subclasses.
+        """
+        opts = self.opts
+        return request.user.has_perm(opts.app_label + '.' + opts.get_add_permission())
+
+    def has_change_permission(self, request, obj=None):
+        """
+        Returns True if the given request has permission to change the given
+        Django model instance, the default implementation doesn't examine the
+        `obj` parameter.
+
+        Can be overriden by the user in subclasses. In such case it should
+        return True if the given request has permission to change the `obj`
+        model instance. If `obj` is None, this should return True if the given
+        request has permission to change *any* object of the given type.
+        """
+        opts = self.opts
+        return request.user.has_perm(opts.app_label + '.' + opts.get_change_permission())
+
+    def has_delete_permission(self, request, obj=None):
+        """
+        Returns True if the given request has permission to change the given
+        Django model instance, the default implementation doesn't examine the
+        `obj` parameter.
+
+        Can be overriden by the user in subclasses. In such case it should
+        return True if the given request has permission to delete the `obj`
+        model instance. If `obj` is None, this should return True if the given
+        request has permission to delete *any* object of the given type.
+        """
+        opts = self.opts
+        return request.user.has_perm(opts.app_label + '.' + opts.get_delete_permission())
 
 class ModelAdmin(BaseModelAdmin):
     "Encapsulates all admin options and functionality for a given model."
         self.model = model
         self.opts = model._meta
         self.admin_site = admin_site
-        self.inline_instances = []
-        for inline_class in self.inlines:
-            inline_instance = inline_class(self.model, self.admin_site)
-            self.inline_instances.append(inline_instance)
         if 'action_checkbox' not in self.list_display and self.actions is not None:
             self.list_display = ['action_checkbox'] +  list(self.list_display)
         if not self.list_display_links:
                     break
         super(ModelAdmin, self).__init__()
 
+    def get_inline_instances(self, request):
+        inline_instances = []
+        for inline_class in self.inlines:
+            inline = inline_class(self.model, self.admin_site)
+            if request:
+                if not (inline.has_add_permission(request) or
+                        inline.has_change_permission(request) or
+                        inline.has_delete_permission(request)):
+                    continue
+                if not inline.has_add_permission(request):
+                    inline.max_num = 0
+            inline_instances.append(inline)
+
+        return inline_instances
+
     def get_urls(self):
-        from django.conf.urls.defaults import patterns, url
+        from django.conf.urls import patterns, url
 
         def wrap(view):
             def wrapper(*args, **kwargs):
             js.extend(['getElementsBySelector.js', 'dom-drag.js' , 'admin/ordering.js'])
         return forms.Media(js=[static('admin/js/%s' % url) for url in js])
 
-    def has_add_permission(self, request):
-        """
-        Returns True if the given request has permission to add an object.
-        Can be overriden by the user in subclasses.
-        """
-        opts = self.opts
-        return request.user.has_perm(opts.app_label + '.' + opts.get_add_permission())
-
-    def has_change_permission(self, request, obj=None):
-        """
-        Returns True if the given request has permission to change the given
-        Django model instance, the default implementation doesn't examine the
-        `obj` parameter.
-
-        Can be overriden by the user in subclasses. In such case it should
-        return True if the given request has permission to change the `obj`
-        model instance. If `obj` is None, this should return True if the given
-        request has permission to change *any* object of the given type.
-        """
-        opts = self.opts
-        return request.user.has_perm(opts.app_label + '.' + opts.get_change_permission())
-
-    def has_delete_permission(self, request, obj=None):
-        """
-        Returns True if the given request has permission to change the given
-        Django model instance, the default implementation doesn't examine the
-        `obj` parameter.
-
-        Can be overriden by the user in subclasses. In such case it should
-        return True if the given request has permission to delete the `obj`
-        model instance. If `obj` is None, this should return True if the given
-        request has permission to delete *any* object of the given type.
-        """
-        opts = self.opts
-        return request.user.has_perm(opts.app_label + '.' + opts.get_delete_permission())
-
     def get_model_perms(self, request):
         """
         Returns a dict of all perms for this model. This dict has the keys
             fields=self.list_editable, **defaults)
 
     def get_formsets(self, request, obj=None):
-        for inline in self.inline_instances:
+        for inline in self.get_inline_instances(request):
             yield inline.get_formset(request, obj)
 
     def get_paginator(self, request, queryset, per_page, orphans=0, allow_empty_first_page=True):
             # redirect to the change-list page for this object. Otherwise,
             # redirect to the admin index.
             if self.has_change_permission(request, None):
-                post_url = '../'
+                post_url = reverse('admin:%s_%s_changelist' %
+                                   (opts.app_label, opts.module_name),
+                                   current_app=self.admin_site.name)
             else:
-                post_url = '../../../'
+                post_url = reverse('admin:index',
+                                   current_app=self.admin_site.name)
             return HttpResponseRedirect(post_url)
 
     def response_change(self, request, obj):
         """
         opts = obj._meta
 
-        # Handle proxy models automatically created by .only() or .defer()
+        # Handle proxy models automatically created by .only() or .defer().
+        # Refs #14529
         verbose_name = opts.verbose_name
+        module_name = opts.module_name
         if obj._deferred:
             opts_ = opts.proxy_for_model._meta
             verbose_name = opts_.verbose_name
+            module_name = opts_.module_name
 
         pk_value = obj._get_pk_val()
 
         elif "_saveasnew" in request.POST:
             msg = _('The %(name)s "%(obj)s" was added successfully. You may edit it again below.') % {'name': force_unicode(verbose_name), 'obj': obj}
             self.message_user(request, msg)
-            return HttpResponseRedirect("../%s/" % pk_value)
+            return HttpResponseRedirect(reverse('admin:%s_%s_change' %
+                                        (opts.app_label, module_name),
+                                        args=(pk_value,),
+                                        current_app=self.admin_site.name))
         elif "_addanother" in request.POST:
             self.message_user(request, msg + ' ' + (_("You may add another %s below.") % force_unicode(verbose_name)))
-            return HttpResponseRedirect("../add/")
+            return HttpResponseRedirect(reverse('admin:%s_%s_add' %
+                                        (opts.app_label, module_name),
+                                        current_app=self.admin_site.name))
         else:
             self.message_user(request, msg)
             # Figure out where to redirect. If the user has change permission,
             # redirect to the change-list page for this object. Otherwise,
             # redirect to the admin index.
             if self.has_change_permission(request, None):
-                return HttpResponseRedirect('../')
+                post_url = reverse('admin:%s_%s_changelist' %
+                                   (opts.app_label, module_name),
+                                   current_app=self.admin_site.name)
             else:
-                return HttpResponseRedirect('../../../')
+                post_url = reverse('admin:index',
+                                   current_app=self.admin_site.name)
+            return HttpResponseRedirect(post_url)
 
     def response_action(self, request, queryset):
         """
 
         ModelForm = self.get_form(request)
         formsets = []
+        inline_instances = self.get_inline_instances(request)
         if request.method == 'POST':
             form = ModelForm(request.POST, request.FILES)
             if form.is_valid():
                 form_validated = False
                 new_object = self.model()
             prefixes = {}
-            for FormSet, inline in zip(self.get_formsets(request), self.inline_instances):
+            for FormSet, inline in zip(self.get_formsets(request), inline_instances):
                 prefix = FormSet.get_default_prefix()
                 prefixes[prefix] = prefixes.get(prefix, 0) + 1
-                if prefixes[prefix] != 1:
+                if prefixes[prefix] != 1 or not prefix:
                     prefix = "%s-%s" % (prefix, prefixes[prefix])
                 formset = FormSet(data=request.POST, files=request.FILES,
                                   instance=new_object,
                     initial[k] = initial[k].split(",")
             form = ModelForm(initial=initial)
             prefixes = {}
-            for FormSet, inline in zip(self.get_formsets(request),
-                                       self.inline_instances):
+            for FormSet, inline in zip(self.get_formsets(request), inline_instances):
                 prefix = FormSet.get_default_prefix()
                 prefixes[prefix] = prefixes.get(prefix, 0) + 1
-                if prefixes[prefix] != 1:
+                if prefixes[prefix] != 1 or not prefix:
                     prefix = "%s-%s" % (prefix, prefixes[prefix])
                 formset = FormSet(instance=self.model(), prefix=prefix,
                                   queryset=inline.queryset(request))
         media = self.media + adminForm.media
 
         inline_admin_formsets = []
-        for inline, formset in zip(self.inline_instances, formsets):
+        for inline, formset in zip(inline_instances, formsets):
             fieldsets = list(inline.get_fieldsets(request))
             readonly = list(inline.get_readonly_fields(request))
             prepopulated = dict(inline.get_prepopulated_fields(request))
             raise Http404(_('%(name)s object with primary key %(key)r does not exist.') % {'name': force_unicode(opts.verbose_name), 'key': escape(object_id)})
 
         if request.method == 'POST' and "_saveasnew" in request.POST:
-            return self.add_view(request, form_url='../add/')
+            return self.add_view(request, form_url=reverse('admin:%s_%s_add' %
+                                    (opts.app_label, opts.module_name),
+                                    current_app=self.admin_site.name))
 
         ModelForm = self.get_form(request, obj)
         formsets = []
+        inline_instances = self.get_inline_instances(request)
         if request.method == 'POST':
             form = ModelForm(request.POST, request.FILES, instance=obj)
             if form.is_valid():
                 form_validated = False
                 new_object = obj
             prefixes = {}
-            for FormSet, inline in zip(self.get_formsets(request, new_object),
-                                       self.inline_instances):
+            for FormSet, inline in zip(self.get_formsets(request, new_object), inline_instances):
                 prefix = FormSet.get_default_prefix()
                 prefixes[prefix] = prefixes.get(prefix, 0) + 1
-                if prefixes[prefix] != 1:
+                if prefixes[prefix] != 1 or not prefix:
                     prefix = "%s-%s" % (prefix, prefixes[prefix])
                 formset = FormSet(request.POST, request.FILES,
                                   instance=new_object, prefix=prefix,
         else:
             form = ModelForm(instance=obj)
             prefixes = {}
-            for FormSet, inline in zip(self.get_formsets(request, obj), self.inline_instances):
+            for FormSet, inline in zip(self.get_formsets(request, obj), inline_instances):
                 prefix = FormSet.get_default_prefix()
                 prefixes[prefix] = prefixes.get(prefix, 0) + 1
-                if prefixes[prefix] != 1:
+                if prefixes[prefix] != 1 or not prefix:
                     prefix = "%s-%s" % (prefix, prefixes[prefix])
                 formset = FormSet(instance=obj, prefix=prefix,
                                   queryset=inline.queryset(request))
         media = self.media + adminForm.media
 
         inline_admin_formsets = []
-        for inline, formset in zip(self.inline_instances, formsets):
+        for inline, formset in zip(inline_instances, formsets):
             fieldsets = list(inline.get_fieldsets(request, obj))
             readonly = list(inline.get_readonly_fields(request, obj))
             prepopulated = dict(inline.get_prepopulated_fields(request, obj))
             self.message_user(request, _('The %(name)s "%(obj)s" was deleted successfully.') % {'name': force_unicode(opts.verbose_name), 'obj': force_unicode(obj_display)})
 
             if not self.has_change_permission(request, None):
-                return HttpResponseRedirect("../../../../")
-            return HttpResponseRedirect("../../")
+                return HttpResponseRedirect(reverse('admin:index',
+                                                    current_app=self.admin_site.name))
+            return HttpResponseRedirect(reverse('admin:%s_%s_changelist' %
+                                        (opts.app_label, opts.module_name),
+                                        current_app=self.admin_site.name))
 
         object_name = force_unicode(opts.verbose_name)
 
             'module_name': capfirst(force_unicode(opts.verbose_name_plural)),
             'object': obj,
             'app_label': app_label,
+            'opts': opts,
         }
         context.update(extra_context or {})
         return TemplateResponse(request, self.object_history_template or [
         # if exclude is an empty list we use None, since that's the actual
         # default
         exclude = exclude or None
+        can_delete = self.can_delete and self.has_delete_permission(request, obj)
         defaults = {
             "form": self.form,
             "formset": self.formset,
             "formfield_callback": partial(self.formfield_for_dbfield, request=request),
             "extra": self.extra,
             "max_num": self.max_num,
-            "can_delete": self.can_delete,
+            "can_delete": can_delete,
         }
         defaults.update(kwargs)
         return inlineformset_factory(self.parent_model, self.model, **defaults)
         fields = form.base_fields.keys() + list(self.get_readonly_fields(request, obj))
         return [(None, {'fields': fields})]
 
+    def queryset(self, request):
+        queryset = super(InlineModelAdmin, self).queryset(request)
+        if not self.has_change_permission(request):
+            queryset = queryset.none()
+        return queryset
+
+    def has_add_permission(self, request):
+        if self.opts.auto_created:
+            # We're checking the rights to an auto-created intermediate model,
+            # which doesn't have its own individual permissions. The user needs
+            # to have the change permission for the related model in order to
+            # be able to do anything with the intermediate model.
+            return self.has_change_permission(request)
+        return request.user.has_perm(
+            self.opts.app_label + '.' + self.opts.get_add_permission())
+
+    def has_change_permission(self, request, obj=None):
+        opts = self.opts
+        if opts.auto_created:
+            # The model was auto-created as intermediary for a
+            # ManyToMany-relationship, find the target model
+            for field in opts.fields:
+                if field.rel and field.rel.to != self.parent_model:
+                    opts = field.rel.to._meta
+                    break
+        return request.user.has_perm(
+            opts.app_label + '.' + opts.get_change_permission())
+
+    def has_delete_permission(self, request, obj=None):
+        if self.opts.auto_created:
+            # We're checking the rights to an auto-created intermediate model,
+            # which doesn't have its own individual permissions. The user needs
+            # to have the change permission for the related model in order to
+            # be able to do anything with the intermediate model.
+            return self.has_change_permission(request, obj)
+        return request.user.has_perm(
+            self.opts.app_label + '.' + self.opts.get_delete_permission())
+
 class StackedInline(InlineModelAdmin):
     template = 'admin/edit_inline/stacked.html'
 

File django/contrib/admin/sites.py

             class MyAdminSite(AdminSite):
 
                 def get_urls(self):
-                    from django.conf.urls.defaults import patterns, url
+                    from django.conf.urls import patterns, url
 
                     urls = super(MyAdminSite, self).get_urls()
                     urls += patterns('',
         return update_wrapper(inner, view)
 
     def get_urls(self):
-        from django.conf.urls.defaults import patterns, url, include
+        from django.conf.urls import patterns, url, include
 
         if settings.DEBUG:
             self.check_dependencies()
                 # Check whether user has any perm for this module.
                 # If so, add the module to the model_list.
                 if True in perms.values():
+                    info = (app_label, model._meta.module_name)
                     model_dict = {
                         'name': capfirst(model._meta.verbose_name_plural),
-                        'admin_url': mark_safe('%s/%s/' % (app_label, model.__name__.lower())),
+                        'admin_url': reverse('admin:%s_%s_changelist' % info, current_app=self.name),
+                        'add_url': reverse('admin:%s_%s_add' % info, current_app=self.name),
                         'perms': perms,
                     }
                     if app_label in app_dict:
                     else:
                         app_dict[app_label] = {
                             'name': app_label.title(),
-                            'app_url': app_label + '/',
+                            'app_url': reverse('admin:app_list', kwargs={'app_label': app_label}, current_app=self.name),
                             'has_module_perms': has_module_perms,
                             'models': [model_dict],
                         }
                     # Check whether user has any perm for this module.
                     # If so, add the module to the model_list.
                     if True in perms.values():
+                        info = (app_label, model._meta.module_name)
                         model_dict = {
                             'name': capfirst(model._meta.verbose_name_plural),
-                            'admin_url': '%s/' % model.__name__.lower(),
+                            'admin_url': reverse('admin:%s_%s_changelist' % info, current_app=self.name),
+                            'add_url': reverse('admin:%s_%s_add' % info, current_app=self.name),
                             'perms': perms,
                         }
                         if app_dict:

File django/contrib/admin/static/admin/css/base.css

 
 /* SORTABLE TABLES */
 
+thead th {
+    padding: 0;
+    line-height: normal;
+}
+
 thead th a:link, thead th a:visited {
     color: #666;
-    display: block;
 }
 
 thead th.sorted {
     background: #c5c5c5 url(../img/nav-bg-selected.gif) top left repeat-x;
 }
 
-table thead th.sorted a {
-    padding-right: 13px;
+table thead th .text span {
+    padding: 2px 5px;
+    display:block;
 }
 
-table thead th.ascending a {
-    background: url(../img/arrow-up.gif) right .4em no-repeat;
+table thead th .text a {
+    display: block;
+    cursor: pointer;
+    padding: 2px 5px;
 }
 
-table thead th.descending a {
-    background: url(../img/arrow-down.gif) right .4em no-repeat;
+table thead th.sortable:hover {
+    background: white url(../img/nav-bg-reverse.gif) 0 -5px repeat-x;
 }
 
-table thead th.sorted a span.text {
-   display: block;
-   float: left;
-   cursor: pointer; /* IE needs this */
+thead th.sorted a.sortremove {
+    visibility: hidden;
 }
 
-table thead th.sorted a span.sortpos {
-   display: block;
-   float: right;
-   font-size: .6em;
-   text-align: right;
-   cursor: pointer; /* IE needs this */
+table thead th.sorted:hover a.sortremove {
+    visibility: visible;
 }
 
-table thead th.sorted a img {
-   vertical-align: top;
+table thead th.sorted .sortoptions {
+    display: block;
+    padding: 4px 5px 0 5px;
+    float: right;
+    text-align: right;
 }
 
-table thead th.sorted a span.clear {
-   display: block;
-   clear: both;
+table thead th.sorted .sortpriority {
+    font-size: .8em;
+    min-width: 12px;
+    text-align: center;
+    vertical-align: top;
 }
 
-#sorting-popup-div {
-    display: none;
-    position: absolute;
-    background-color: white;
-    border: 1px solid #ddd;
-    z-index: 2000; /* more than filters on right */
+table thead th.sorted .sortoptions a {
+    width: 14px;
+    height: 12px;
+    display: inline-block;
 }
 
-#sorting-popup-div table {
-    border-right: 0px;
-    border-left: 0px;
+table thead th.sorted .sortoptions a.sortremove {
+    background: url(../img/sorting-icons.gif) -4px -5px no-repeat;
 }
 
-#sorting-popup-div .reset {
-    text-align: center;
+table thead th.sorted .sortoptions a.sortremove:hover {
+    background: url(../img/sorting-icons.gif) -4px -27px no-repeat;
 }
 
-#sorting-popup-div .cancel {
-    font-size: 10px;
-    background: #e1e1e1 url(../img/nav-bg.gif) 0 50% repeat-x;
-    border-top: 1px solid #ddd;
-    text-align: center;
+table thead th.sorted .sortoptions a.ascending {
+    background: url(../img/sorting-icons.gif) -5px -50px no-repeat;
 }
 
-#sorting-popup-div .cancel a {
-    width: 100%;
-    display: block;
+table thead th.sorted .sortoptions a.ascending:hover {
+    background: url(../img/sorting-icons.gif) -5px -72px no-repeat;
+}
+
+table thead th.sorted .sortoptions a.descending {
+    background: url(../img/sorting-icons.gif) -5px -94px no-repeat;
+}
+
+table thead th.sorted .sortoptions a.descending:hover {
+    background: url(../img/sorting-icons.gif) -5px -115px no-repeat;
 }
 
 /* ORDERABLE TABLES */

File django/contrib/admin/static/admin/css/changelists.css

 }
 
 .change-list ul.toplinks li {
-    float: left;
-    width: 9em;
     padding: 3px 6px;
     font-weight: bold;
     list-style-type: none;
+    display: inline-block;
 }
 
 .change-list ul.toplinks .date-back a {

File django/contrib/admin/static/admin/css/forms.css

 .empty-form {
     display: none;
 }
-
-/* IE7 specific bug fixes */
-
-.submit-row input {
-    float: right;
-}

File django/contrib/admin/static/admin/css/ie.css

 
 .inline-deletelink {
     background: transparent url(../img/inline-delete-8bit.png) no-repeat;
+}
+
+/* IE7 doesn't support inline-block */
+.change-list ul.toplinks li {
+    zoom: 1;
+    *display: inline;
 }

File django/contrib/admin/static/admin/css/rtl.css

 
 /* SORTABLE TABLES */
 
-
-table thead th.sorted a {
-    padding-left: 13px;
-    padding-right: 0px;
-}
-
-table thead th.ascending a,
-table thead th.descending a {
-    background-position: left;
-}
-
-table thead th.sorted a span.text {
-   float: right;
-}
-
-table thead th.sorted a span.sortpos {
+table thead th.sorted .sortoptions {
    float: left;
 }
 
 
 /* changelists styles */
 
-.change-list ul.toplinks li {
-    float: right;
-}
-
 .change-list .filtered {
     background: white url(../img/changelist-bg_rtl.gif) top left repeat-y !important;
 }
 fieldset .field-box {
     float: right;
     margin-left: 20px;
+    margin-right: 0;
 }
 
 .errorlist li {

File django/contrib/admin/static/admin/css/widgets.css

     padding: 0;
     border-collapse: collapse;
     background: white;
-    width: 99%;
+    width: 100%;
 }
 
 .calendar caption, .calendarbox h2 {

File django/contrib/admin/static/admin/img/arrow-down.gif

Removed
Old image

File django/contrib/admin/static/admin/img/arrow-up.gif

Removed
Old image

File django/contrib/admin/static/admin/img/icon_cog.gif

Removed
Old image

File django/contrib/admin/static/admin/img/sorting-icons.gif

Added
New image

File django/contrib/admin/templates/admin/500.html

 {% extends "admin/base_site.html" %}
 {% load i18n %}
+{% load url from future %}
 
-{% block breadcrumbs %}<div class="breadcrumbs"><a href="/">{% trans "Home" %}</a> &rsaquo; {% trans "Server error" %}</div>{% endblock %}
+{% block breadcrumbs %}
+<div class="breadcrumbs">
+<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
+&rsaquo; {% trans 'Server error' %}
+</div>
+{% endblock %}
 
 {% block title %}{% trans 'Server error (500)' %}{% endblock %}
 

File django/contrib/admin/templates/admin/app_index.html

-{% extends "admin/index.html" %} 
-{% load i18n %} 
+{% extends "admin/index.html" %}
+{% load i18n %}
+{% load url from future %}
 
 {% if not is_popup %}
-
 {% block breadcrumbs %}
-<div class="breadcrumbs"><a href="../">
-{% trans "Home" %}</a> &rsaquo; 
+<div class="breadcrumbs">
+<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
+&rsaquo;
 {% for app in app_list %}
 {% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}
-{% endfor %}</div>{% endblock %}
+{% endfor %}
+</div>
+{% endblock %}
+{% endif %}
 
-{% endif %} 
-
-{% block sidebar %}{% endblock %}
+{% block sidebar %}{% endblock %}

File django/contrib/admin/templates/admin/auth/user/change_password.html

 {% extends "admin/base_site.html" %}
 {% load i18n admin_static admin_modify %}
 {% load url from future %}
+{% load admin_urls %}
+
 {% block extrahead %}{{ block.super }}
 {% url 'admin:jsi18n' as jsi18nurl %}
 <script type="text/javascript" src="{{ jsi18nurl|default:"../../../../jsi18n/" }}"></script>
 {% endblock %}
 {% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}" />{% endblock %}
 {% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} change-form{% endblock %}
-{% block breadcrumbs %}{% if not is_popup %}
+{% if not is_popup %}
+{% block breadcrumbs %}
 <div class="breadcrumbs">
-     <a href="../../../../">{% trans "Home" %}</a> &rsaquo;
-     <a href="../../../">{{ opts.app_label|capfirst|escape }}</a> &rsaquo;
-     <a href="../../">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
-     <a href="../">{{ original|truncatewords:"18" }}</a> &rsaquo;
-     {% trans 'Change password' %}
+<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
+&rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_label|capfirst|escape }}</a>
+&rsaquo; <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
+&rsaquo; <a href="{% url opts|admin_urlname:'changelist' %}{{ original.pk }}">{{ original|truncatewords:"18" }}</a>
+&rsaquo; {% trans 'Change password' %}
 </div>
-{% endif %}{% endblock %}
+{% endblock %}
+{% endif %}
 {% block content %}<div id="content-main">
 <form action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
 <div>

File django/contrib/admin/templates/admin/base.html

                 {% if docsroot %}
                     <a href="{{ docsroot }}">{% trans 'Documentation' %}</a> /
                 {% endif %}
-                <a href="{% url 'admin:password_change' %}">
-                {% trans 'Change password' %}</a> /
-                <a href="{% url 'admin:logout' %}">
-                {% trans 'Log out' %}</a>
+                <a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a> /
+                <a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
             {% endblock %}
         </div>
         {% endif %}
         {% block nav-global %}{% endblock %}
     </div>
     <!-- END Header -->
-    {% block breadcrumbs %}<div class="breadcrumbs"><a href="/">{% trans 'Home' %}</a>{% if title %} &rsaquo; {{ title }}{% endif %}</div>{% endblock %}
+    {% block breadcrumbs %}
+    <div class="breadcrumbs">
+    <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
+    {% if title %} &rsaquo; {{ title }}{% endif %}
+    </div>
+    {% endblock %}
     {% endif %}
 
     {% block messages %}

File django/contrib/admin/templates/admin/change_form.html

 {% extends "admin/base_site.html" %}
 {% load i18n admin_static admin_modify %}
 {% load url from future %}
+{% load admin_urls %}
 
 {% block extrahead %}{{ block.super }}
 {% url 'admin:jsi18n' as jsi18nurl %}
 
 {% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} change-form{% endblock %}
 
-{% block breadcrumbs %}{% if not is_popup %}
+{% if not is_popup %}
+{% block breadcrumbs %}
 <div class="breadcrumbs">
-     <a href="../../../">{% trans "Home" %}</a> &rsaquo;
-     <a href="../../">{{ app_label|capfirst|escape }}</a> &rsaquo;
-     {% if has_change_permission %}<a href="../">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %} &rsaquo;
-     {% if add %}{% trans "Add" %} {{ opts.verbose_name }}{% else %}{{ original|truncatewords:"18" }}{% endif %}
+<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
+&rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ app_label|capfirst|escape }}</a>
+&rsaquo; {% if has_change_permission %}<a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %}
+&rsaquo; {% if add %}{% trans 'Add' %} {{ opts.verbose_name }}{% else %}{{ original|truncatewords:"18" }}{% endif %}
 </div>
-{% endif %}{% endblock %}
+{% endblock %}
+{% endif %}
 
 {% block content %}<div id="content-main">
 {% block object-tools %}

File django/contrib/admin/templates/admin/change_list.html

 {% extends "admin/base_site.html" %}
 {% load i18n admin_static admin_list %}
 {% load url from future %}
+{% load admin_urls %}
+
 {% block extrastyle %}
   {{ block.super }}
   <link rel="stylesheet" type="text/css" href="{% static "admin/css/changelists.css" %}" />
 {% block bodyclass %}change-list{% endblock %}
 
 {% if not is_popup %}
-  {% block breadcrumbs %}
-    <div class="breadcrumbs">
-      <a href="../../">
-        {% trans "Home" %}
-      </a>
-       &rsaquo;
-       <a href="../">
-         {{ app_label|capfirst }}
-      </a>
-      &rsaquo;
-      {{ cl.opts.verbose_name_plural|capfirst }}
-    </div>
-  {% endblock %}
+{% block breadcrumbs %}
+<div class="breadcrumbs">
+<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
+&rsaquo; <a href="{% url 'admin:app_list' app_label=cl.opts.app_label %}">{{ app_label|capfirst|escape }}</a>
+&rsaquo; {{ cl.opts.verbose_name_plural|capfirst }}
+</div>
+{% endblock %}
 {% endif %}
 
 {% block coltype %}flex{% endblock %}
         <ul class="object-tools">
           {% block object-tools-items %}
             <li>
-              <a href="add/{% if is_popup %}?_popup=1{% endif %}" class="addlink">
+              <a href="{% url cl.opts|admin_urlname:'add' %}{% if is_popup %}?_popup=1{% endif %}" class="addlink">
                 {% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}
               </a>
             </li>

File django/contrib/admin/templates/admin/change_list_results.html

 <tr>
 {% for header in result_headers %}
 <th scope="col" {{ header.class_attrib }}>
-  {% if header.sortable %}<a href="{{ header.url_primary }}">{% endif %}
-  <span class="text">{{ header.text|capfirst }}</span>
-  {% if header.sortable %}
-    {% if header.sort_pos > 0 %}<span class="sortpos">
-      {% if header.sort_pos == 1 %}<img id="primary-sort-icon" src="{% static "admin/img/icon_cog.gif" %}" alt="" />&nbsp;{% endif %}
-      {{ header.sort_pos }}</span>
-    {% endif %}
-    <span class="clear"></span></a>
-  {% endif %}
+   {% if header.sortable %}
+     {% if header.sort_priority > 0 %}
+       <div class="sortoptions">
+         <a class="sortremove" href="{{ header.url_remove }}" title="{% trans "Remove from sorting" %}"></a>
+         {% if num_sorted_fields > 1 %}<span class="sortpriority" title="{% blocktrans with priority_number=header.sort_priority %}Sorting priority: {{ priority_number }}{% endblocktrans %}">{{ header.sort_priority }}</span>{% endif %}
+         <a href="{{ header.url_toggle }}" class="toggle {% if header.ascending %}ascending{% else %}descending{% endif %}" title="{% trans "Toggle sorting" %}"></a>
+       </div>
+     {% endif %}
+   {% endif %}
+   <div class="text">{% if header.sortable %}<a href="{{ header.url_primary }}">{{ header.text|capfirst }}</a>{% else %}<span>{{ header.text|capfirst }}</span>{% endif %}</div>
+   <div class="clear"></div>
 </th>{% endfor %}
 </tr>
 </thead>
 </tbody>
 </table>
 </div>
-
-{# Sorting popup: #}
-<div id="sorting-popup-div">
-<table>
-  <caption>
-   {% trans "Sorting by:" %}
-  </caption>
-  <tbody>
-  {% for header in result_headers|dictsort:"sort_pos" %}
-    {% if header.sort_pos > 0 %}
-    <tr>
-      <td>{{ header.sort_pos }}</td>
-      <td>{{ header.text|capfirst }}</td>
-      <td>{% if header.ascending %}{% trans "ascending" %}{% else %}{% trans "descending" %}{% endif %}</td>
-      <td><a href="{{ header.url_toggle }}">{% trans "toggle" %}</a></td>
-      <td><a href="{{ header.url_remove }}">{% trans "remove" %}</a></td>
-    </tr>
-    {% endif %}
-  {% endfor %}
-  </tbody>
-</table>
-<div class="reset"><a href="{{ reset_sorting_url }}">{% trans "Reset sorting" %}</a></div>
-<div class="cancel"><a href="javascript:void" id="sorting-popup-dismiss">{% trans "Cancel" %}</a></div>
-</div>
-<script type="text/javascript">
-<!--
-(function($) {
-    $(document).ready(function() {
-        var popup = $('#sorting-popup-div');
-        var img = $('#primary-sort-icon');
-        /* These next lines seems necessary to prime the popup: */
-        popup.offset({left:0, top:-1000});
-        popup.show();
-        if ($.browser.msie) {
-            // Can't find a way to make IE autosize the div.
-            popup.width(300);
-        }
-        var popupWidth = popup.width();
-        popup.hide();
-
-        var visible = false;
-
-        var escHandler = function(ev) {
-            if (ev.which == 27) {
-                hidePopup();
-                ev.preventDefault();
-            }
-        };
-
-        var showPopup = function() {
-            var pos = img.offset();
-            pos.top += img.height();
-            if (pos.left + popupWidth >
-                $(window).width()) {
-                pos.left -= popupWidth;
-            }
-            popup.show();
-            popup.offset(pos);
-            visible = true;
-            $(document).bind('keyup', escHandler);
-        };
-
-        var hidePopup = function() {
-            popup.hide();
-            visible = false;
-            $(document).unbind('keyup', escHandler);
-        };
-
-        $('#primary-sort-icon').click(function(ev) {
-            ev.preventDefault();
-            if (visible) {
-                hidePopup();
-            } else {
-                showPopup();
-            }
-        });