Commit Graph

746 Commits

Author SHA1 Message Date
Julien Phalip 3513234cf8 Fixed #16815 -- Rectified the code example for hidden_fields and visible_fields in the forms documentation. Thanks, joonas.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-13 08:22:53 +00:00
Ramiro Morales 26b8122087 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.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 22:36:16 +00:00
Julien Phalip fd90453462 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.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16817 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 19:28:18 +00:00
James Bennett 7f45651f8d Fixed #16334: Make it quite clear that cache_page's 'cache' argument refers to the name of a cache in the CACHES setting.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16815 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 05:57:38 +00:00
James Bennett 4224127b54 Fixed #16094: Added clear example of how to refer to custom permissions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16813 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 05:47:48 +00:00
James Bennett f6d11f9b05 Fixed #16109: Corrected an inconsistency in URLconf examples for matching a numeric month.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16811 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 05:44:21 +00:00
James Bennett 23b7758f75 Fixed #16293: Document a way to return dicts with column names from a DB cursor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16808 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 05:37:55 +00:00
James Bennett 94524fbfef Fixed #16079: Clarified (for real this time) how handler404 and handler500 work, and that they only work in a root URLconf.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16804 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 04:01:41 +00:00
Alex Gaynor e130dc3275 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.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16789 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 21:00:32 +00:00
Alex Gaynor fee2d1877f Fixed #16280. Document that both args and kwargs cannot be passed to reverse at the same time.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16780 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 17:20:31 +00:00
Alex Gaynor 5fbf5fd3dd Fixed #16793. Added more cross referencing to the load tag's documentation. Thanks to bluejeansummer for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16774 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 02:52:37 +00:00
Alex Gaynor d14bf8c62b Fixed #11404. Added ``FormSet.has_changed``, for consistancy with ``Form.has_changed``. Thanks to michelts for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 02:42:05 +00:00
Alex Gaynor 01b0eb50fd 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.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16770 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 01:53:56 +00:00
Russell Keith-Magee 893cea211a Added protection against spoofing of X_FORWARDED_HOST headers. A security announcement will be made shortly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16758 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 00:46:38 +00:00
Gabriel Hurley 6ce463aadb Fixed #16786 -- Minor cleanups in the memcached section of the caching topic guide. Thanks to jamesp for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16748 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 22:33:28 +00:00
Alex Gaynor 7deb25b8dd Fixed #7596. Added Model.objects.bulk_create, and make use of it in several places. This provides a performance benefit when inserting multiple objects. THanks to Russ for the review, and Simon Meers for the MySQl implementation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 19:22:28 +00:00
Jacob Kaplan-Moss 0b174ccf0e Fixed #16384: warn against accessing request.POST/REQUEST in middleware.
Thanks, Tom Christie.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16734 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 17:20:16 +00:00
Jannis Leidel 16bb9c594c Fixed #16516 -- Relaxed the blocktrans rendering a little by falling back to the default language if resolving one of the arguments fails, raising a KeyError. Thanks, Claude Paroz and Aymeric Augustin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-08 13:24:41 +00:00
Ramiro Morales 932b1b8d6d Converted links to external topics so they use intersphinx extension markup.
This allows to make these links more resilent to changes in the target URLs.
Thanks Jannis for the report and Aymeric Augustin for the patch.

