summaryrefslogtreecommitdiff
path: root/tests/admin_views/admin.py
AgeCommit message (Collapse)Author
2015-03-09[1.8.x] Refs #24461 -- Added test/release notes for XSS issue in ↵Baptiste Mispelon
ModelAdmin.readonly_fields This issue was fixed by refs #24464.
2015-02-23[1.8.x] Guaranteed removal of temporary files during tests.Aymeric Augustin
Dropped the DJANGO_TEST_TEMP_DIR environment variable. Before this change, proper removal depended on the developer passing dir=os.environ['DJANGO_TEST_TMP_DIR'] to tempfile functions. Backport of 934400759de817471ff37d736686201d7ae34e82 from master
2015-02-09[1.8.x] Sorted imports with isort; refs #23860.Tim Graham
Backport of 0ed7d155635da9f79d4dd67e4889087d3673c6da from master
2015-01-10Fixed #13165 -- Added edit and delete links to admin foreign key widgets.Simon Charette
Thanks to Collin Anderson for the review and suggestions and Tim for the final review.
2014-12-02Fixed #23934 -- Fixed regression in admin views obj parameter.Kamil Braun
2014-11-25Fixed #23754 -- Always allowed reference to the primary key in the adminSimon Charette
This change allows dynamically created inlines "Add related" button to work correcly as long as their associated foreign key is pointing to the primary key of the related model. Thanks to amorce for the report, Julien Phalip for the initial patch, and Collin Anderson for the review.
2014-10-06Fixed #23604 -- Allowed related m2m fields to be references in the admin.Emmanuelle Delescolle
Thanks Simon Charette for review.
2014-09-26Fixed #8408 -- Added ModelAdmin.show_full_result_count to avoid COUNT() query.Thomas Chaumeny
Thanks lidaobing for the suggestion.
2014-09-08Fixed #23431 -- Allowed inline and hidden references to admin fields.Simon Charette
This fixes a regression introduced by the 53ff096982 security fix. Thanks to @a1tus for the report and Tim for the review. refs #23329.
2014-08-27Fixed #23329 -- Allowed inherited and m2m fields to be referenced in the admin.Simon Charette
Thanks to Trac alias Markush2010 and ross for the detailed reports.
2014-08-27Fixed #13749 -- Added link from admin site to front-end site.areski
Thanks romankrv for the suggestion.
2014-07-14Fixed #22994 -- regression with generic FK + admin list_viewAnssi Kääriäinen
The reason for the regression was that the GenericForeignKey field isn't something meta.get_field_by_name() should return. The reason is that a couple of places in Django expects get_field_by_name() to work this way. It could make sense to return GFKs from get_field_by_name(), but that should likely be done as part of meta refactoring or virtual fields refactoring patches. Thanks to glicerinu@gmail.com for the report and to Tim for working on the issue.
2014-06-13Fixed #6327 -- Added has_module_permission method to BaseModelAdminMaxime Turcotte
Thanks chrj for the suggestion.
2014-05-28Fixed several typos in DjangoAlex Gaynor
2014-04-26Fix many many typos in comments throughout the codebaseAlex Gaynor
2014-04-03Fixed #22218 -- Deprecated django.conf.urls.patterns.Tim Graham
Thanks Carl Meyer for the suggestion and Alex Gaynor and Carl for reviews.
2014-03-25Fixed #22087 -- Made AdminReadonlyField respect ModelForm Meta overrides.Ben Davis
2014-03-22Fixed #22241 -- Selectively added line breaks in admin read-only fieldsClaude Paroz
When content is supposed to contain HTML, we do not try to add line breaks in read-only contents. Thanks Alexander Todorov for the report.
2014-03-03Fixed #22135 -- Added ModelAdmin.get_changeform_initial_data().Greg Chapple
Allows custom behavior for setting initial form data in ModelAdmin. By default, initial data is set via GET params. The new method allows this behavior to be overridden. Thanks egasimus for the suggestion.
2014-02-14Fixed #21924 -- Added the ability to specify a reverse order for ↵Klemens Mantzos
admin_order_field. Thanks Klemens Mantzos for the report and initial patch.
2014-02-11Fixed #2445 -- Allowed limit_choices_to attribute to be a callable.Christopher Adams
ForeignKey or ManyToManyField attribute ``limit_choices_to`` can now be a callable that returns either a ``Q`` object or a dict. Thanks michael at actrix.gen.nz for the original suggestion.
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