Commit Graph

1080 Commits

Author SHA1 Message Date
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
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
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
James Bennett bb6d5dc69b Fixed #9795: Since related-object selection widgets take limit_choices_to into account, the offending code is no longer necessary and can simply be removed.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9641 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-11 07:06:25 +00:00
Justin Bronn bde736cc5a Fixed a Python 2.4 incompatibility in `compress_kml`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9607 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-08 14:50:06 +00:00
Justin Bronn 6590c0bcf5 Fixed #9747 -- now explicitly set response type on C functions that return WKB and WKT.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9605 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-08 14:29:06 +00:00
Malcolm Tredinnick 662e12b45c The second part of fixing "related inherited models" display. Handle raw_id values for child models in the admin. Fixed #9461.
I couldn't think of a way to test this automatically and robustly, however,
manual testing with the ticket example shows failure before and success
afterwards and the fix make sense logically.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9602 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-08 08:16:26 +00:00
Gary Wilson Jr fa7aa7255c Fixed #9732 -- Added missing close paragraph tag to password reset confirmation template, thanks casseen.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9599 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-08 05:41:28 +00:00
Justin Bronn 4058429708 Fixed #9572 -- use `opts` argument. Thanks SeanL for bug report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9572 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-06 01:52:14 +00:00
Justin Bronn 8370e7ca87 Fixed #9742 -- remove extraneous 'kml' from KML mimetype. Thanks, robotika for the bug report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9570 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-06 00:38:48 +00:00
Luke Plant d192236a3d Fixed regression introduced in r9550
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9563 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-03 15:47:19 +00:00
Luke Plant a44d0aace3 Refs #8248 - GenericRelations descriptors now return self when accessed via class
These were missed in r9550 


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9562 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-03 15:45:19 +00:00
Luke Plant 9c33d74f1d Added some explanatory comments in CsrfMiddleware
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9561 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-03 13:23:23 +00:00
Luke Plant 9eedc7bd0b New CsrfMiddleware features: automatic exceptions for known AJAX and decorator for manual exceptions
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9554 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-03 00:34:18 +00:00
Luke Plant c0f9e85fbe Split CsrfMiddleware into two to make it more reusable.
Also converted it to be a view middleware instead of request,
as this allows more options.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9553 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-03 00:31:31 +00:00
Luke Plant 01ec6d0085 More tests for the other half of CsrfMiddleware
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9552 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-02 23:00:06 +00:00
Luke Plant f7242bb778 Added tests for CsrfMiddleware.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9551 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-02 22:40:00 +00:00
James Bennett 8559fc6b35 Fixed an issue in ForeignKeyRawIdWidget where the values in limit_choices_to were always treated as lists even when they weren't
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9533 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-26 21:21:43 +00:00
Karen Tracey 380e31ddb7 Fixed #9642 -- Made the admin calendar/clock popups go away when the users clicks outside them. The previous javascript code did not work on IE. Thanks northtea for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9514 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-21 14:52:58 +00:00
James Bennett 3ba235a348 OneToOne filtering should only apply in a popup selection from the related model.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9507 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-20 19:01:40 +00:00
Justin Bronn 708df97f20 Reverted r9480 -- the patch broke the Oracle spatial backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9484 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-17 18:42:48 +00:00
Justin Bronn 3dbe65e162 Fixed #9620 -- spatial database tables now have `app_label` set correctly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9482 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-17 18:18:54 +00:00
Wilson Miner 21e86f2af2 Updated stylesheet link on the change password form.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9464 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-16 00:09:39 +00:00
Wilson Miner 902df97f36 Removed the hidden import rules in the contrib.admin stylesheets. Each individual stylesheet is now linked to explicitly from the template where it's used (in the extrastyle block), with the exception of widgets.css, which is imported by forms.css, but still available separately for reuse. Also moved the override stylesheets (IE and RTL) below the extrastyle block and all styles within the conditional comment which blocks CSS from IE5 and lower.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9463 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-16 00:08:48 +00:00
Brian Rosner f63929dbe2 Fixed #9258 -- Use _default_manager in ForeignKeyRawIdWidget.label_for_value. Thanks nullie for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9444 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-15 02:20:00 +00:00
Brian Rosner f751d5b713 Fixed #9498 -- Handle a formset correctly when the foreign key is not available (for now).
This case pops up with generic foreign key inlines after [9297]. Added tests
to handle future regressions with generic foreign key inlines in the admin.

