Commit Graph

6536 Commits

Author SHA1 Message Date
Russell Keith-Magee 9a03c21a18 Fixed #8638 -- Added documentation on how to redirect email to a dummy server for testing purposes. Thanks to Rob Hudson and Marc Fargas for their work on the draft for this change.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9793 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-29 12:31:11 +00:00
Russell Keith-Magee cf37e4624a Fixed #7210 -- Added F() expressions to query language. See the documentation for details on usage.
Many thanks to:
    * Nicolas Lara, who worked on this feature during the 2008 Google Summer of Code.
    * Alex Gaynor for his help debugging and fixing a number of issues.
    * Malcolm Tredinnick for his invaluable review notes.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9792 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-29 10:46:36 +00:00
Russell Keith-Magee 08dd4176ed Refs #10113 -- Modified the generated SQL to remove redundant GROUP BY elements, and modified the test added in [9788] to remove a test result that depended on a potentially ambiguous database ordering.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9791 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-24 14:16:25 +00:00
Russell Keith-Magee ff78aef93b Fixed #10110 -- Added FAQ on how and when to poke the core developers about tickets. Thanks to Graham King for turning a couple of django-dev posts into a good first draft.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9789 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-24 12:07:26 +00:00
Russell Keith-Magee 15b1675af9 Fixed #10113 -- Ensured that joined fields mentioned in order_by() are included in the GROUP_BY clause on those backends that require it. Thanks to Koen Biermans <koen.biermans@werk.belgie.be> for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9788 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-24 06:53:54 +00:00
Russell Keith-Magee f5ed27cf1f Fixed #10052 -- Added import line for other aggregates used in examples. Thanks to Tyler Brownell <tyler@bluefoxstudio.ca> for the suggestion.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9787 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-23 11:12:06 +00:00
Russell Keith-Magee 0e15932be3 Fixed #10089 -- Corrected handling of aggregates when the query set contains no items (and the cursor returns None). Thanks to Kyle Fox for the report, and david for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9786 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-23 11:03:48 +00:00
Russell Keith-Magee ed3d2735a2 Fixed #10100 -- Corrected handling of the negation required exclude() clauses that reference aggregate columns. Thanks to Anossov for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9785 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-23 07:07:51 +00:00
Karen Tracey ef22bb7b33 Fixed #10103: Testcase fix for Jython compatibility. Thanks for report and patch leosoto.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9782 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-23 04:53:18 +00:00
Russell Keith-Magee 39516803f1 Fixed #10064 -- Corrected handling of aggregate queries that also use select_related(). Thanks to olivius for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9781 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-20 12:23:48 +00:00
Ian Kelly 728108883a Fixed #9275: Extended the Oracle date format to allow DATE columns to be used with DateTimeFields, especially when using legacy databases. Thanks to hollerith for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9779 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-19 20:49:12 +00:00
Karen Tracey 795c229ae9 Fixed #10069 -- Fixed the model form unique validation code to not proceed with using, for example, RelatedObjects returned by get_field_by_name as though they were model Fields.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9777 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-19 19:37:31 +00:00
Malcolm Tredinnick 9c6efb2eea Fixed #9789 -- Handle jython's compiled settings filename correctly.
Patch from Frank Wierzbicki.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9775 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-19 12:46:54 +00:00
Karen Tracey dd2e1356f0 Corrected code in serializers_regress testcase so that, in the case where an exception has been raised, rollback is called before attempting to leave transaction management. With the old code the original exception (IntegrityError on InnoDB) was getting hidden by a transaction management error resulting from attempting to leave transaction management with a pending commit/rollback.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-18 20:54:42 +00:00
Karen Tracey 81dfd1f5f0 Fixed #8055: Replaced use of traceback.format_exc (new in Python 2.4) with something that works as far back as 2.3.
Thanks to Ramiro for diagnosis and patch.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9770 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-17 22:15:07 +00:00
Karen Tracey 3c87c22b3c Added code to make TestSuites iterable when running on Python 2.3. (r9756 added code that iterates over them, thus broke running tests on Python 2.3, sigh.)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9769 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-17 22:04:40 +00:00
Matt Boersma b41a45f8e5 Fixed #5543: callproc() and friends now work with Oracle and our FormatStylePlaceholderCursor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9767 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 22:23:58 +00:00
Jacob Kaplan-Moss 6332ad4804 Fixed #10044: You can now assign directly to file fields (`instance.filefield = somefile`). Thanks, Marty Alchin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9766 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 21:48:37 +00:00
Jacob Kaplan-Moss 79138a6106 Fixed #10041: use a tempdir for files in the forms test. Thanks, Marty Alchin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9765 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 21:31:58 +00:00
Matt Boersma b120c74032 Changed "date" column to "start_date"--Oracle won't name columns with reserved keywords.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9764 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 21:18:21 +00:00
Justin Bronn 547649f962 Fixed geographic admin to be compatible with `ModelAdmin.formfield_for_dbfield` changes in r9760.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9763 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 20:05:39 +00:00
Ian Kelly 1c1425130d Fixed #6767: corrected a 2.3 compatibility issue in [9750]. Thanks to tlow.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9761 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 16:51:01 +00:00
Jacob Kaplan-Moss f212b24b64 Cleaned up and refactored `ModelAdmin.formfield_for_dbfield`:
* The new method uses an admin configuration option (`formfield_overrides`); this makes custom admin widgets especially easy.
  * Refactored what was left of `formfield_for_dbfield` into a handful of smaller methods so that it's easier to hook in and return custom fields where needed.
  * These `formfield_for_*` methods now pass around `request` so that you can easily modify fields based on request (as in #3987).

Fixes #8306, #3987, #9148.

Thanks to James Bennet for the original patch; Alex Gaynor and Brian Rosner also contributed.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9760 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 15:32:31 +00:00
Malcolm Tredinnick d579e716fe Fixed #9997 -- Fixed use of ValuesQuerySets as rvalues in filters.
Previous behaviour was pretty stupid. Let's never speak of it again. New
behaviour both works and is documented.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9759 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 10:59:43 +00:00
Malcolm Tredinnick 14b3f03015 Fixed #10014 -- Don't crash when using debug template tag inside a block node tag.
Returning non-ASCII characters from TextNode.__repr__ was causing
problems in the BlockNode.__repr__ method (and probably in other places
we don't know about yet). We now forcibly convert to ascii and replace any
unconvertible characters, rather than returning some moderately
corrupted data in the non-ASCII case.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9757 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 08:59:02 +00:00
Karen Tracey 344f16e220 Fixed #8138 -- Changed django.test.TestCase to rollback tests (when the database supports it) instead of flushing and reloading the database. This can substantially reduce the time it takes to run large test suites.
This change may be slightly backwards incompatible, if existing tests need to test transactional behavior, or if they rely on invalid assumptions or a specific test case ordering.  For the first case, django.test.TransactionTestCase should be used.  TransactionTestCase is also a quick fix to get around test case errors revealed by the new rollback approach, but a better long-term fix is to correct the test case.  See the testing doc for full details.

Many thanks to:
* Marc Remolt for the initial proposal and implementation.
* Luke Plant for initial testing and improving the implementation.
* Ramiro Morales for feedback and help with tracking down a mysterious PostgreSQL issue.
* Eric Holscher for feedback regarding the effect of the change on the Ellington testsuite.
* Russell Keith-Magee for guidance and feedback from beginning to end.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9756 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 02:30:22 +00:00
Russell Keith-Magee f9f9d703cf Fixed #10042 -- YAADT (Aggregation Docs Typo).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9755 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 00:02:35 +00:00
Russell Keith-Magee b3dd0b5dcc Fixed #10039 -- More typos in aggregation docs. Seriously, people, now you're just making me look bad :-) Thanks to ElliottM, and to Erich Holscher for a separate report that I've piggybacked on this checkin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9754 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 23:15:32 +00:00
Russell Keith-Magee bf710bd005 Fixed #10035 -- Corrected more typos in the aggregation docs. Thanks to Ivan Sagalaev for his eagle eyes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9753 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 22:33:55 +00:00
Russell Keith-Magee d55b361ac4 Corrected another typo in aggregation docs. Thanks to Ivan Sagalaev for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 22:26:00 +00:00
Ian Kelly acfe5cc880 Fixed #6767: changed the way the Oracle backend fetches numbers to prevent decimals being returned as floats.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9750 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 20:39:09 +00:00
Justin Bronn f60d0f597a Forgot to actually enable the extent aggregate for Oracle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9749 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 19:50:29 +00:00
Justin Bronn f671a5c961 Fixed incomplete merge of geographic aggregates; added support for `Extent` aggregate to Oracle spatial backend. Refs #3566.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9748 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 19:35:04 +00:00
Karen Tracey 91e25f9ef8 Fixed #10033: In the Oracle backend, restored code lost in the aggregation merge that ensured a datetime object is returned for fields known to be datetimes, even when the time part is all zero.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9747 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 15:11:28 +00:00
Russell Keith-Magee 14d15093bc Corrected typo in aggregation docs. Thanks to Ivan Sagalaev for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9746 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 14:07:53 +00:00
Russell Keith-Magee 3937de4e24 Removed an redundant import from the Oracle backend. Thanks to Ramiro Morales for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9745 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 12:44:45 +00:00
Russell Keith-Magee 79fa78cc80 Corrected a copy-and-paste typo in a heading of the aggregation docs. Thanks to Eivind Uggedal for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9744 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 12:35:41 +00:00
Russell Keith-Magee 1a87e01f21 Corrected some ReST problems with the aggregation docs. Thanks to James Bennett for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9743 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 12:13:17 +00:00
Russell Keith-Magee cc4e4d9aee Fixed #3566 -- Added support for aggregation to the ORM. See the documentation for details on usage.
Many thanks to:
 * Nicolas Lara, who worked on this feature during the 2008 Google Summer of Code.
 * Alex Gaynor for his help debugging and fixing a number of issues.
 * Justin Bronn for his help integrating with contrib.gis.
 * Karen Tracey for her help with cross-platform testing.
 * Ian Kelly for his help testing and fixing Oracle support.
 * Malcolm Tredinnick for his invaluable review notes.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9742 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 11:06:34 +00:00
Gary Wilson Jr 50a293a0c3 Updated name as per author's request.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9740 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 06:37:01 +00:00
Jacob Kaplan-Moss 1f84630c87 Fixed #6470: made the admin use a URL resolver.
This *is* backwards compatible, but `admin.site.root()` has been deprecated. The new style is `('^admin/', include(admin.site.urls))`; users will need to update their code to take advantage of the new customizable admin URLs.

Thanks to Alex Gaynor.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-14 20:22:25 +00:00
Justin Bronn 6c4e5f0f0e Fixed #9278, #9694 -- Geographic overlays now display in admin with right to left langauges; simplified transformation process in `OpenLayersWidget` to fix Ubuntu 8.10/Apache 2.2.9 crash; updated OpenLayers version to 2.7.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9733 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-13 02:08:26 +00:00
Jacob Kaplan-Moss ffeb1d0465 Fixed #9346: fixed comment upgrade SQL in documentation. Thanks, mt.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9732 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-12 17:31:40 +00:00
Jacob Kaplan-Moss 3990d00f20 Fixed #9959: fixed comment documentation example showing how to get a preview.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-12 17:29:01 +00:00
Jacob Kaplan-Moss 4035ea3538 A few small fixes to django.contrib.comments (Comment.get_as_text for non-authenticated users; references to Comment.permalink; unused imports). Fixes #9143, #9429, and 9439. Thanks, Thejaswi Puthraya.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9730 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-12 17:27:41 +00:00
Gary Wilson Jr 11d382c6c4 Fixed a long line, a typo, and a few misspellings from [9727].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9729 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-11 05:47:06 +00:00
Jacob Kaplan-Moss c01098e9cb In urlconfs, include() may now be used on an iterable of patterns instead of just a module string. Refs #6470 -- making the admin use a urlconf is much easier with this work done. Thanks, Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-10 22:54:20 +00:00
Jacob Kaplan-Moss 299e1e814f Fixed #6791: added a write-through cache session backend: session data is written through the cache to the database, but read from the cache for speed. Thanks to jhenry, mcroydon, and jdunck.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9727 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-10 22:18:14 +00:00
Malcolm Tredinnick d32c290846 Revised r9566 slightly to be backwards compatible with versions 1.0 - 1.0.2.
Also documented the change. We prefer to load directory_index.html for static
directory listings, but if you have the (older style) "directory_index"
template and no .html version, we'll load that. This should stop a bunch of
mysterious breakages when people upgrade to Django 1.0.3 or Django 1.1. Also
keeps the docs in sync with released code.

Fixed #9993.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9725 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-09 12:41:07 +00:00
Jarek Zgoda 0e59fbbd85 Updated Polish translation: fixed typo and one missing translation
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9724 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-09 09:57:53 +00:00