Commit Graph

4296 Commits

Author SHA1 Message Date
Jacob Kaplan-Moss 1aac357d34 Fixed #9303: comment templatetags no longer assume the built-in comment model.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9891 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-23 22:46:32 +00:00
Jacob Kaplan-Moss 63d85a684a Fixed #8630: finished the custom comment app API that was left out of 1.0. This means it's now possible to override any of the models, forms, or views used by the comment app; see the new custom comment app docs for details and an example. Thanks to Thejaswi Puthraya for the original patch, and to carljm for docs and tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9890 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-23 22:16:26 +00:00
Jacob Kaplan-Moss 7d4a954836 Refactored CommentForm.get_comment_object into a handful of separete methods to make it easier for subclasses to provide custom models and data. Refs #8630.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9889 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-23 22:16:00 +00:00
Russell Keith-Magee 542709d0d1 Fixed #10182 -- Corrected realiasing and the process of evaluating values() for queries with aggregate clauses. This means that aggregate queries can now be used as subqueries (such as in an __in clause). Thanks to omat for the report.
This involves a slight change to the interaction of annotate() and values() clauses that specify a list of columns. See the docs for details.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9888 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-23 14:47:59 +00:00
Brian Rosner 4bd24474c0 Fixed #10274 -- Fixed an embarrassing mistake in BaseGenericInlineFormSet.get_queryset. Thanks Zak Johnson for the report and akaihola for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9886 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-23 04:30:38 +00:00
Russell Keith-Magee 5f7c6a8d29 Fixed #9031 -- Clarified the error message when the label used to run a specific test case method doesn't name a valid test case class. Thanks to Thomas Guettler for the suggestion and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9879 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-22 08:34:51 +00:00
Russell Keith-Magee 8569157664 Fixed #9276 -- Corrected the way the CSS class is rolled out in a stacked edit-inline template. Thanks to creecode@gmail.com for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9877 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-22 08:05:40 +00:00
Russell Keith-Magee b2a4377651 Fixed #9066 -- Added Czech localflavor. Thanks to Elvard for the contribution.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9876 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-22 07:51:57 +00:00
Russell Keith-Magee 39dd44570c Fixed #10025 -- Corrected two minor typos in source documentation. Thanks to Tarken for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-22 06:08:37 +00:00
Russell Keith-Magee 8242735405 Fixed #10307 -- Removed references to FM/Federated States of Micronesia from the US localflavor STATES_NORMALIZED setting. Thanks to mnd for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9855 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-21 10:10:13 +00:00
Russell Keith-Magee cd0611bd83 Fixed #8551 -- Added REMOTE_ADDR to the default Test Client environment. Thanks to schmichael for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9847 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-21 07:19:12 +00:00
Russell Keith-Magee fc02370cee Fixed #10289 -- Corrected typo that produced oversensitive rejection of Postgres versions. Thanks to Ian Kelly for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9845 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-17 23:33:30 +00:00
Jacob Kaplan-Moss fd28d04c39 Merge branch 'master' into upstream-trunk
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9843 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-16 21:03:09 +00:00
Jacob Kaplan-Moss 8ada8d7c03 Fixed #9214: EmailMessage now respects the From header instead of blindly using from_email. Thanks, Tai Lee.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9842 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-16 20:47:39 +00:00
Karen Tracey ecc55503f4 Fixed #10196: Restored setting of image file width and height fields lost in r9766, and added tests for this function. Thanks to vicvicvic for the ticket and patch and for Alex for reminding me not to break non-PIL-boxes with the new tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9841 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-16 18:34:28 +00:00
Karen Tracey 11bfe72366 Fixed #10121: Restored code lost in r9766 that prevented overwriting an already-set blank=True FileField with blank. This would happen, for instance, in the admin if an object with a FileField was edited/saved but the file not re-uploaded, resulting in the association to the previously-uploaded file being lost. Adding the ability to re-blank FileFields when they are once set is the subject of a different ticket (#7048), for now the pre-9766 behavior here has just been restored in order to avoid unexpected data loss. Thanks to Alex for help in understanding how to fix this without un-doing the intent of r9766.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9840 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-16 17:30:12 +00:00
Russell Keith-Magee 2b1bb716ff Fixed #10248 -- Corrected handling of the GROUP BY clause when using a DateQuerySet. Thanks to Alex Gaynor for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9839 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-16 12:38:11 +00:00
Russell Keith-Magee fb64ea7896 Fixed #10132 -- Corrected the interaction of extra() queries with the values() clause. Thanks to Glen Maynard for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9838 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-16 12:29:31 +00:00
Russell Keith-Magee 58ea6d4561 Fixed #10256 -- Corrected the interaction of extra(select=) with values() and values_list() where an explicit list of columns is requested.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9837 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-16 12:28:37 +00:00
Marc Fargas bfbd62752a Closes #8836, Updated translation for Slovenian.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9832 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-13 11:04:19 +00:00
Marc Fargas 5ff216b40f Updated Spanish translation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-13 10:57:31 +00:00
Marc Fargas 739ae2b04b Updated Catalan translation
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9827 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-13 10:57:06 +00:00
Brian Rosner e4e964510c Fixed #10240 -- Restored YAML serialization with Decimal objects that broke with r9823. Thanks Alex Gaynor for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9825 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-12 02:54:39 +00:00
Brian Rosner e5cd43e588 Fixed #5903 -- DecimalField.get_default() now correctly returns a Decimal object when the model instance was not retrieved from the database. Thanks Justin Driscoll and pigletto.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-11 20:13:17 +00:00
Ian Kelly e9af96de1e Fixed #10224: Don't attempt to decode binary string data in the Oracle backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9821 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-11 00:15:23 +00:00
Russell Keith-Magee f0a7470e40 Fixed #10160 -- Modified evaluation of F() expressions to protect against potential SQL injection attacks. Thanks to Ian Kelly for the suggestion and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9820 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-08 11:14:56 +00:00
Russell Keith-Magee d4a3a4b0ca Fixed #10199 -- Modified aggregate() calls to clone the base query so that the base query can be reused. Thanks to Alex Gaynor for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-08 11:14:07 +00:00
Karen Tracey addd3df3bd Fixed #7672 -- Added a 'week_day' lookup type. Many thanks to Ross Poulton for the proposal and implementation on all built-in database backends..
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-08 05:08:06 +00:00
Luke Plant 0326574d0e Fixed tabs in source, stupid emacs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9817 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-07 19:32:37 +00:00
Luke Plant 95ed07e888 Fixed some function name errors in code doc.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9816 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-07 18:06:32 +00:00
Luke Plant 9a2e338107 Made CSRF middleware skip post-processing for 'csrf_exempt' decorated views.
This commit also decomposes the decorator into two decorators which can be
used separately, adds some tests, updates docs and fixes some code comments.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@9815 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-07 17:47:02 +00:00
Ian Kelly e3d64c6fca Fixed #10125: fixed the Oracle dsn construction code that was broken in [9712].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9812 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-03 22:08:57 +00:00
Karen Tracey 81ae2afdec Fixed 10075: Allowed saving of inline-edited models that use multi-table inheritance.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-03 14:02:09 +00:00
Russell Keith-Magee ecadf67569 Fixed #10127 -- Corrected (no, really, this time!) the way the select_related() cache is populated when annotations are also contained in the query. Thanks to Sylvain Pasche <sylvain.pasche@gmail.com> for the report and test case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9808 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-03 11:07:21 +00:00
Russell Keith-Magee 8f410a577b Fixed #10127 -- Corrected handling of select_related() in annotate() calls. Thanks to Sylvain Pasche <sylvain.pasche@gmail.com> for the report and test case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9805 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-02 13:43:18 +00:00
Russell Keith-Magee 65ad2132ab Fixed #10142 -- Added docs and an exploding error message to highlight an error present in the implementation of STDDEV_POP and VAR_POP in PostgreSQL 8.2-8.2.4 that will give incorrect answers (the database function mistakenly returns sample, rather than population deviation/variance). Thanks to Vinay Sajip <vinay_sajip@yahoo.co.uk> for the report, and Ian Kelly for pointing out the cause of the problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9804 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-02 12:03:31 +00:00
Justin Bronn 2b8e768b22 Fixed #9858 -- Added ability to use PostGIS template with GIS test runner via `POSTGIS_TEMPLATE` setting. Thanks to Aryeh Leib Taurog for feature suggestion and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-01 18:22:57 +00:00
Justin Bronn d982edff4b Now use `subprocess.Popen` instead of the deprecated os.popen3 to issue PostGIS test database creation commands.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9801 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-01 17:49:33 +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 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 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
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 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
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
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 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 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
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 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
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
Malcolm Tredinnick 73e5823f61 Fixed #9569 -- Small correction to Simplified Chinese translation.
Thanks, isoemail@163.com and neomana@gmail.com for the confirmation.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9722 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-08 10:33:36 +00:00
Malcolm Tredinnick 95b0c2569d Fixed #9636 -- Updated simplified Chinese translation.
Thanks, Liang Feng and Li Daobing.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9721 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-08 10:32:55 +00:00
Malcolm Tredinnick 67c1c516ab Fixed #9888 -- Updated Japanese translation from Takashi Matsuo.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9719 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-08 10:12:48 +00:00
Malcolm Tredinnick c5bdfab9ae Fixed #9985 -- qs.values_list(...).values(...) was constructing incorrect SQL.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9717 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-08 05:49:03 +00:00
Malcolm Tredinnick d068ad0c01 Using querysets as an rvalue in filter() calls was causing an unnecessary
database query, due to a bool() call. This change stops that behaviour.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9715 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-08 05:16:21 +00:00
Malcolm Tredinnick d00c013cc8 Remove any ordering from a nested select query (in the where-clause).
This fixes r9701 for Oracle (the test introduced there did its job and failed
previously).

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-08 05:15:41 +00:00
Ian Kelly c20019a91d Fixed #9972: The dbshell command was ignoring the DATABASE_HOST and DATABASE_PORT settings in Oracle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9713 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-08 05:12:14 +00:00
Justin Bronn 300752bd6c Return None for null date/time fields in OGR-supported data sources. Thanks to Ariel Mauricio Nunez Gomez for bug report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9711 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-07 20:21:19 +00:00
Malcolm Tredinnick e77c4cca26 Fixed #9963 - Added a trivial tests.py file to the files produced by "startapp".
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9708 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-06 05:27:39 +00:00
Malcolm Tredinnick a9c2f033cd Upgraded included simplejson to 2.0.7.
Also changed importing logic to prefer a system-installed version of
simplejson (unless it's an earlier version that does not contian the C
speedups), then the json module from Python 2.6, then the version
shipped with Django.