Fixes #16586.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16720 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-04 21:17:30 +00:00
Jannis Leidel 3256862f5f Fixed #16717 -- Added ability to store result of trans template tag in context variable.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16712 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-30 12:09:45 +00:00
Malcolm Tredinnick c9da5db701 Fixed documentation about use of salt parameter in signing functions.
Fixes #16369.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16693 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-26 08:18:05 +00:00
Adrian Holovaty 804a6db86e Added a bit to 'Saving ManyToMany Fields' explicitly explaining how to add multiple relations in one statement
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16689 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-26 04:34:40 +00:00
Russell Keith-Magee 6cd9023635 Fixed #15499 -- Ensure that cache control headers don't try to set public and private as a result of multiple calls to patch_cache_control with different arguments. Thanks to AndiDog for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16657 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 03:51:10 +00:00
Malcolm Tredinnick 0686c6b0ee Add the ability to do unordered comparisons in assertQuerysetEqual.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16654 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 03:38:18 +00:00
Russell Keith-Magee 2664fa1896 Fixed #15838 -- Promoted assertFieldOutput to a general test utility. Thanks to Ramiro Morales for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16653 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 02:32:37 +00:00
Malcolm Tredinnick 5edf1aabc2 Minor Debian/Ubuntu install instruction update.
This is all a bit of a mess (and fragile and mostly their own fault),
but this at least gives people a clue. Fixes #16287. Patch from
bpeschier.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16647 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-22 07:36:42 +00:00
Malcolm Tredinnick 1f233b479a Made documentation of ManyToManyField placement clearer (kind of).
Inspired by ticket #16661.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16639 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-22 01:07:19 +00:00
Timo Graham ec530b1425 Fixed #16610 - Added more docs for template contexts in contrib.auth views; thanks Elvard!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16632 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-21 10:37:02 +00:00
Timo Graham c673bd1c4b Fixed #16654 - Syntax error in reverse() example; thanks jedie.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16630 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-20 19:27:58 +00:00
Timo Graham 2ac0b97d43 Fixed #16595 - Add pop() to session docs; thanks wilfred.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16628 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-20 19:22:34 +00:00
Gabriel Hurley 41b31b4d09 Fixed #16608 -- Clarified the description of the destroy_test_db method and cleaned up various other reST/Sphinx-related bits in the testing docs. Thanks to Stan for the report and Julien for the draft patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-18 22:31:32 +00:00
Gabriel Hurley bdd1409eea Fixed #16467 -- Restored a previously correct example which was broken in [16564]. Thanks to dmclain for pointing out that the original example was correct.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16623 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-18 21:47:04 +00:00
Jannis Leidel 566b3295fa Fixed #16621 -- Fixed lots of typos in the docs. Thanks, Bernhard Essl.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16615 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-13 11:58:19 +00:00
Jannis Leidel e11c647d60 Fixed #16627 -- Fixed docs build warning.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16611 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-13 11:23:13 +00:00
Ramiro Morales 326949e444 Fixed #14503 -- Unified multiple implementations of test cases assert* methods that verify a given exception is raised by a callable throughout the Django test suite.
Replaced them with a new assertRaisesMessage method of a new SimpleTestCase, a lightweight subclass of unittest.TestCase. Both are also available for usage in user tests.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16610 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-13 00:42:08 +00:00
Jannis Leidel 351d5da69b Fixed #4617 -- Added `raise_exception` option to `permission_required` decorator to be able to raise a PermissionDenied exception instead of redirecting to the login page.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16607 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:15:41 +00:00
Jannis Leidel 1ca6e9b9e2 Fixed #9847 -- Added 403 response handler. Many thanks to kgrandis, adamnelson, vkryachko, fvox13 and Chris Beaven.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16606 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:15:31 +00:00
Timo Graham e3c89346d2 Fixed #16430 - Stronger wording for CSRF protection in `modifying upload handlers on the fly`; thanks tomchristie.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16588 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-06 20:34:04 +00:00
Timo Graham 0350d65fa4 Fixed #16513 - Add forms import to example; thanks teraom.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16586 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-06 19:02:20 +00:00
Timo Graham bbe63f07c4 Fixed #16528 - Documented test runner returns 1, regardless of the number of test failures; thanks teraom.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16584 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-06 18:54:21 +00:00
Jannis Leidel 8ac23178ad Fixed #16467 -- Corrected formset code example. Thanks, teraom.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16564 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-29 09:40:22 +00:00
Jannis Leidel f0280f2e94 Fixes #16482 -- Fixes typo in security docs. Thanks, charettes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16560 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-29 09:39:55 +00:00
Chris Beaven 4f50d248a8 Fixes #16532 -- Clearer explanation of how the test client expects HTTP headers to be passed. Thanks for the patch, Ricardo Bánffy.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16554 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-28 22:09:26 +00:00
Luke Plant 9896b0df73 Grammar fixes and content tweaks to XSS section of security docs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16545 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-17 14:17:26 +00:00
Simon Meers 4d920c5ecd Fixed #15715 -- added non-trivial decorator example to CBV docs. Thanks toofishes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16534 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-10 21:39:18 +00:00
Simon Meers 8d6c2dad9d Fixed #16440 -- minor ungettext documentation issue, thanks Bradley Ayers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16532 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-10 21:32:39 +00:00
Luke Plant ce89ebe1f0 Removed a redundant line from the cache_page docs
The code example clearly includes the import, no need to mention it twice.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16523 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-07 21:46:02 +00:00
Luke Plant f5c9c2246e Improved warning about file uploads in docs, and added link from security overview page
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16521 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-06 23:44:54 +00:00
Jannis Leidel 286a1cad88 Fixed #16332 -- Added language template tag that switches the activate language for the enclosed template section, e.g. to allow translation of URLs as added in r16405. Many thanks to Florian Apolloner and Orne Brocaar.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16501 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-04 09:52:06 +00:00
Jannis Leidel dbffffa7dc Fixed #5535 -- Allow using an explicit foreign key in get() calls. Thanks, Michal Petrucha.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16473 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-28 10:16:18 +00:00