Commit Graph

103 Commits

Author SHA1 Message Date
Ramiro Morales 1c56af676d Added tests demonstrating that filtering lookup expression that involve model with inheritance schemes aren't incorrectly blacklisted by the r15031 security fix. Refs. #15032.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15178 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-12 23:30:47 +00:00
Russell Keith-Magee 6bd8c14be9 Fixed #14999 -- Ensure that filters on local fields are allowed, and aren't caught as a security problem. Thanks to medhat for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-03 13:56:31 +00:00
Ramiro Morales 0f783b7f4e Fixed #2986 -- Made the JavaScript code that drives related model instance addition in a popup window handle a model representation containing new lines. Also, moved the escapejs functionality yoo django.utils.html so it can be used from Python code. Thanks andrewwatts for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-02 17:34:52 +00:00
Jannis Leidel 7a89d3d503 Fixed #11700 -- Stopped admin actions and list_editable fields to show up in popups. Thanks to Simon Meers for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15129 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-02 01:32:40 +00:00
Alex Gaynor 732198ed5c Fix a security issue in the admin. Disclosure and new release forthcoming.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15031 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-23 03:44:38 +00:00
Jannis Leidel 2c2209b473 Fixed #13607 -- Auto-initialize admin's date hierarchy links intelligently. Thanks, Simon Meers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14879 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 22:54:50 +00:00
Alex Gaynor 5bc0ec4ec4 Removed all usages of deprecated TestCase methods (self.fail*). This removed most of the Warnings emitted (with -Wall) during the test suite.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04 07:28:12 +00:00
Jannis Leidel cc64fb5c4b Fixed #8342 -- Removed code from the admin that assumed that you can't login with an email address (nixed by r12634). Also refactored login code slightly to be DRY by using more of auth app's forms and views.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14769 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-02 00:44:35 +00:00
Honza Král dc334a2ba8 Fixed #3400 -- Support for lookup separator with list_filter admin option. Thanks to DrMeers and vitek_pliska for the patch!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14674 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21 19:29:15 +00:00
Alex Gaynor 274aba3b9b Fixed #11108 -- added ModelAdmin.delete_model, a hook with which to perform custom pre-post delete behavior. Thanks to Florian Apolloner for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14673 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21 19:00:40 +00:00
Ramiro Morales 0e26f58dae Corrected change in behavior regarding the page shown after the 'Save' button is pressed when adding a user through the admin.
It had been introduced in trunk (r13503) and between 1.2.1 and 1.2.2 (r13504). The original fix intended to correct a similar problem introduced between 1.1 and 1.2 (r12218) this time in the 'Save and add another' button.
We have now tests for the three buttons present in the Add User admin form to avoid future regressions.
Thanks to Juan Pedro Fisanotti and Cesar H. Roldan for their work.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14628 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-19 22:45:51 +00:00
Russell Keith-Magee 121d2e3678 Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 12:55:17 +00:00
Ramiro Morales d084439c41 Fixed #12650 -- Don't generate invalid XHTML in the admin, databrowse apps when
the i18n context processor is active. Thanks to Rob Hudson for the report and
fix suggestion.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14104 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-10 01:57:56 +00:00
Karen Tracey 506d559876 Adjust AdminDocTests to run after r13728. Also match comments to tests and add test that was there in comment form only.Refs #3695.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13737 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-11 00:02:33 +00:00
Malcolm Tredinnick 30610719d5 Adding related objects in the admin (via popup) respects user
permissions. Patch from SmileyChris. Fixed #1035.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13708 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-10 16:56:36 +00:00
Luke Plant ef4b29a001 Fixed #13081 - Admin actions lose get-parameters in changelist view
Thanks to joh for report and to SmileyChris for patch.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@13696 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-07 20:55:53 +00:00
Russell Keith-Magee a352154e42 Fixed #14123 -- Made AdminDocs tests optional, based on the availability of docutils. Thanks to PaulM for the original report, and Łukasz Rekucki for narrowing down the cause.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13606 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-19 13:11:24 +00:00
Russell Keith-Magee 7e52bb2bc3 Fixed #13796 -- Ensure that builtin tags and filters are included in admin documentation views.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13588 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-14 13:41:56 +00:00
Russell Keith-Magee cefee67b7d Fixed #14014 -- Ensure that the "save and add another" button for users actually does what it says. Thanks to Ramiro for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13503 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-06 16:08:40 +00:00
Russell Keith-Magee 2ab3b52d2a Fixed #14012 -- Corrected the handling of the create user popup dialog in the admin. Thanks to gk@lka.hu for the report, and Ramiro Morales for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13501 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-06 14:58:05 +00:00
Russell Keith-Magee 21e84194b5 Fixed #13514 -- Corrected the process of loading multiple javascript translation catalogs. Thanks to jtiai for the report, to Ramiro Morales for working out the test case, and to Ramiro and Jannis for their help on the fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-13 13:29:31 +00:00
Jannis Leidel cce32a9b09 Fixed #13166 - Added JavaScript warnings to admin changelist to help against ambiguity between action and list_editable form submission. Thanks to blinkylights and aaugustin for the report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13072 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-02 23:02:16 +00:00
Jannis Leidel 43bf086783 Fixed #13388 - Refined changes made in r12384 in the JavaScript i18n admin view.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13069 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-02 19:46:31 +00:00
Jannis Leidel c3dbe9d509 Fixed #13361 - Made sure jQuery is always included in the admin changelist and changeform. Thanks to Carl Meyer for report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12997 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-19 10:16:25 +00:00
Jannis Leidel 31f7ff1518 Fixed #12903 - Made translating the admin action selection text easier. Thanks to Ramiro Morales for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12968 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-13 10:29:19 +00:00
Russell Keith-Magee faceca7075 Fixed #13301 -- Corrected problem with capitalization of changelist row headers in admin. Thanks to emyller for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12947 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-11 08:35:04 +00:00
Russell Keith-Magee f4c76fb604 Fixed #13298 -- Modified test assertion to ensure that javascript variables aren't mistakenly identified as <input> HTML tags. Thanks to mk for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12946 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-11 06:58:33 +00:00
Russell Keith-Magee 90d112785b Fixed #13038 -- Ensured that readonly fields in the admin have their name added as a CSS class. Thanks to andybak for the report, and javimansilla, fisadev and fgallina for their work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12922 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-05 15:37:43 +00:00
Russell Keith-Magee c421a4fd92 Fixed #11949 -- Added a hook to allow ModelAdmin customization of the delete selected template. Thanks to bendavis78 for the report and patch, and Ramiro Morales for his cleanup work.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12916 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-05 12:02:27 +00:00
Karen Tracey f88c2f16e8 Fixed #13004: Ensure the add page for a model with a ManyToManyField specified
in readonly_fields does not raise an exception. Thanks hejsan, mlavin, copelco.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@12827 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-21 14:23:25 +00:00
Karen Tracey 4528f39886 Fixed #12962: Made admin delete action work again. Thanks ptone, skevy, mlavin and anyone else I've missed.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12813 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-20 14:53:17 +00:00
Karen Tracey 883329ecb3 Fixed #12105: Corrected handling of isnull=False lookups in admin. Thanks marcob, Travis Cline, gabrielhurley.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12795 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-16 19:01:40 +00:00
Karen Tracey cc6e9b2286 Fixed #12434: Made pretty_name handle empty string and None as input. Thanks ales_zoulek and gabrielhurley.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12794 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-16 16:10:27 +00:00
James Bennett 3b7545f3f8 Clean up a stray debugging print from [12746].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12747 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-10 08:40:45 +00:00
James Bennett a0c77ada99 Ensure that NullBooleanField displays the appropriate icon for null values in admin changelists. Refs #13071.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12746 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-10 08:37:17 +00:00
Karen Tracey 6d7754ba03 Fixed #11710: Made a small test change to ensure utf-8 bytestrings in
verbose_names don't cause a server error when the admin change log message is
built. The necessary code fix was made for #12966 in r12627.  Thanks Rupe.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@12650 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-02 03:28:48 +00:00
Jannis Leidel 647651698f Fixed test of the admin actions selection counter for changes made in r12626. Thanks for the report, Eric Holscher.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12633 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-01 18:58:54 +00:00
Russell Keith-Magee 0ff624a3cb Added file omitted from r12598.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12599 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-26 13:22:52 +00:00
Russell Keith-Magee e12b3199d0 Fixed #6191, #11296 -- Modified the admin deletion confirmation page to use the same object collection scheme as the actual deletion. This ensures that all objects that may be deleted are actually deleted, and that cyclic display problems are avoided. Thanks to carljm for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12598 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-26 13:17:43 +00:00
Joseph Kocherhans ea3853e8d2 Fixed #12878. Formset-wide errors are now rendered properly as html.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 20:55:42 +00:00
Joseph Kocherhans 7aeb37d610 Fixed #12707. Admin action messages are no longer displayed when submitting list_editable content. Thanks, copelco.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12525 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 14:48:15 +00:00
Jannis Leidel 342517000c Added missing tests for fix committed in r12398. Thanks Karen for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12448 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-16 12:17:37 +00:00
Jannis Leidel 9555f2be9d Fixed #12692 - Properly handle the extra clause of admin inline formsets. Also fixes #12703, second error.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12369 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-01 14:14:56 +00:00
Russell Keith-Magee 65b6080da2 Fixed #12703 -- Corrected a test suite failure in the admin_views tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12308 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-27 14:18:50 +00:00
Jannis Leidel c4470e5ced Make use of new ability to override admin add form templates and removed a litle bit of redundancy in the templates.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12218 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-12 23:35:29 +00:00
Jannis Leidel a205691979 Fixed #8933 - Allow more admin templates to be overridden.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12217 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-12 23:34:46 +00:00
Jannis Leidel 31f3a8c1ad Fixed #10640 - Adds a add_form_template option to ModelAdmin. Thanks jcsackett.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12216 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-12 23:34:03 +00:00
Joseph Kocherhans 2f9853b2dc Fixed #12512. Changed ModelForm to stop performing model validation on fields that are not part of the form. Thanks, Honza Kral and Ivan Sagalaev.
This reverts some admin and test changes from [12098] and also fixes #12507, #12520, #12552 and #12553.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-12 02:29:45 +00:00
Adrian Holovaty 91d9108f6e Removed unnecessary debugging statement in admin_views regression test
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12177 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10 18:03:36 +00:00
Adrian Holovaty 19b72077f7 Fixed #8049 -- Fixed inconsistency in admin site is_active checks. Thanks for patch and tests, isagalaev
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12159 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10 16:51:13 +00:00