Thanks markus and danielr for patches.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9412 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-13 19:03:44 +00:00
Karen Tracey c7078ff0a2 Fixed #106 -- Refrain from generating popup window names that IE refuses to pop up. Thanks for the reports and initial patches nbstrite and jsmullyan.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9403 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-12 16:23:04 +00:00
Justin Bronn 1142dd430f Fixed #9566 -- made GeoJSON regex more robust.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9392 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-11 17:21:43 +00:00
Karen Tracey 6ed91234e3 Fixed #8910 -- Added force_unicode during admin log message creation to avoid triggering a Python 2.3 bug. Thanks for the report joshg and patch nfg.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9383 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10 17:13:41 +00:00
Karen Tracey c367e2869e Fixed #9514 -- Made admin change_form template correctly recognize/report when a form has only a single error.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9371 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-09 18:51:28 +00:00
Karen Tracey bcd63cbfb0 Fixed #6160, #9111 -- Consistently apply conditional_escape to form errors and labels when outputing them as HTML.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9365 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-06 19:49:24 +00:00
Karen Tracey 04354e1afc Fixed #9506 take 2 -- Marked the message properly for translation, in both places it appears in the source.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9363 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-06 16:44:42 +00:00
Karen Tracey e40bd61ef7 Fixed #9506 -- Marked error string for translation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9360 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-06 14:32:33 +00:00
Justin Bronn e600364f7d Fixed `resolve_columns` so that pagination works again on Oracle GeoQuerySets; properly set svn:ignore on `sitemaps` subdir.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9338 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-05 18:15:48 +00:00
Justin Bronn b401d44a9f Fixed #9364 -- now uses the appropriate database table for inherited `GeometryField`s; now uses the `SpatialBackend` booleans in tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9336 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-05 17:51:11 +00:00
Wilson Miner ac0808f70b Consolidated contrib.admin styles by rolling layout.css and global.css directly into base.css.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9304 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-31 23:52:31 +00:00
Wilson Miner 6b82c386f6 Applied contrib.admin IE CSS patches to IE6 and 7, and added simple hacks to filter some rules to both and some only to IE6.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9303 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-31 23:44:24 +00:00
Wilson Miner 50535505a9 Added IE conditional comments to contrib.admin base template to block CSS from IE5 and lower and serve a patch to IE6 with IE conditional comments. Removed dependency on CSS hacks and empty null.css file.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9300 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-31 23:01:38 +00:00
Wilson Miner 3028e85222 Reformatted contrib.admin CSS to use multi-line selector format so changes can be tracked more easily in version control.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9299 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-31 22:19:21 +00:00
Brian Rosner 0ea15f5650 Fixed #8882 -- When a foreign key is among the unique_together fields in an inline formset properly handle it.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9297 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-31 22:07:05 +00:00
Justin Bronn 243dea4cd6 Fixed `MySQLGeoField` to create spatial indexes again.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9286 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-28 00:39:23 +00:00
Justin Bronn 0b6d214f48 Fixed #9448 -- `Layer` objects now carry a reference to their parent `DataSource`. Thanks, Matthew D. Hancher for the bug report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9284 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-26 22:24:21 +00:00
Justin Bronn cbeea83107 Fixed #9391 -- `AdminSite` and `ModelAdmin` now exposed in `django.contrib.gis.admin` for API consistency and convenience.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9282 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-26 18:01:15 +00:00
Justin Bronn 3784c7fac6 Fixed `ogrinspect` management commannd -- no longer try to pass the global `verbosity` option where it shouldn't go. Refs r9110.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9278 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-25 19:16:45 +00:00
Karen Tracey 03070a9955 Fixed #7179 -- Changed breadcrumbs on the add page so that a link to the change view is not included when the user doesn't have permission for that view. Also added tests to ensure the link is not there when it shouldn't be, and there when it should be. Thanks for the report & patch alen__ribic.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9276 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-24 19:14:24 +00:00
Karen Tracey 30241385d5 Fixed #9252 -- Moved the try/except protecting against incorrect lookup params to where the error is now raised, and added a test for this case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9245 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-22 23:09:35 +00:00
Brian Rosner 5e5af8a8aa Display non_field_errors of inline forms in the admin. This was a presentation bug.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9243 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-21 20:25:45 +00:00
Karen Tracey ae43d11838 Fixed #3096 -- Make admin list_filters respect limit_choices_to.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-21 19:03:21 +00:00
Justin Bronn a14b98e207 Fixed #9361 -- thanks to Guillaume for the bug report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9237 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-21 04:32:02 +00:00
Karen Tracey 9feebb10f9 Fixed #8110 -- Allow for AdminLogNode's render to be called more than once.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-17 22:43:36 +00:00
Jacob Kaplan-Moss b21ea0a836 More be-nice-to-the-buildbot: be better about cleaning up files created by the cache/session tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9224 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-10 21:41:12 +00:00
Karen Tracey 05d695908c Fixed #9053 -- Allowed for sorting of callable and ModelAdmin methods specified in list_display (added in r8352). Previously attempting to sort on the former would raise an exception and the latter simply didn't sort. Also added tests for this function. Thanks rgl and jenan.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08 14:47:01 +00:00
Malcolm Tredinnick fb62bcc69e Fixed #8321 -- Change django.contrib.auth.models to use django.utils.hashcompat
for consistency with other code. Thanks, magneto.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9160 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-06 05:14:17 +00:00
Malcolm Tredinnick c58c1f43cf Fixed #5753 -- Allow createsuperuser to work in situations where there
might be a valid password database entry for the current user id.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9158 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-06 04:54:14 +00:00
Malcolm Tredinnick 2f0be0faae Fixed #8660 -- Small database query optimisation in User.get_profile.
When calling User.get_profile(), we now tell the profile object about the
related User object right away. This can save a database lookup later if
something in the user profile object wants to refer to the user object.

