summaryrefslogtreecommitdiff
path: root/tests/regressiontests/admin_views/models.py
AgeCommit message (Collapse)Author
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner
2012-12-24Expanded tests added when fixing #14529.Ramiro Morales
To make sure changes in 35d1cd0 don't break anything. Refs #19505.
2012-12-04Fixed #19391 -- Oracle specific failure in testsAnssi Kääriäinen
The failure was caused by using None as a choice for a CharField. To avoid Oracle's "" <-> NULL handling the field type was changed to IntegerField.
2012-11-25Fixed #17911 -- Ensure that admin readonly fields' display values are shown ↵Edward Tjörnhammar
in change forms when the raw value is None.
2012-11-19Fixed #18658 -- Improved ModelAdmin.message_user APIPreston Holmes
Thanks to Lowe Thiderman for the patch and tests
2012-09-15Fixed #18530 -- Fixed a small regression in the admin filters where wrongly ↵Julien Phalip
formatted dates passed as url parameters caused an unhandled ValidationError. Thanks to david for the report.
2012-09-08Remove Admin's swallowing of AttributeError (#16655, #18593, #18747)Travis Swicegood
During the new-admin changes, catching of AttributeError was added to the admin. This patch removes that as it's no longer possible to add a value to a ModelAdmin that is not available. Adding an attribute that can not be called causes an ImproperlyConfigured exception to be raised.
2012-08-12[py3] Refactored __unicode__ to __str__.Aymeric Augustin
* Renamed the __unicode__ methods * Applied the python_2_unicode_compatible decorator * Removed the StrAndUnicode mix-in that is superseded by python_2_unicode_compatible * Kept the __unicode__ methods in classes that specifically test it under Python 2
2012-07-21Fixed #10057 -- Ensured that the 'show_delete' context variable in the ↵Julien Phalip
admin's change view actually controls the display of the delete button. Thanks to rajeesh for the report, to patcoll for the patch, and to David Gouldin for the test.
2012-06-19Removed unneeded u prefixesClaude Paroz
2012-06-08Merge pull request #123 from apollo13/ticket18381Aymeric Augustin
Fixed #18381 -- Stopped escaping object ids when passing them to the contenttypes.shortcut view. Thanks apollo13 for the patch and dhepper for the review.
2012-06-07Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.Claude Paroz
Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
2012-06-07Don't escape object ids when passing to the contenttypes.shortcut view.Florian Apolloner
This commit also changes the string pk to string_pk instead of id, to test if the admin uses .pk throughout the codebase.
2012-03-03Fixed #17198 -- Ensured that a deterministic order is used across all ↵Julien Phalip
database backends for displaying the admin change list's results. Many thanks to Luke Plant for the report and general approach, to everyone involved in the design discussions, and to Carl Meyer for the patch review. Refs #16819. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17635 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-19Fixed #13068 (again) -- Corrected the admin stacked inline template to allow ↵Julien Phalip
prepopulated fields to work (Thanks Stanislas Guerra for the report). Also fixed a regression introduced in [16953] where prepopulated fields wouldn't be recognized any more due to the additional "field-" CSS class name prefix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17562 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-09Fixed #17515 -- Added ability to override the template of custom admin ↵Jannis Leidel
FilterSpec classes. Thanks, saxix and Julien Phalip. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17483 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-05Improved on r17454 to ensure that `collapse.js` only gets minified when ↵Julien Phalip
`DEBUG` is `False`. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17455 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-19Stopped unconditionally reversing admin model add/change URLs.Ramiro Morales
Starting with [16857] this could cause HTTP 500 errors when `ModelAdmin.get_urls()` has been customized to the point it doesn't provide these standard URLs. Fixes #17333. Refs #15294. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17237 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-22Fixed #17252 -- Fixed a minor regression introduced by the work in #11868, ↵Julien Phalip
where the default sorted columns wouldn't correctly be visually represented in the changelist table headers if those columns referred to non model fields. Thanks to sebastian for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17143 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-13Refs #17215: Avoid generating 47 leftover tmp dirs during a clean test run.Karen Tracey
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26Fixed #15938 -- Prevented the `max_length` number in the admin ↵Julien Phalip
`prepopulated_fields` javascript to be localized when `USE_THOUSAND_SEPARATOR` is turned on. Thanks to Lev Maximov, Mathieu Agopian and feel. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17033 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13Convert much of the regression tests to use absolute imports. There's still ↵Alex Gaynor
work to be done though. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16976 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-20Improved test isolation of the admin tests and assigned custom admin sites toRamiro Morales
prevent test order dependant failures. This involves introducing usage of `TestCase.urls` and implementing proper admin.py modules for some of the test apps. Thanks Florian Apolloner for finding the issue and contributing the patch. Refs #15294 (it solves these problems so the fix for that ticket we are going to commit doesn't introduce obscure and hard to reproduce test failures when running the Django test suite.) git-svn-id: http://code.djangoproject.com/svn/django/trunk@16856 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12Fixed #16604 -- Use new save_related hook when saving objects on the ↵Jannis Leidel
changelist, too. Thanks, pdeglopper. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16599 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-04Removed superflous commented-out lines.Ramiro Morales
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16502 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-03Fixed #16115 -- Added ModelAdmin.save_related method to be able to do pre- ↵Jannis Leidel
or post-save operations for objects related to the parent object currently displayed. Thanks, Julien Phalip. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16498 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-03Fixed various bugs related to having multiple columns in admin list_display ↵Luke Plant
with the same sort field Thanks to julien for the report Refs #11868 git-svn-id: http://code.djangoproject.com/svn/django/trunk@16319 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-02Fixed #11868 - Multiple sort in admin changelist.Luke Plant
Many thanks to bendavis78 for the initial patch, and for input from others. Also fixed #7309. If people were relying on the undocumented default ordering applied by the admin before, they will need to add 'ordering = ["-pk"]' to their ModelAdmin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16316 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-05Fixed #15964 - Do not order admin actions by descriptionLuke Plant
Thanks to julien for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16162 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-03Fixed #5833 -- Modified the admin list filters to be easier to customize. ↵Jannis Leidel
Many thanks to Honza Král, Tom X. Tobin, gerdemb, eandre, sciyoshi, bendavis78 and Julien Phalip for working on this. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16144 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-22Fixed #11639, #13618 -- Added get_prepopulated_fields method to ModelAdmin ↵Jannis Leidel
and InlineModelAdmin to be able to handle prepopulated fields on a case-by-case basis. Thanks, leanmeandonothingmachine. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16069 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-14Fixed #15609 -- Fixed some 'raise' statements to use the newer style syntax. ↵Adrian Holovaty
Thanks, DaNmarner git-svn-id: http://code.djangoproject.com/svn/django/trunk@15811 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-08Fixed field names that were preventing the tests from running in Oracle.Ian Kelly
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15774 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03Fixed #12475 -- Fixed an edge case with hidden fields in ModelAdmin ↵Jannis Leidel
changelists when used in conjunction with list_display_links or list_editable. Thanks, Simon Meers, Julien Phalip, Karen and master. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15722 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-01Fixed #15517 -- Fixed regression in admin search_fields option introduced in ↵Ramiro Morales
r15526. Thanks Fabian Buechler for the report and fix and Julien Phalip for adding tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15677 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-20Fixed #14529 -- Fixed representation of model names in admin messages after ↵Ramiro Morales
model object changes when the ModelAdmin queryset() uses defer() or only(). Thanks rlaager for report and initial patch, to rasca an julien for help in tracking the problem. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15596 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-19Fixed #11513 -- Ensure that the redirect at the end of an object change ↵Russell Keith-Magee
won't redirect to a page for which the user doesn't have permission. Thanks to rlaager for the report and draft patch, and to Julien Phalip for the final patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15584 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-19Fixed #14355 -- Ensure that help_text is displayed for readonly fields in ↵Russell Keith-Magee
the admin. Thanks to jester for the report, and to alexbmeng, subsume, wamberg and Julien Phalip for ther work on the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15582 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-19Fixed #13126 -- Ensured that individual form errors are displayed when ↵Russell Keith-Magee
errors occur on a list-editable changelist. Thanks to slafs for the report, and to Julien Phalip for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15580 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-08Fixed #10573 -- Corrected autofocus problem in admin when the first widget ↵Russell Keith-Magee
displayed is a multiwidget. Thanks to rduffield for the report, and to Ramiro and Julien Phalip for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15452 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-28Fixed #14880 - raw_id_fields in admin does not work when limit_choices_to ↵Luke Plant
dictionary has value=False Thanks to smallming for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-28Fixed #15103 - SuspiciousOperation with limit_choices_to and raw_id_fieldsLuke Plant
Thanks to natrius for the report. This patch also fixes some unicode bugs in affected code. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15347 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-20Fixed #14672 - Added admin handling for on_delete=PROTECT. Thanks to jtiai ↵Carl Meyer
for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15249 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-12Added tests demonstrating that filtering lookup expression that involve ↵Ramiro Morales
model with inheritance schemes aren't incorrectly blacklisted by the r15031 security fix. Refs. #15032. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15178 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-03Fixed #14999 -- Ensure that filters on local fields are allowed, and aren't ↵Russell Keith-Magee
caught as a security problem. Thanks to medhat for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-23Fix a security issue in the admin. Disclosure and new release forthcoming.Alex Gaynor
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15031 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12Fixed #13607 -- Auto-initialize admin's date hierarchy links intelligently. ↵Jannis Leidel
Thanks, Simon Meers. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14879 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21Fixed #3400 -- Support for lookup separator with list_filter admin option. ↵Honza Král
Thanks to DrMeers and vitek_pliska for the patch! git-svn-id: http://code.djangoproject.com/svn/django/trunk@14674 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21Fixed #11108 -- added ModelAdmin.delete_model, a hook with which to perform ↵Alex Gaynor
custom pre-post delete behavior. Thanks to Florian Apolloner for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14673 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-06Fixed #14012 -- Corrected the handling of the create user popup dialog in ↵Russell Keith-Magee
the admin. Thanks to gk@lka.hu for the report, and Ramiro Morales for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13501 bcc190cf-cafb-0310-a4f2-bffc1f526a37