Source

django / tests / regressiontests / admin_widgets / tests.py

The default branch has multiple heads

Author Commit Message Labels Comments Date
Ian Struble
Cleaned up sloppy and fragile empty value check in AutocompleteWidget.render().
Ian Struble
Added initial ChangeList support for ManyToManyField fields (both list_display and list_editable). All m2m fields should still explicitly added to the autocomplete_fields if they are to be displayed in the ChangeList. Squashed another subtle client side bug when initial values were passed as [] instead of None.
Ian Struble
Fixed placement of lookup/search icon when multiple selections are allowed.
Ian Struble
Updated by_id lookups to properly support id other than 'id'. Made the client-side select handler ignore bogus data. This is not the most desirable behavior but it will works. Also updated the server side of the lookups so the select handler should no longer get the bogus data in the first place. Example field configuration that was failing: autocomplete_fields = dict( char_notrequired = dict( queryset = User.objects.all(), …
Ian Struble
Syncing up with the latest and greatest django-trunk.
Al...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Removed all usages of deprecated TestCase methods (self.fail*). This removed most of the Warnings emitted (with -Wall) during the test suite.
Al...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Fixed #14424 -- corrected a NameError when instantiating a RelatedFieldWidgetWrapper.
Ian Struble
Adding search-icon next to autocomplete fields. Also fixed up the way that the dismiss* functions were recording the selected item. The search-icon can be disabled by setting show_search = False class BookAdmin(admin.ModelAdmin): autocomplete_fields = { 'author': { 'fields': ('name',), 'show_search': False }, }
Ian Struble
Made dismissAddAnotherPopup autocomplete aware.
Al...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Fixed #14454 -- converted admin_widgets tests from doctests to unittests. We have always been at war with doctests. Thanks to prestontimmons for the patch.
russ...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
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.
kmtr...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
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.
russ...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Fixed #12378 -- Removed some tests made redundant by feature deprecation. Thanks to jcd for the report.
jez...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Fixed #12444 - Date based widgets now correctly handle input values when using locale-aware formatting. Also fixes #7656.
russ...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
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.
ja...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Fixed #10059: `ModelAdmin.formfield_for_dbfield` now handles custom `Field` subclasses. Thanks, Alex Gaynor.
ja...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Fixed #10537: Fixed the foreign key add-another link in list_editable. Thanks, Alex and jezdez.
mboe...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Changed "date" column to "start_date"--Oracle won't name columns with reserved keywords.
ja...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
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 requ…