summaryrefslogtreecommitdiff
path: root/tests/admin_views/admin.py
AgeCommit message (Collapse)Author
2014-01-05Removed useless model definitions.Aymeric Augustin
Surprisingly, this commit doesn't change any behavior at all. When a model is defined with the same name as another model in the same app, the definition of the first class is bound to the name of the class regardless of the definition of the second class.
2013-11-25Fixed #20522 - Allowed use of partially validated object in ↵Jay Leadbetter
ModelAdmin.add_view formset validation. Updated ModelAdmin to use form.instance when passing parent model to child inlines for add_view. There is effectively no change in the change_view since the previously passed 'obj' is the same as form.instance. Thanks to meshy for report, and EvilDMP and timo for review.
2013-11-02PEP8Jason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-11-02Fixed all E261 warningscoagulant
2013-10-29Fixed #8261 -- ModelAdmin hook for customising the "show on site" buttonUnai Zalakain
``ModelAdmin.view_on_site`` defines wether to show a link to the object on the admin detail page. If ``True``, cleverness (i.e. ``Model.get_absolute_url``) is used to get the url. If it's a callable, the callable is called with the object as the only parameter. If ``False``, not link is displayed. With the aim of maitaining backwards compatibility, ``True`` is the default.
2013-10-26Fixed all the E203 violationsAlex Gaynor
2013-10-24Start attacking E231 violationsAlex Gaynor
2013-10-23Fixed E225 pep8 warnings.Tim Graham
2013-10-10Fixed "redefinition of unused 'foo' from line X" pyflakes warnings.Tim Graham
2013-10-04Fixed #11277 -- Hid labels of fields with HiddenInput widget in admin forms.Christopher Medrela
Thanks bartTC for the report.
2013-09-16Fixed #17627 -- Renamed util.py files to utils.pyTim Graham
Thanks PaulM for the suggestion and Luke Granger-Brown and Wiktor Kołodziej for the initial patch.
2013-09-07Fixed #21013 -- Ensure that ModelAdmin.get_queryset is considered for the ↵Juan Catalano
admin history view.
2013-08-29Fixed #16433 -- Fixed a help_text/read only field interaction that caused an ↵Tim Graham
admin crash. Thanks chris at cogdon.org for the report and admackin for the patch.
2013-08-19Fixed #20640 -- Avoided NoReverseMatch in get_deleted_objectsRainer Koirikivi
The default delete action resulted in a NoReverseMatch if it were to list any Model with a ModelAdmin with `get_urls` overridden to remove the change url. Catching the error and not displaying the link in that case, as was already done for models with no registered admins. Thanks Keryn Knight for the report.
2013-07-29Removed most of absolute_import importsClaude Paroz
Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
2013-07-18Fixed #20767 -- Fixed ModelAdmin.preserve_filters for namespaced URLs.Loic Bistuer
Thanks Collin Anderson for the report.
2013-05-29Fixed #20331 -- Allowed admin actions to serve StreamingHttpResponsesTim Graham
Thanks Edwin.
2013-05-27Fixed #20182 - admin lookup should treat 0 as False for __isnullTim Graham
Thanks Benjie Chen.
2013-05-19Fixed #15961 -- Modified ModelAdmin to allow for custom search methods.Bozidar Benko
This adds a get_search_results method that users can override to provide custom search strategies. Thanks to Daniele Procida for help with the docs.
2013-03-08Fixed #15363 -- Renamed and normalized to `get_queryset` the methods that ↵Loic Bistuer
return a QuerySet.
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner