summaryrefslogtreecommitdiff
path: root/django/contrib/admin/util.py
AgeCommit message (Collapse)Author
2015-01-17Removed backwards compatibility shims for "util" modules per deprecation ↵Tim Graham
timeline. refs #17627.
2014-03-08Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warningsClaude Paroz
Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
2013-10-22Removed import * in tests.Tim Graham
Thanks to flake8 path/to/file.py | awk -F ' ' '{ print $5 }' | sort | uniq
2013-09-16Added backwards compatability shims for util modules.Tim Graham
refs #17627
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-03Fixed "indentation is not a multiple of four" pep8 issues.Tim Graham
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-08-19Fixed #20777 -- Admin proxy model deletion regressionAnssi Kääriäinen
Added proxy_models tests by Harm Geerts <github@geertswei.nl>.
2013-07-01Updated tests for deprecation of Option.get_(add|change|delete)_permission.Tim Graham
refs #20642.
2013-05-27Fixed #20182 - admin lookup should treat 0 as False for __isnullTim Graham
Thanks Benjie Chen.
2013-05-21Fixed #17308 -- Enabled the use of short_description on properties in the admin.Wiktor Kolodziej
2013-02-23Fixed #18491 -- deleting a proxy doesn't show warning about cascade deletesHonza Kral
2013-02-05Fixed #19689 -- Renamed `Model._meta.module_name` to `model_name`.Simon Charette
2013-01-21Fixed #18051 -- Allowed admin fieldsets to contain listsClaude Paroz
Thanks Ricardo di Virgilio for the report, Mateus Gondim for the patch and Nick Sandford for the review.
2012-09-28Fixed #18676 -- Allow fast-path deletion of objectsAnssi Kääriäinen
Objects can be fast-path deleted if there are no signals, and there are no further cascades. If fast-path is taken, the objects do not need to be loaded into memory before deletion. Thanks to Jeremy Dunck, Simon Charette and Alex Gaynor for reviewing the patch.
2012-09-24Fixed #18072 -- Made more admin links use reverse() instead of hard-coded ↵Ramiro Morales
relative URLs. Thanks kmike for the report and initial patch for the changelist->edit object view link URL. Other affected links include the delete object one and object history one (in this case the change had been implemented in commit 5a9e127, this commit adds admin-quoting of the object PK in a way similar to a222d6e.) Refs #15294.
2012-09-08Internal refactoring; moving LOOKUP_SEP up one level.Malcolm Tredinnick
In an ideal world, nothing except django.db.models.query should have to import stuff from django.models.sql.*. A few things were needing to get hold of sql.constants.LOOKUP_SEP, so this commit moves it up to django.db.models.constants.LOOKUP_SEP. There are still a couple of places (admin) poking into sql.* to get QUERY_TERMS, which is unfortunate, but a slightly different issue and harder to adjust.
2012-08-29Replaced many smart_bytes by force_bytesClaude Paroz
In all those occurrences, we didn't care about preserving the lazy status of the strings, but we really wanted to obtain a real bytestring.
2012-08-07[py3] Ported django.utils.encoding.Aymeric Augustin
* Renamed smart_unicode to smart_text (but kept the old name under Python 2 for backwards compatibility). * Renamed smart_str to smart_bytes. * Re-introduced smart_str as an alias for smart_text under Python 3 and smart_bytes under Python 2 (which is backwards compatible). Thus smart_str always returns a str objects. * Used the new smart_str in a few places where both Python 2 and 3 want a str.
2012-07-22[py3] Replaced unicode/str by six.text_type/bytes.Aymeric Augustin
2012-07-22[py3] Replaced basestring by six.string_types.Aymeric Augustin
2012-07-22[py3] Removed longs.Aymeric Augustin
2012-07-03Changed a lot of internal code to use 'format_html' where appropriate/possibleLuke Plant
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-04-29Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz
Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29Fixed #17992 -- Added a public API for localtime.Aymeric Augustin
Thanks Bradley Ayers for the report.
2012-04-29Fixed #13196 -- Formatting in admin changelists.Aymeric Augustin
Handled values returned by functions more like field values. In particular, localized dates, times and datetimes properly, and converted datetimes to the current timezone.
2011-11-22Disentangled some parts of the admin ChangeList and ListFilter's internals. ↵Julien Phalip
With this refactoring, the query string lookups are now processed once instead of twice and some bugs (in particular the SimpleListFilter parameter name being mistaken for a model field in some cases) are avoided. Refs #17091. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17145 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-18Fixed #17255 -- Removed "as" prefix from new timezone template filter names ↵Jannis Leidel
for the sake of clarity. Cheers to Aymeric Augustin for bearing with me. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17107 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-18Added support for time zones. Thanks Luke Plant for the review. Fixed #2626.Aymeric Augustin
For more information on this project, see this thread: http://groups.google.com/group/django-developers/browse_thread/thread/cf0423bbb85b1bbf git-svn-id: http://code.djangoproject.com/svn/django/trunk@17106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-01Fixed bug with `__str__` headers in admin changelist have a non-functioning ↵Luke Plant
sort URL git-svn-id: http://code.djangoproject.com/svn/django/trunk@16312 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03Fixed #15512 -- Cleanup of imports in contrib.admin. Thanks to Julien Phalip ↵Russell Keith-Magee
for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15719 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-26Fixed #15424 -- Corrected lookup of callables listed in admin inlines' ↵Ramiro Morales
`readonly_fields` by passing the right ModelAdmin (sub)class instance when instantiating inline forms admin wrappers. Also, added early validation of its elements. Thanks kmike for the report and Karen for the patch fixing the issue. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15650 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-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
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-09Fixed #7539, #13067 -- Added on_delete argument to ForeignKey to control ↵Carl Meyer
cascade behavior. Also refactored deletion for efficiency and code clarity. Many thanks to Johannes Dollinger and Michael Glassford for extensive work on the patch, and to Alex Gaynor, Russell Keith-Magee, and Jacob Kaplan-Moss for review. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14507 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-01Removed dead compatibility code for removed AdminSite.root() method for ↵Carl Meyer
mounting admin urls. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14412 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-17Fixed #13963 -- Use the correct verbose name of a reverse relation field in ↵Jannis Leidel
the admin. Thanks, sfllaw and d0ugal. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14244 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-12Fixed #14425 -- Unused imports in contrib.admin. Thanks robhudson.Chris Beaven
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14175 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-03-15Fixed #12953 -- Ensure that deletion cascades through generic relations. ↵Russell Keith-Magee
Also cleans up the special-casing of generic relations in the deleted object discovery process. Thanks to carljm for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12790 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-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-01Fixed #12654 - Correctly display ForeignKey fields in read-only scenarios. ↵Jannis Leidel
Thanks, minmax. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12366 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10Fixed #12455 -- corrected an oversight in result_headers not honoring ↵Brian Rosner
admin_order_field This finishes some slightly refactoring that went into the admin_list template tags. Thanks to kegan for discovering the oversight. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-09Fixed #12550 -- better handling with choices and null fields when displaying ↵Brian Rosner
read-only values Thanks Jacques Beaurain for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12148 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-01Fixed #12477 - Fields specified in ModelAdmin.readonly_fields now respect ↵Jannis Leidel
Field.verbose_name. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12053 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