summaryrefslogtreecommitdiff
path: root/tests/regressiontests/admin_views/models.py
AgeCommit message (Collapse)Author
2010-08-09[soc2010/query-refactor] Merged up to trunk r13556, resolved merge conflictsarchive/soc2010/query-refactorAlex Gaynor
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/query-refactor@13565 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-11Fixed #13301 -- Corrected problem with capitalization of changelist row ↵Russell Keith-Magee
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-05Fixed #11949 -- Added a hook to allow ModelAdmin customization of the delete ↵Russell Keith-Magee
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-03-21Fixed #13004: Ensure the add page for a model with a ManyToManyField specifiedKaren Tracey
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-16Fixed #12105: Corrected handling of isnull=False lookups in admin. Thanks ↵Karen Tracey
marcob, Travis Cline, gabrielhurley. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12795 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-16Fixed #12434: Made pretty_name handle empty string and None as input. Thanks ↵Karen Tracey
ales_zoulek and gabrielhurley. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12794 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-10Ensure that NullBooleanField displays the appropriate icon for null values ↵James Bennett
in admin changelists. Refs #13071. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12746 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-02Fixed #11710: Made a small test change to ensure utf-8 bytestrings inKaren Tracey
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-02-26Fixed #6191, #11296 -- Modified the admin deletion confirmation page to use ↵Russell Keith-Magee
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-16Added missing tests for fix committed in r12398. Thanks Karen for the report.Jannis Leidel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12448 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-12Fixed #10640 - Adds a add_form_template option to ModelAdmin. Thanks jcsackett.Jannis Leidel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12216 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22Fixed #342 -- added readonly_fields to ModelAdmin. Thanks Alex Gaynor for ↵Brian Rosner
bootstrapping the patch. ModelAdmin has been given a readonly_fields that allow field and calculated values to be displayed alongside editable fields. This works on model add/change pages and inlines. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11965 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-18Fixed #9749 - Added hook to ModelAdmin for specifying custom ChangeLists. ↵Jannis Leidel
Thanks to David Larlet and Eric Florenzano. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11910 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-03Fixed #10922 -- Corrected handling of POST data to ensure that the right ↵Russell Keith-Magee
objects are updated on save when the ordering field is editable. Thanks to Alex Gaynor, Karen Tracy, and Will Hardy for their contributions to this patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11160 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-09Fixed #11042 -- Corrected admin inlines for inherited models. Thanks to ↵Russell Keith-Magee
jsmullyan for the report, and mir for helpful triage work. Patch includes regression test for #8093, and a commented out test for #10992. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10725 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08Fixed #10448: correcting errors on "save as new" now correctly create a new ↵Jacob Kaplan-Moss
object instead of modifying the old one. Thanks, bastih. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10713 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07Fixed #10516 -- Corrected admin search when the search_fields definition ↵Russell Keith-Magee
contains multiple fields on the same base model. Thanks to Zain Memon for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10684 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07Fixed #10893 -- Corrected a problem with using list_editable in the admin ↵Russell Keith-Magee
when the model has a manual primary key. Thanks to Alex Gaynor for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-18Fixed #10799: fixed the use of list_editable with model inheritance and ↵Jacob Kaplan-Moss
custom one-to-one parent links. Thanks, Alex Gaynor. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-18Fixed #10002: inline file uploads now correctly display prior data. Thanks, ↵Jacob Kaplan-Moss
dgouldin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10588 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-11Fixed #10645 -- Added some robustness around some admin and modelform params.Malcolm Tredinnick
Fieldset dictionary names, search fields and unique_together attribute names all have to be convertible to strings (that has always been true). If somebody passes in a unicode object, Python barfs because Django uses those values as keyword argument names and function calls require parameter names to be str objects. We now convert thing to strs automatically. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-06Made a bunch of improvements to admin actions. Be warned: this includes one ↵Jacob Kaplan-Moss
minor but BACKWARDS-INCOMPATIBLE change. These changes are: * BACKWARDS-INCOMPATIBLE CHANGE: action functions and action methods now share the same signature: `(modeladmin, request, queryset)`. Actions defined as methods stay the same, but if you've defined an action as a standalone function you'll now need to add that first `modeladmin` argument. * The delete selected action is now a standalone function registered site-wide; this makes disabling it easy. * Fixed #10596: there are now official, documented `AdminSite` APIs for dealing with actions, including a method to disable global actions. You can still re-enable globally-disabled actions on a case-by-case basis. * Fixed #10595: you can now disable actions for a particular `ModelAdmin` by setting `actions` to `None`. * Fixed #10734: actions are now sorted (by name). * Fixed #10618: the action is now taken from the form whose "submit" button you clicked, not arbitrarily the last form on the page. * All of the above is documented and tested. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10408 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-02Fixed #9651: fixed save_as with inline forms. Thanks, kmike and Mnewman.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10353 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01Fixed #9969: choices with options groups (added in [7977]) now work ↵Jacob Kaplan-Moss
correctly in the admin with list_display and list_filter. Thanks, ramiro. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10318 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01Fixed #7510: the ModelAdmin now uses `self.queryset` instead of the default ↵Jacob Kaplan-Moss
manager. Thanks, Alex Gaynor. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10314 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31Fixed #9863. A ForeignKey with editable=False to the parent in an inline no ↵Joseph Kocherhans
longer raises an exception. Thanks to keithb for the test case and Alex Gaynor for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10239 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-29Fixed #10622 -- Resolved an issue with model inheritence and list_editable. ↵Brian Rosner
Thanks oyvind and Alex Gaynor. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10178 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-23Fixed #10505: added support for bulk admin actions, including a ↵Jacob Kaplan-Moss
globally-available "delete selected" action. See the documentation for details. This work started life as Brian Beck's "django-batchadmin." It was rewritten for inclusion in Django by Alex Gaynor, Jannis Leidel (jezdez), and Martin Mahner (bartTC). Thanks, guys! git-svn-id: http://code.djangoproject.com/svn/django/trunk@10121 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-17Fixed #8939: added a `list_editable` option to `ModelAdmin`; fields declared ↵Jacob Kaplan-Moss
`list_editable` may be edited, in bulk, on the changelist page. Thanks, Alex Gaynor. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10077 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10Fixed #10271, #10281 -- Fixed the handling multiple inline models that ↵Russell Keith-Magee
share a common base class and have the link to the inline parent on the base class. Includes modifications that allow the equivalent handling for GenericFields. Thanks to Idan Gazit, Antti Kaihola (akaihola), and Alex Gaynor for their work on this patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10017 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-16Follow-up to r9656 -- beef up the added test to exercise all (one can hope) ↵Karen Tracey
paths through the troublesome get_deleted_objects function and fix the resulting errors. Refs #9859. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9657 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-16Fixed #9859 -- Added another missing force_unicode needed in admin when ↵Karen Tracey
running on Python 2.3. Many thanks for report & patch to nfg. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9656 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-21Fixed #3096 -- Make admin list_filters respect limit_choices_to.Karen Tracey
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08Fixed #9053 -- Allowed for sorting of callable and ModelAdmin methods ↵Karen Tracey
specified in list_display (added in r8352). Previously attempting to sort on the former would raise an exception and the latter simply didn't sort. Also added tests for this function. Thanks rgl and jenan. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-09Fixed #5780 -- Adjusted the ModelAdmin API to allow the created/updated objectsBrian Rosner
to be passed to the formsets prior to validation. This is a backward incompatible change for anyone overridding save_add or save_change. They have been removed in favor of more granular methods introduced in [8266] and the new response_add and response_change nethods. save_model has been renamed to save_form due to its slightly changed behavior. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8273 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08Added a few force_unicode() calls around objects in the admin. Required forMalcolm Tredinnick
Python 2.3 compatibility. Patch from nfg. Refs #8151, #8153. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8236 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18Merged the newforms-admin branch into trunk.Brian Rosner
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