Commit Graph

19 Commits

Author SHA1 Message Date
Julien Phalip 2f02a05ffb Fixed #2879 -- Added support for the integration with Selenium and other in-browser testing frameworks. Also added the first Selenium tests for `contrib.admin`. Many thanks to everyone for their contributions and feedback: Mikeal Rogers, Dirk Datzert, mir, Simon G., Almad, Russell Keith-Magee, Denis Golomazov, devin, robertrv, andrewbadr, Idan Gazit, voidspace, Tom Christie, hjwp2, Adam Nelson, Jannis Leidel, Anssi Kääriäinen, Preston Holmes, Bruno Renié and Jacob Kaplan-Moss.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 08:33:58 +00:00
Ramiro Morales ab72e6bdd1 Tweaked a tests tweak from r16960 so it uses the right model.
When testing for permission enforcement in the admin for m2m
relationships we were erroneously using the ID of the related model
instead of using the ID of the corresponding automatically created
intermediate model. This manifested as a failure under Oracle but can
fail with any backend if the IDs of both models diverge.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17001 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-17 02:11:12 +00:00
Alex Gaynor d362c1546f Convert much of the regression tests to use absolute imports. There's still work to be done though.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16976 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 18:51:33 +00:00
Carl Meyer 8b801a7553 Fixed some tests from r16934 to be auto-id-independent.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16960 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-11 21:55:45 +00:00
Carl Meyer b1b1da1eac Fixed #8060 - Added permissions-checking for admin inlines. Thanks p.patruno for report and Stephan Jaensch for work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16934 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-07 00:41:25 +00:00
Carl Meyer 09a01435de Fixed #16838 -- Corrected broken add-another inline JS in admin with related_name="+". Thanks jamesp for report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16860 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-21 14:00:58 +00:00
Ramiro Morales 7b21bfc074 Improved test isolation of the admin tests and assigned custom admin sites to
prevent test order dependant failures.

This involves introducing usage of `TestCase.urls` and implementing proper
admin.py modules for some of the test apps.

Thanks Florian Apolloner for finding the issue and contributing the patch.

Refs #15294 (it solves these problems so the fix for that ticket we are going
to commit doesn't introduce obscure and hard to reproduce test failures when
running the Django test suite.)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16856 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-20 18:16:49 +00:00
Julien Phalip 3e65f9633b Further improved on the work done in r16622 by making the help text icons look hoverable in the admin tabular inline headers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-26 04:36:31 +00:00
Jannis Leidel 7d782e51c1 Fixed #8190 -- Added support for a field's help text to the tabular admin inline. Thanks, Julien Phalip and Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16622 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-17 14:12:25 +00:00
Ramiro Morales 0a9b5d7ade Fixed #15424 -- Corrected lookup of callables listed in admin inlines' `readonly_fields` by passing the right ModelAdmin (sub)class instance when instantiating inline forms admin wrappers. Also, added early validation of its elements. Thanks kmike for the report and Karen for the patch fixing the issue.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15650 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-26 01:44:41 +00:00
Ramiro Morales 337d102b86 Fixed #13510 -- Corrected colspan of non-field-specific error messages in admin app tabular inlines so it isn't greater than the actual number of field cells. Thanks KyleMac for the report and Julien Phalip for the patch fixing the issue.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15626 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-22 03:07:57 +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
Russell Keith-Magee 856a9e953b Migrated admin_inlines doctest. Thanks to Sebastian Hillig.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13880 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-27 15:11:03 +00:00
Russell Keith-Magee dd07c23545 Fixed #12749 -- Corrected a problem with validation of inline primary keys. Thanks to Chris.Wesseling@cwi.nl for the report, and nessita for the test case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13034 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-27 15:05:38 +00:00
Russell Keith-Magee 2f9eef1227 Fixed #13407 -- Corrected verbose names for autogenerated m2m models, and cleaned up the default form prefix when an autogenerated m2m through model is used in a formset. Thanks to carljm for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13029 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-27 12:35:49 +00:00
Gary Wilson Jr 84de614529 Fixed #13174 -- Fixed missing field label for `readonly_fields` when used in `StackedInline`, thanks to benc for the report and ptone for the investigation and initial patch.
* Corrected `InlineAdminForm.__init__` to pass along `model_admin` parameter in `super` call.
 * Lookup the field label in the form's model, not the `model_admin` model.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@12857 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-26 23:38:05 +00:00
Jannis Leidel 3f4fef432b Fixed #12778 - Added media handling abilities to admin inlines. Thanks for the patch, pmclanahan.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12825 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-21 01:54:00 +00:00
Joseph Kocherhans f2d5582c53 Fixed #12561. InlineAdmin now respects can_delete=False. Thanks, nessita.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12533 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 17:14:50 +00:00
Russell Keith-Magee 80a54dd23b Fixed #9362 -- Prevented inline forms from overwriting the content_type_id attribute on objets being inlined. Thanks to carljm for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10667 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-03 13:38:36 +00:00