Source

django / tests / regressiontests / admin_widgets / models.py

The default branch has multiple heads

Author Commit Message Labels Comments Date
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
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(), …
Al...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Fixed #14424 -- corrected a NameError when instantiating a RelatedFieldWidgetWrapper.
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.
jez...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Fixed #14363 -- Fixed render method of ManyToManyRawIdWidget to set attrs to an empty dict. Thanks, tyrion and dpn.
jez...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Fixed #7048 -- Added ClearableFileInput widget to clear file fields. Thanks for report and patch, jarrow and Carl Meyer.
jez...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
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.
kmtr...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
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.
jbr...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Fixed #12705 -- Date/time and select filter widgets now work again with newly added inline forms in the admin.
jez...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Fixed #12444 - Date based widgets now correctly handle input values when using locale-aware formatting. Also fixes #7656.
ja...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Fixed #10059: `ModelAdmin.formfield_for_dbfield` now handles custom `Field` subclasses. Thanks, Alex Gaynor.
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…
bro...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Fixed #9258 -- Use _default_manager in ForeignKeyRawIdWidget.label_for_value. Thanks nullie for the patch.
bro...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Fixed #8787 -- Fixed failing admin_widgets tests. This fixes ManyToManyRawIdWidget which was broken with [8823]. Thanks Alex Gaynor.
bro...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Fixed #8648 -- Admin no longer ignores to_field. Thanks for the help Karen Tracey and SmileyChris.
bro...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
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.
ja...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Use a FileField instead of an ImageField in the admin_widgets test so that folks without PIL can still run the tests.
ja...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
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.
bro...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
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.