Patch from Mike Malone.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9152 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 12:07:10 +00:00
Malcolm Tredinnick 7cec38b076 Fixed #9259 -- Fixed a validation error for Spanish identity card numbers.
Patch from Marc Garcia.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9129 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:59:04 +00:00
Malcolm Tredinnick cff78c60ac Fixed #8963 -- Use the require_POST decorator instead of doing things manually in one of the comment views. Thanks, zgoda.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9121 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:10:35 +00:00
Malcolm Tredinnick 645029accb Fixed #9100 -- Added a missing CSS class to a submit button.
Thanks, mordyovits and thejaswi_puthraya.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9120 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:09:59 +00:00
Malcolm Tredinnick 8524089769 Add internationalisation support to the comment templates. Fixed #8868, #8905
Thanks to zgoda for a patch that did most of the internationalisation part.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9119 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:09:21 +00:00
Malcolm Tredinnick 227a93b64f Fixed #8803 -- Allow authenticated users without first_name/last_name values set to post comments.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9118 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:07:32 +00:00
Malcolm Tredinnick 16d0a615c4 Fixed #8869 -- Fixed comments templates to be well-formed XHTML.
Based on a patch from zgoda.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9117 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:06:26 +00:00
Malcolm Tredinnick 18f13aeeab Fixed #8879 -- Used ungettext instead of ngettext in the comments framework.
Patch from zgoda.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9116 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:05:32 +00:00
Malcolm Tredinnick cf34d1f687 Fixed #9141 -- Removed two templates from django.contrib.comments that were not being used.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9115 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:04:56 +00:00
James Bennett 788e6c081b Use correct m2m join table name in LatestCommentsFeed
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9089 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-28 02:55:56 +00:00
James Bennett cc72e64e19 Fixed #9203: Restore correct ordering for LatestCommentsFeed
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9088 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-28 02:50:09 +00:00
Malcolm Tredinnick 6c7cf34d69 Fixed #9171 -- Fixed a few places where we were assuming lists instead of
generic sequences in ModelForm structures. Patch from mrmachine.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9086 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-27 05:57:10 +00:00
Karen Tracey fd366a8531 Fixed #7582: Removed checks that prevented null=True ForeignKey fields from being sortable in Admin. Post queryset-refactor there seems no reason to disallow this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9080 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-21 16:57:26 +00:00
Karen Tracey 0ededc611f Fixed 8984: Only include a "Documentation" link on change password and change password done pages if admin docs have been configured.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9079 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-21 16:15:09 +00:00
Wilson Miner 936b8ea11b Added a generic "button" class to the admin styles to allow applying the standard admin button styles to arbitrary elements in the future. Should have no effect on existing code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9077 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-20 22:33:24 +00:00
Karen Tracey 060919afa1 Fixed #9129 -- Restored a force_unicode that was lost when unicode changes were merged to newforms-admin. Thanks Ricardo & Ramiro.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9070 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-18 17:10:16 +00:00
Malcolm Tredinnick 0aff292bcf Changed a slightly suspicious usage of request.POST to request.method == 'POST'.
Refs #9014 (not the root cause of that bug, but discovered whilst people were
diagnosing it).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9063 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-17 08:59:55 +00:00
Malcolm Tredinnick a10fcbdb8b Fixed #9096 -- Fixed a slightly out-of-date comment.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9062 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-17 08:10:55 +00:00
Adrian Holovaty 660180df30 Fixed #8574 -- Made Sitemap a new-style class
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9052 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-17 04:56:04 +00:00
Adrian Holovaty 8ec8e1a5e8 Fixed #8870 -- Changed django.contrib.comments templates to use lowercase 'post' for <form method> attributes, to be consistent with our other templates. Thanks, zgoda
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9050 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-16 06:15:26 +00:00
Adrian Holovaty 2ccc716e7b Changed the app-level links on the admin index page to include trailing slashes, to be consistent with the rest of the links
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9048 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-16 06:01:47 +00:00
Adrian Holovaty af23d8d3b3 Fixed #9083 -- Improved get_admin_log template tag so that it doesn't run a separate SQL query for every record in the 'history' sidebar on the admin homepage. Thanks for the patch, santip
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9045 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-16 05:50:03 +00:00
Wilson Miner f09f744f81 Fixed #9074: Added overflow: hidden to the submit-row div to clear the floated contents and avoid collapsing when the Save button is all that's there.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9039 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-16 00:40:10 +00:00
Wilson Miner b79cb53d76 Fixed #8917 -- Comments are now displayed in reverse order by submit_date in the admin. Thanks to arien for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9038 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-16 00:25:21 +00:00
Justin Bronn 96becf2458 Moved imports so that other tests may be imported without specifying Django settings.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9037 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-15 18:06:02 +00:00
Justin Bronn b04faa3511 Fixed #9008 -- now use the correct library path for loading the `WinDLL` instance of the GDAL library.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9036 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-15 17:25:17 +00:00
Russell Keith-Magee 24d3129edd Fixed #8570: Corrected some code that was using 8-space tabs for some reason. Thanks to Manuel Saelices for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9019 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-14 07:04:40 +00:00
Adrian Holovaty 32db67e6f9 Fixed #8957 -- Fixed incorrect error message when Admin prepopulated_fields refers to a field that does not exist. Thanks, charmless
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9002 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-10 06:06:04 +00:00
Adrian Holovaty 40cb11a554 Moved the bulk of the shortcut() function in django/views/defaults.py to a new module, django/contrib/contenttypes/views.py. As a result, django/views/defaults.py no longer relies on django.contrib.contenttypes. Of course, the shortcut() function is still available in the former module, for backwards compatibility. See the new FutureBackwardsIncompatibleChanges wiki page.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9001 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-10 05:56:34 +00:00
Adrian Holovaty 5cc93500e8 Fixed #8959 -- Removed redundant calls to the 'escape' template filter in the django.contrib.comments templates. Thanks, zgoda
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9000 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-10 05:14:59 +00:00
Justin Bronn 152b9ba717 Fixed #8881 by specifying the geometry column name; added the `geom_col_name` classmethod to `GeometryColumns` for Oracle and PostGIS.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8994 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-09 19:19:51 +00:00
Adrian Holovaty 1bfed070c3 Fixed #7929 -- Removed some snippets of admin code that weren't doing anything, and tightened up a few more lines. Plus, an indentation fix. Thanks, julien
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-08 05:45:17 +00:00
Adrian Holovaty 6bdb7b9529 Fixed #8172 -- Improved a whole bunch of contrib templates (admin, databrowse, admindocs, etc.) to remove unnecessary 'escape' filters, given autoescaping. Also removed unnecessary {% if %} tags and shortened some {% if %}/{% else %} tags to use {% firstof %}. Thanks for the patch, benspaulding
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8984 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-08 05:19:28 +00:00
Malcolm Tredinnick 96a417f91d Fixed two XHTML errors pointed out by Jarek Zgoda. Refs #8855.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8958 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03 22:46:39 +00:00
Malcolm Tredinnick 559c0da7c1 Fixed a small initialisation edge-case in the raw_id_fields section of admin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03 21:16:05 +00:00
Malcolm Tredinnick a1e9b98c54 Fixed #8832 -- Position the error icons on the right of the screen in the admin
interface when using right-to-left languages.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8935 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03 19:51:20 +00:00
Malcolm Tredinnick e1f1bda3c7 Fixed #8614 -- Typo fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8933 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03 18:44:19 +00:00
Malcolm Tredinnick 42393ff604 Fixed #8812 -- Fixed up the positioning of the "delete" link in the admin
interface for right-to-left languages (Hebrew, Arabic, etc). Patch from Jannis
Leidel.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8903 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03 04:22:39 +00:00
Malcolm Tredinnick 85ebb91846 Fixed #8669 -- Use a consistent version of create() across the board for
model/field instance creation. Based on a patch from Richard Davies.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8884 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03 00:09:33 +00:00
Jacob Kaplan-Moss 0e5faf225c Security fix. Announcement forthcoming.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8877 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 21:10:00 +00:00
Jacob Kaplan-Moss 7a9b55ddc4 Fixed #2612: fixed display of admin `help_text` with multiple fields on the same line. Thanks to Nathan Borror for the original patch, and jezdez for a little cleanup.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8871 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 19:25:27 +00:00
Brian Rosner 577640bd04 Fixed #8805 -- Make sure proper type coercion happens before dumping data into join for limit_choices_to when building the URL parameters for the ForeignKeyRawIdWidget popup.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8867 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 18:57:10 +00:00
Brian Rosner c1de41f4d2 Fixed #7973 -- Added exclude to BaseModelAdmin to make everything consistent with the form/formset factories. Refs #8071 to make it easier to get at exclude. Thanks julien for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 17:26:24 +00:00
Justin Bronn 326b26656a Fixed `GeoRSSSitemap` to no longer use both `args` and `kwargs` with `urlresolvers.reverse` (no longer allowed since r8760).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8860 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 17:13:39 +00:00
Jacob Kaplan-Moss 23f012dbfa Cleaned up a bunch of minor doc stuff:
* Removed flatpages/redirects README; no other contrib apps have those.
  * Cleaned up top-level README to be more readable.
  * Removed outdated references to old docs (Fixes #8701)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8857 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 16:42:13 +00:00
Jacob Kaplan-Moss 79d2ee3b6d Fixed #8309: subclasses now inherit `GenericForeignKey` correctly. There's also now an internal API so that other "virtual fields" like GFK can be inherited as well. Thanks, msaelices.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8855 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 15:26:00 +00:00
Brian Rosner 0cd5caa6a8 Fixed #8787 -- Fixed failing admin_widgets tests. This fixes ManyToManyRawIdWidget which was broken with [8823]. Thanks Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8846 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 06:10:14 +00:00
Malcolm Tredinnick 63c9b7bf06 Avoid a deprecation warning when running on Python 2.6. Patch from Karen Tracey.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8841 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 03:04:28 +00:00
Brian Rosner eefec151d1 Fixed #2612 -- Fixed admin formatting when help_text is used with multiple fields on the same line.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8824 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01 22:59:43 +00:00
Brian Rosner ce47d4ab83 Fixed #8648 -- Admin no longer ignores to_field. Thanks for the help Karen Tracey and SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01 22:43:38 +00:00
Jacob Kaplan-Moss 3a18002bbd Fixed #8210 and #8664: moved `USStateField` and `PhoneNumberField` to `django.contrib.localflavor.us`. This is a backwards-incompatible change, albeit a minor one; just add an aditional `import` and go on your way.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01 22:15:35 +00:00
Jacob Kaplan-Moss 89633c3077 Fixed a small oversight in [8750]; thanks for the sharp eyes, Warren. Fixes #8616.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8812 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01 20:25:16 +00:00
Malcolm Tredinnick cf7a078774 Added a related name to the ForeignKey in the abstract base class of the
comment models. You'll never need to use this name, but it will lead to invalid
models if not present.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01 17:56:22 +00:00
Jacob Kaplan-Moss a3196dac48 Make sure to use force_unicode when looking up comment objects by `object_pk`. Fixes #8762, and one other bug that nobody's reported yet.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8800 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01 17:23:09 +00:00
Brian Rosner ab13303ea4 Fixed #8433 -- Deal with the add user popup on models that foreign key to User correctly. Thanks sorl for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8776 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31 21:24:33 +00:00
Jacob Kaplan-Moss 4f5b0a321d Fixed #8194 (again): correctly focus on the first declared field in the admin. Thanks to fredbartle for catching my silly mistake the first time 'round.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8774 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31 20:30:55 +00:00
Jacob Kaplan-Moss 8b11341a9a Fixed `ModelAdmin.radio_fields` to work with the new `TypedChoiceField`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31 20:11:28 +00:00
Brian Rosner d05ebdb649 Fixed #8058 -- Moved media for filter_vertical/filter_horizontal widget to the widget for use outside the admin. This also corrects RelatedFieldWidgetWrapper to expose the media of the wrapped widget. Thanks Erwin for the report and cgrady and ramikassab for the complete patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8764 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31 17:20:43 +00:00
Brian Rosner 30c7ce90c5 Fixed #8631 -- Corrected a display issue with the popup submit_row where the Save button would overflow. Thanks btaylordesign for report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8762 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31 17:13:29 +00:00
Brian Rosner 27f9b96fa0 Fixed handling of primary keys in model formsets. Model formsets should now work nicely with custom primary keys that are OneToOneField, ForeignKey and AutoField. Added tests to handle each of them.
Fixes #8241, #8694, #8695 and #8719.

Thanks Karen Tracey, jonloyens, sciyoshi, semenov and magneto for tracking down various parts of this patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8756 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31 09:49:55 +00:00
Jacob Kaplan-Moss ae72e25b35 Fixed #8716: correctly handle name and email in comments from authenticated users.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8751 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-30 21:30:02 +00:00
Jacob Kaplan-Moss eebc7caa63 Fixed #8616 (again): prevent a race condition in the session file backend. Many thanks to Warren Smith for help and the eventual fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8750 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-30 20:50:41 +00:00
Jacob Kaplan-Moss f2d7ee759a Fixed #8710: removed a few stray tabs. Thanks, gkelly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8746 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-30 19:25:40 +00:00
Malcolm Tredinnick cc971910a9 Changed [8727] to use ImportError, which seems to actually work. Not sure what
I was smoking when I tested this 10 minutes ago. Refs #8680. Thanks to gkelly
for cleaning up after me.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 23:03:12 +00:00
Malcolm Tredinnick 4184d6348e Fixed #8680 -- Changed a couple of GEOExceptions to Python's RuntimeError so
that help() works. Without this change, even if you didn't use the gis stuff,
just using Python 2.5's help() system would crash when searching for model
names.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8727 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 22:51:01 +00:00
Brian Rosner 5c31c68560 Properly reference FieldDoesNotExist as it does not exist in global of django/contrib/admin/options.py.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8719 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 19:50:22 +00:00
Jacob Kaplan-Moss 21adbd6738 Fixed #7466: do a better job figuring out links from the admin docs into the rest of the admin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8718 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 19:29:16 +00:00
Jacob Kaplan-Moss 0871ff2c9c Fixed #7810: added named URLs for admin docs, and use them in the admin base template. Thanks, MattBowen.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8717 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 19:28:53 +00:00
Jacob Kaplan-Moss 2ca8cf3628 Fixed #8653: make formtools' security hash more rubust. Silly that I didn't think of this before; thanks to bthomas for providing the obvious fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8715 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 19:15:34 +00:00
Malcolm Tredinnick 71076ae299 Fixed some edge-case error handling from [8699]. Thanks, gkelly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 18:12:31 +00:00
Malcolm Tredinnick 3717e3bba3 Reverted #8688 for now, since it merely introduced different bugs, rather than
fixing the problem. We have a plan B (and plan C, if needed), so this will be
fixed in a different way.

Refs #8616.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8707 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 17:32:21 +00:00
Brian Rosner cd0b65bcf7 Fixed #7982 -- Corrected ModelAdmin url dispatching to ensure it matching exactly what it needs and doesn't stomp on primary key space. 'add' is a lost cause for now. This originated from #6470. Thanks jdetaeye for the original patch and basith for providing test cases.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8704 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 16:46:46 +00:00
Jacob Kaplan-Moss 15416a9016 Fixed #7881: Support `__in` lookups in `limit_choices_to` and `raw_id_admin`. Thanks, jamesturk.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8700 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 16:13:17 +00:00
Jacob Kaplan-Moss 21928f2ba0 Fixed #7738: support initial values via `GET` for `SelectMutliple` in the admin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 16:09:29 +00:00
Brian Rosner 89ccbabbfc When a form in the admin has no fields prevent failure.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8698 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 16:07:19 +00:00
Malcolm Tredinnick 02f86a1c7c Fixed #8616 -- Fixed a race condition in the file-based session backend.
Thanks to warren@wandrsmith.net for the patch.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8688 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 01:44:11 +00:00
Jacob Kaplan-Moss a41ca9c9e2 Fixed #8556: added a useful formfield to `CommaSeparatedIntegerField`. gkelly, mattmcc, and kratorius all contributed portions of this patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8682 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28 20:58:10 +00:00
Jacob Kaplan-Moss fe8e00ae06 Fixed #8194: `AdminForm.first_field` now correctly returns the first field when using custom field orders.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28 20:48:59 +00:00
Jacob Kaplan-Moss 0c66bac4f3 Marked a handful of missed strings for translation. Fixes #8644, #8617, and #8610.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8679 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28 20:17:31 +00:00
Jacob Kaplan-Moss 7b65302567 Fixed #8608: corrected doc link in comment 400 error page.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8677 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28 19:46:33 +00:00
Malcolm Tredinnick 65c0846c45 Updated a few save() methods on models to accept force_insert and force_update
parameters. Required as a consequence of [8670] (so they can be used with
create()).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8673 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28 19:28:17 +00:00
Jacob Kaplan-Moss b31568aed3 Fixed #8027: correctly validate fields/fieldsets in `ModelAdmin` validation when using custom `ModelForm`s.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8662 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28 15:43:04 +00:00
Malcolm Tredinnick 4cd03ef5d9 Improvements to [8608] to fix an infinite loop (for exclude(generic_relation)).
Also comes with approximately 67% less stupidity in the table joins for
filtering on generic relations.

Fixed #5937, hopefully for good, this time.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8644 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28 05:00:23 +00:00
Jacob Kaplan-Moss 1abfb1df19 Fixed #8276: corrected another couple of names in localflavor.pl.forms. Patch by Piotr Lewandowski.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8643 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 23:05:25 +00:00
Jacob Kaplan-Moss 08024e9503 Fixed #8601: a small typo in comment views.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8642 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 22:55:10 +00:00
Jacob Kaplan-Moss 1106c558b1 Fixed #8544: correctly cast `Comment.object_pk` to string when doing lookups. This really only papers over a bigger problem related to casting the RHS of GFKs, but that larger change can wait for a more systematic fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8641 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 22:51:24 +00:00
Malcolm Tredinnick ee28560997 Fixed #8311 -- Avoid an infinite loop with session key generation when using
the cache backend and memcached goes away (or is not running).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8620 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 08:58:51 +00:00
Malcolm Tredinnick ec8848dad5 Fixed #8589 -- Fixed the URL for the logout link on the app_index page in admin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8617 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 07:27:09 +00:00
Gary Wilson Jr c2ba59fc1d Removed oldforms, validators, and related code:
* Removed `Manipulator`, `AutomaticManipulator`, and related classes.
 * Removed oldforms specific bits from model fields:
   * Removed `validator_list` and `core` arguments from constructors.
   * Removed the methods:
     * `get_manipulator_field_names`
     * `get_manipulator_field_objs`
     * `get_manipulator_fields`
     * `get_manipulator_new_data`
     * `prepare_field_objs_and_params`
     * `get_follow`
   * Renamed `flatten_data` method to `value_to_string` for better alignment with its use by the serialization framework, which was the only remaining code using `flatten_data`.
 * Removed oldforms methods from `django.db.models.Options` class: `get_followed_related_objects`, `get_data_holders`, `get_follow`, and `has_field_type`.
 * Removed oldforms-admin specific options from `django.db.models.fields.related` classes: `num_in_admin`, `min_num_in_admin`, `max_num_in_admin`, `num_extra_on_change`, and `edit_inline`.
 * Serialization framework
   * `Serializer.get_string_value` now calls the model fields' renamed `value_to_string` methods.
   * Removed a special-casing of `models.DateTimeField` in `core.serializers.base.Serializer.get_string_value` that's handled by `django.db.models.fields.DateTimeField.value_to_string`.
 * Removed `django.core.validators`:
   * Moved `ValidationError` exception to `django.core.exceptions`.
   * For the couple places that were using validators, brought over the necessary code to maintain the same functionality.
 * Introduced a SlugField form field for validation and to compliment the SlugField model field (refs #8040).
 * Removed an oldforms-style model creation hack (refs #2160).

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8616 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 07:19:44 +00:00
Malcolm Tredinnick c305471610 Fixed get_absolute_url() for comments. Previously, it relied on "view on site"
for admin being reversible or required people to set up their own version. Now
we ship a default pattern in the comments URLs in a way that is unlikely to
clash with anything else.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8614 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 07:04:58 +00:00
Malcolm Tredinnick 157dbe2fff Fixed #8552 -- Use the LOGIN_REDIRECT_URL setting in the auth tests, rather than hard-coding the value.
This enables things to work properly when installed in other configurations.
Patch from aeby.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8613 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 06:02:13 +00:00
Malcolm Tredinnick d70c8907cd Fixed #5937 -- When filtering on generic relations, restrict the target objects to those with the right content type.
This isn't a complete solution to this class of problem, but it will do for
1.0, which only has generic relations as a multicolumn type. A more general
multicolumn solution will be available after that release.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8608 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 05:22:33 +00:00
Malcolm Tredinnick 6e51f05112 Fixed #8577 -- Fixed a couple of indentation errors when viewing the app-index
page in admin. Patch by evenrik.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8607 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 05:22:25 +00:00
Malcolm Tredinnick 8226b8c957 Fixed #8569 -- Ensure that apps are correctly set up before introspecting them
in admin validation.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8605 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 23:06:30 +00:00
Malcolm Tredinnick 255bf69e09 Tweaked the admin validation code to make things a bit easier to read. Tracing
through all the underscore-prefixed and wrapped functions was a bit trying and
some of the names were misleading. No functional changes. Primarily, this is
just bringing the style into line with the rest of the codebase.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8604 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 23:06:24 +00:00
Jacob Kaplan-Moss 70966cb9c7 Fixed #6893: `FormWizard` now properly updates its `step` value. Thanks, siddhi and wamberg.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8603 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 21:33:56 +00:00
Jacob Kaplan-Moss 6056ab1bee Fixed #6209: handle `BooleanField`s in `FormPreview` and `FormWizard`. In the process, broke the the security hash calculation out to a helper function. Thanks to mcroydon and rajeshdhawan.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8597 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 20:19:12 +00:00
Jacob Kaplan-Moss 378f5ddb5a Updated comment signals to provide enough information to actually act on. This was uncovered when working on the documentation, which'll be committed shortly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8589 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 18:53:52 +00:00
Brian Rosner 5dd68fa74a Marked a couple of unmarked strings in edit_inline templates and corrected a marked string.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8587 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 18:15:19 +00:00
Brian Rosner 5a72589d7a Fixed #7984 -- 'View on site' links now work in inlines. Thanks philwo for the report and initial patch by julianb.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8586 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 18:07:36 +00:00
Jacob Kaplan-Moss a516ebdff1 Fixed #8126: improved `admin.autodiscover()` to be more forgiving of invalid `INSTALLED_APPS` entries and/or exotic import schemes that don't have `__path__`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8583 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 16:18:20 +00:00
Malcolm Tredinnick 73afcee6ed Fixed #6101 -- Tweaked a couple of places in the delete-related-objects
collection for the admin so that auto-escaping can do the right thing: not too
many times, not too few. Thanks to Karen Tracey for debugging most of this.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8575 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 07:36:39 +00:00
Malcolm Tredinnick ccb37ce74c The comments app was unconditionally accessing various settings that didn't
exist in Django's global settings. Changed those accesses to conditional
lookups with default fallbacks.

The comment_test tests now pass without needing to add any extra settings.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8573 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 06:58:43 +00:00
Gary Wilson Jr b016ea0ace Removed trailing whitespace in a few files.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8571 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 04:55:56 +00:00
Justin Bronn 5485e0d97f Fixes for Geo sitemap errata.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8566 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 00:46:30 +00:00
Justin Bronn 8a88379b2a Fixed the `GeometryField` form to catch more than just GEOS exceptions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8565 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 00:34:34 +00:00
Jacob Kaplan-Moss cba91997a2 Refactored Django's comment system.
Much of this work was done by Thejaswi Puthraya as part of Google's Summer of Code project; much thanks to him for the work, and to them for the program.

This is a backwards-incompatible change; see the upgrading guide in docs/ref/contrib/comments/upgrade.txt for instructions if you were using the old comments system.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8557 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 22:14:22 +00:00
Brian Rosner 853f4d29b8 Fixed #8547 -- Corrected the breadcrumb display in the object_history.html template. Thanks sorl for catching this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8555 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 19:56:14 +00:00
Brian Rosner 834ce902c2 Fixed #8499 -- Corrected a couple of instances of where the CSS class name error should be errors. Thanks rmyers for catching this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8554 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 19:29:13 +00:00
Jacob Kaplan-Moss 744d882110 Fixed #8425: removed the independant nations of Palau, Marshall Islands, and Micronesia from localflavor's list of US states.
...

Man, commit messages like that are incredibly fun to write.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8550 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 19:11:41 +00:00
Jacob Kaplan-Moss ab7eabfcd1 Fixed #8519: report the correct class in databrowse's `AlreadyRegistered` error. Thanks, mattmcc.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8547 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 18:32:26 +00:00
Jacob Kaplan-Moss 78d13fb1c2 Fixed #8379: the admin user change form now properly validates the username. Thanks, kratorius.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8544 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 17:10:20 +00:00
Jacob Kaplan-Moss 9a1e4cedde Fixed #8344: make User.get_profile() work when settings.AUTH_PROFILE_MODULE is unset.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8543 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 16:56:59 +00:00
Jacob Kaplan-Moss 15ed0d65b0 Fixed #7833: the user creation form now works when password1 isn't set.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8542 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 16:55:57 +00:00
Brian Rosner de977c8514 Fixed #8522 -- Allow app_index to take extra_context to be consistent with the other views in the admin. Thanks Jannis Leidel for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8529 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 03:55:47 +00:00
Brian Rosner 072083f261 Fixed #8520 -- Corrected a dumb typo in the call to password_change in django/contrib/admin/sites.py. Thanks Karen Tracey for catching this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8523 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-24 22:45:35 +00:00
Russell Keith-Magee 78c2c95ed3 Fixed #8129: Modified the password reset email template to use a URL lookup, so that the email doesn't require customization based on the way that the reset view is deployed. Thanks to davenaff for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8517 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-24 08:51:33 +00:00
Russell Keith-Magee 96d12748a9 Added app_label to the context for the add user admin view.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-24 06:46:53 +00:00
Russell Keith-Magee 27b0077a48 Fixed #8509: Cleaned up handling of test cookies in admin logins. Thanks to rajeshd for the report of a problem case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8509 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-24 06:34:18 +00:00
Malcolm Tredinnick 213f294638 Avoid a crash when unencoding session data for the db backend. This is required
because some configurations of MySQL (with utf8_bin collation) will return
bytestring, rather than unicode data, which was causing problems previously.

Refs #8340.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8507 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 22:59:04 +00:00
Malcolm Tredinnick b3688e8194 Fixed #7903 -- Allow admin's prepopulated_from to work with TextFields. Patch
from mk and Alex Gaynor.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8505 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 22:10:45 +00:00
Malcolm Tredinnick aa78a05e69 Fixed #8359 -- Add an admin log entry when creating a new user.
Patch from evan_schulz.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8503 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 21:45:36 +00:00
Justin Bronn 712bb0dde7 Fixed KML sitemaps, and added support for generating KMZ and GeoRSS sitemaps; sitemaps now support Google's Geo Sitemap format.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8502 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 19:22:23 +00:00
Malcolm Tredinnick c83a96d298 Tweaked the Admin add/change page so that "save" is still the highlighted
too look like the default button and it actually operates as the defaut
(previously "save and add another" was the default action, which confused
people if you hit the save button and it looked like your work was eaten by a
grue).

Fixed #7272. Patch from Jannis Leidel.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8501 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 19:07:49 +00:00
Malcolm Tredinnick abb1c508cc Tests for password change process. Thanks, Mike Richardson. Fixed #8402.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8497 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 18:20:49 +00:00
Malcolm Tredinnick cc95b44547 Updated password change template (in admin templates) to use current form
variables (rather than oldforms stuff). Patch from Mike Richardson. Refs #8402.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8496 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 18:20:19 +00:00
Brian Rosner 0511435a33 Fixed #8498 -- Add the ability to customize the template for app_index similar to the other views on the AdminSite class. Thanks Jannis Leidel for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8487 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 16:27:12 +00:00
Russell Keith-Magee 358ba07166 Fixed #7946: Modified object history template to use a common date format. Thanks to Marc Garcia for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8485 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 14:23:50 +00:00
Russell Keith-Magee a9ee1d4e28 Fixed #7776: Ensured that the test cookie is always deleted once a login has succeeded. Thanks for the report and fix, Mnewman.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8484 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 14:12:58 +00:00
Justin Bronn a0e87b771b Fixed #8465. Mark KML input as safe so elements aren't escaped; added some defaults for name and description.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8480 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 07:06:30 +00:00
Brian Rosner 58c579b005 Fixed #8367 -- Pass the object to get_form from get_fieldsets in ModelAdmin. Thanks jarrow for catching this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8479 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 05:05:21 +00:00
Brian Rosner 77c78201b8 Fixed #1390 -- Added an app index in the admin interface. Thanks juliae and ext for their work on patches.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8474 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 04:00:15 +00:00
Brian Rosner ab26efc952 Fixed #8493 -- Fixed a NoReverseMatch when redirecting to password_change/done/ in the admin. Added the ability to override redirects to other password change views for consistency. Thanks for the report mtrichardson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8473 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 03:26:01 +00:00
Brian Rosner 1b8b9686fa Fixed #7947 -- Handle the display of OneToOneField in model forms correctly. Thanks tyson for the report and original patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8469 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-22 19:27:26 +00:00
Malcolm Tredinnick c8c159cbba When logging in, change the session key whilst preserving any existing
sesssion. This means the user will see their session preserved across a login
boundary, but somebody snooping the anonymous session key won't be able to view
the authenticated session data.

This is the final piece of the session key handling changes.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8459 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-21 13:54:53 +00:00
Malcolm Tredinnick d05d724165 Fixed #8376 -- Use request.path and request.path_info at the right moments when
serving data in the flatpage middleware. Patch from jcassee.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8457 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-21 01:40:22 +00:00
Malcolm Tredinnick eb85af1865 Fixed #8457 -- Fixed a missing import.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8451 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-20 21:12:45 +00:00
Malcolm Tredinnick ba937e55ae Fixed #8415 -- Fixed a typo in the localflavor for the Netherlands. Thanks,
Niels Poppe.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8443 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-19 20:27:41 +00:00
Justin Bronn 463b325cb6 GeoDjango users may now use `django.contrib.gis.tests.run_tests` for their `TEST_RUNNER` so that a testing spatial database is properly created; the GeoDjango test suite runner is renamed to `run_gis_tests`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8434 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-18 15:58:29 +00:00