Claude Paroz
0e01023897
Converted more test assertions to assert[Not]Contains.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17910 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-14 13:35:25 +00:00
Claude Paroz
5c53e30607
Fixed #18035 -- Removed deprecated AdminMediaHandler, as per official deprecation timeline. Thanks Jannis Leidel and Ramiro Morales for the review.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17879 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-08 21:13:32 +00:00
Claude Paroz
9383a2761c
Removed with_statement imports, useless in Python >= 2.6. Refs #17965 . Thanks jonash for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30 08:02:08 +00:00
Julien Phalip
399aa72330
Enabled the existing admin Selenium tests to be run with Internet Explorer. Note that some tweaks had to be made, in particular as IE7 has limited capabilities regarding CSS selectors.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17666 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-05 08:13:09 +00:00
Julien Phalip
794fe19e19
Made the Selenium tests for the admin horizontal/vertical filter widgets a bit more thorough.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17649 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-04 04:50:58 +00:00
Julien Phalip
4dca9d166a
Added more thorough Selenium tests for the admin horizontal/vertical filter widgets.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17648 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-04 01:20:03 +00:00
Julien Phalip
f2de5f4cab
Added some Selenium tests for the admin's filter_horizontal and filter_vertical widgets. Ref #13614 , #15220 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17579 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-23 08:07:07 +00:00
Julien Phalip
a65eed3942
Enabled the admin selenium tests to run on Chrome.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17574 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-22 07:14:10 +00:00
Carl Meyer
844a24bbb9
Fixed #16921 -- Added assertHTMLEqual and assertHTMLNotEqual assertions, and converted Django tests to use them where appropriate. Thanks Greg Müllegger.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17414 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-31 20:36:11 +00:00
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
Julien Phalip
5c9901323e
Fixed #12073 -- Made `AdminDateWidget` and `AdminTimeWidget` consider user-supplied `attrs`. Thanks to elliss for the report and to koenb for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17125 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20 11:12:37 +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
Ramiro Morales
26b8122087
Fixed #14675 -- Completed removal of `from django.conf.urls.default import *` usage.
...
This applies to both our own [test] code and documentation examples. Also:
* Moved the functions and handlers from `django.conf.urls.defaults` up to
`django.conf.urls` deprecating the former module.
* Added documentation for `handler403`.
* Tweaked the URLs topic document a bit.
Thanks to pupeno and cdestigter for their great work contributing patches.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 22:36:16 +00:00
Jannis Leidel
bce890ace4
Fixed #16584 -- Fixed a bunch of typos in code comments. Thanks, Bernhard Essl.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16598 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:14:15 +00:00
Ramiro Morales
290d7d4d21
Fixed #16542 -- Made Raw ID form widgets shipped with the admin app render the related object lookup tool only when the related model is effectively registered with the AdminSite.
...
Also, converted these widgets to reverse named URLs instead of hard-coded '../../...'-style links, refs #15294 .
Thanks Florian Apolloner for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16578 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-01 23:38:11 +00:00
Jannis Leidel
38a2444277
Fixed #16050 -- BACKWARDS-INCOMPATIBLE CHANGE: Moved static files of the admin to conventional file system location.
...
This also removes the need for ADMIN_MEDIA_PREFIX and replaces it with the convention to find admin's static files at STATIC_URL + 'admin/'.
Thanks to Jacob for the review and general help.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16487 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-30 09:06:19 +00:00
Jannis Leidel
b0d274dbd5
Added missing future imports missed in r16167.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16169 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-06 19:49:06 +00:00
Jannis Leidel
7dd72360a2
Make use of new translation and settings context manager in the tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16167 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-06 13:29:44 +00:00
Jannis Leidel
4da29717fd
Fixed #15673 -- Allow limit_choices_to to use a tuple for __in filters. Thanks, EnTeQuAk.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16078 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-22 12:03:50 +00:00
Russell Keith-Magee
afd040d4d3
Updated test assertions that have been deprecated by the move to unittest2. In summary, this means:
...
assert_ -> assertTrue
assertEquals -> assertEqual
failUnless -> assertTrue
For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 15:04:39 +00:00
Ramiro Morales
accee3961c
Modified wrong expected ClearableFileInput rendering output in a couple of additional tests after fix introduced in [15426]. Refs #14984 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15432 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-05 20:06:49 +00:00
Ramiro Morales
1a2f9ff9f9
Modified a few tests methods to make sure no leaks of activated locale or USE_I10N setting value happen between tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15411 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-04 15:45:52 +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
Alex Gaynor
3498849532
Fixed #14424 -- corrected a NameError when instantiating a RelatedFieldWidgetWrapper.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14683 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-22 21:55:29 +00:00
Alex Gaynor
2e8bc8f986
Fixed #14454 -- converted admin_widgets tests from doctests to unittests. We have always been at war with doctests. Thanks to prestontimmons for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-15 02:35: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
Jannis Leidel
941e11e54d
Fixed #14363 -- Fixed render method of ManyToManyRawIdWidget to set attrs to an empty dict. Thanks, tyrion and dpn.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-01 02:31:05 +00:00
Jannis Leidel
392d992f82
Fixed #7048 -- Added ClearableFileInput widget to clear file fields. Thanks for report and patch, jarrow and Carl Meyer.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13968 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-01 02:02:58 +00:00
Justin Bronn
9e04c3b744
Fixed #13149 -- The admin `ForeignKeyRawIdWidget` now properly handles non-integer values. Thanks, Chris Adams.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13751 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-11 18:34:40 +00:00
Jannis Leidel
b057a8b247
Fixed #13560 -- Fixed localization of widgets.
...
Particularly this fixes the SplitDateTimeField and the AdminDateWidget by localizating the widget's value in its render method instead of the form field. Thanks to David Danier for the report and Russell for help with the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-21 14:07:54 +00:00
Karen Tracey
f2bc4dd0a9
Fixed #12024 : Changed admin code to avoid raising an exception when a field listed
...
in raw_id_fields has limit_choices_to specified as a Q object.
Tweaked a test to trigger the condition and verify the fix.
Finally, documented that limit_choices_to specified as a Q object has no effect
on the choices available for fields listed in raw_id_fields, and removed another
incorrect note that claimed limit_choices_to had no effect on inlines in the admin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-08 18:32:24 +00:00
Karen Tracey
2890c2295b
Fixed #11465 : Ensure nonexistent pks enterd in an admin raw id field do not
...
cause a server error. Thanks for report and initial patch sacre@wp.pl .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12648 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-02 02:28:49 +00:00
Justin Bronn
eaa17e13e8
Fixed #12705 -- Date/time and select filter widgets now work again with newly added inline forms in the admin.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12454 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-17 18:54:02 +00:00
Russell Keith-Magee
23d3450d5e
Fixed #12378 -- Removed some tests made redundant by feature deprecation. Thanks to jcd for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12418 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-13 12:00:10 +00:00
Jannis Leidel
bf33d3eb1d
Fixed #12444 - Date based widgets now correctly handle input values when using locale-aware formatting. Also fixes #7656 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12029 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-30 22:11:48 +00:00
Russell Keith-Magee
5a235050b6
Fixed #12367 -- Modified test urls to avoid the DeprecationWarning caused by old-style admin inclusions. Thanks to Travis Cline for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-14 11:19:40 +00:00
Russell Keith-Magee
53d16b1175
Fixed #11532 -- Corrected the link used for edit_inline foreign keys in admin when the admin is deployed using the old style admin.root approach. Thanks to JP for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11314 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-23 14:31:33 +00:00
Russell Keith-Magee
8d48eaa064
Fixed #10061 -- Added namespacing for named URLs - most importantly, for the admin site, where the absence of this facility was causing problems. Thanks to the many people who contributed to and helped review this patch.
...
This change is backwards incompatible for anyone that is using the named URLs
introduced in [9739]. Any usage of the old admin_XXX names need to be modified
to use the new namespaced format; in many cases this will be as simple as a
search & replace for "admin_" -> "admin:". See the docs for more details on
the new URL names, and the namespace resolution strategy.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-16 16:16:13 +00:00
Jacob Kaplan-Moss
f55f2b9d74
Fixed #10059 : `ModelAdmin.formfield_for_dbfield` now handles custom `Field` subclasses. Thanks, Alex Gaynor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10454 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-08 20:25:56 +00:00
Jacob Kaplan-Moss
4378af21b6
Fixed #10537 : Fixed the foreign key add-another link in list_editable. Thanks, Alex and jezdez.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10235 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 23:16:34 +00:00
Matt Boersma
b120c74032
Changed "date" column to "start_date"--Oracle won't name columns with reserved keywords.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9764 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 21:18:21 +00:00
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
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
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
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
Brian Rosner
38dc472796
Fixed #7250 -- Don't show internal data of a FileField in the admin when the form does not validate. This also alternatively fixes a recent problem since [8244] when the form is not valid. Thanks Marc Garcia for the initial ticket.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8277 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-10 01:07:40 +00:00
Jacob Kaplan-Moss
6185093351
Use a FileField instead of an ImageField in the admin_widgets test so that folks without PIL can still run the tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8255 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 23:06:28 +00:00
Jacob Kaplan-Moss
7899568e01
File storage refactoring, adding far more flexibility to Django's file handling. The new files.txt document has details of the new features.
...
This is a backwards-incompatible change; consult BackwardsIncompatibleChanges for details.
Fixes #3567 , #3621 , #4345 , #5361 , #5655 , #7415 .
Many thanks to Marty Alchin who did the vast majority of this work.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8244 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 20:59:02 +00:00
Brian Rosner
a19ed8aea3
Merged the newforms-admin branch into trunk.
...
This is a backward incompatible change. The admin contrib app has been
refactored. The newforms module has several improvements including FormSets
and Media definitions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 23:54:34 +00:00