Fixed #9266.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9707 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-06 05:13:02 +00:00
Malcolm Tredinnick 0c08368116 Fixed #9862 -- For better SQL portability, don't specify "NULL" on nullable
columns when creating tables. Patch from Ian Kelly.

Columns are NULL by default, so we only need to use "NOT NULL" when we want
non-default behaviour.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-06 01:56:13 +00:00
Justin Bronn 391736e737 Updated `GeoWhere` to be compatible with changes in r9700.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9702 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-05 22:16:12 +00:00
Malcolm Tredinnick f747b61c20 Nested query support.
This extends previous functionality that allowed passing Query objects as the
rvals to filters. You can now pass QuerySets, which requires less poking at
opaque attributes. See the documentation of the "__in" lookup type for the
details.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-05 11:47:48 +00:00
Malcolm Tredinnick 062a94ef45 Reconciling where- and having-clause behaviour.
Extricated the code that works directly with SQL columns (standard
"where" stuff) from the the code that takes SQL fragments and combines
it with lookup types and values. The latter portion is now more
generally reusable. Any existing code that was poking at Query.having
will now break in very visible ways (no subtle miscalculations, which is
a good thing).

This patch, en passant, removes the existing "having" test, since the
new implementation requires more setting up than previously. The
aggregates support (currently in a separate codebase) has tests for this
functionality that work as a replacement for the removed test.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9700 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-05 11:47:14 +00:00
Russell Keith-Magee 096a9ecc5c Fixed #9942 -- Added a to_python handler for FloatField to ensure correct typing of deserialized data before saving. Underlying problem is analogous to #8298, fixed in [8515]. Thanks to David Larlet <larlet@gmail.com> for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9695 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-03 04:43:58 +00:00
Justin Bronn 3cd1e80ae4 Fixed `check_geom` and `check_srs` to accept larger sized pointer addresses as returned by some platforms (including OpenBSD 4.4 and Fedora 8).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9693 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-03 01:37:51 +00:00
Luke Plant a754165a91 Fixed #9637: Use 'block.super' in admin 'extrastyle' blocks to preserve changes in base_site.html
The current admin templates do not need this.  However, a common way to customize admin
appearance is to provide your own 'base_site.html' template, and add stylesheets using
the extrastyle block.  Without this patch, these customizations are lost.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@9690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-27 00:01:11 +00:00
Justin Bronn 50cd258a24 Fixed #9664 -- `LayerMapping` now works with MySQL spatial backends.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9688 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-26 20:04:11 +00:00
Justin Bronn d39540af92 Fixed #9892 -- support additional binary packages for GEOS & GDAL libs on OSX & Ubuntu platforms.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9686 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-26 16:02:45 +00:00
Adrian Holovaty be2697209b Improved the auth admin site to raise Http404 with a helpful error message if DEBUG is True, explaining why permission isn't denied. Refs #9866, and see also [9682]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9683 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-25 06:17:42 +00:00
Adrian Holovaty 62362c6175 Added comment to UserAdmin.add_view() explaining why we disallow users without change permissions from adding other users. Refs #9866
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9682 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-25 06:04:11 +00:00
Gary Wilson Jr 9af56803f5 Fixed #8245 -- Added a LOADING flag to autodiscover to prevent an admin.py module with errors from raising a spurious AlreadyRegistered exception in a subsequent call to autodiscover.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9680 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-23 18:25:24 +00:00
Gary Wilson Jr f0d44e44bd Fixed #9882 -- Added `alters_data = True` to `BaseModelForm.save` method, thanks dc.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9678 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-23 05:50:51 +00:00
Karen Tracey ca33f07e2c Fixed #9865 -- Allow saving of new inline-edited objects with custom non-auto primary key fields that are not the foreign key to the parent object.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9664 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-21 04:56:32 +00:00
Malcolm Tredinnick dc4c95cdbf Fixed a typo in r9650.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-17 01:47:08 +00:00
Karen Tracey 986e162c5d Follow-up to r9656 -- beef up the added test to exercise all (one can hope) paths through the troublesome get_deleted_objects function and fix the resulting errors.
Refs #9859.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9657 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-16 17:42:18 +00:00
Karen Tracey 10894da8a8 Fixed #9859 -- Added another missing force_unicode needed in admin when running on Python 2.3. Many thanks for report & patch to nfg.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9656 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-16 15:04:47 +00:00
Karen Tracey 5f78eff909 Fixed #9814 -- Allowed SafeStrings to be saved to sqlite DB when running on Python 2.6.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9654 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-16 14:28:22 +00:00
Malcolm Tredinnick b58a260c56 Fixed #9431 -- Added extra validation for VARCHAR-based fields on MySQL.
max_length > 255 and unique=True is not permitted. Based on a patch from
adamnelson.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9650 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-16 06:43:18 +00:00
Malcolm Tredinnick b96b450981 Fixed #9786 -- Fixed inequality checking for django.db.models.fields.file.FieldFile class.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9647 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-16 04:52:55 +00:00