summaryrefslogtreecommitdiff
path: root/django/contrib/admin
AgeCommit message (Collapse)Author
2014-02-22Added tests and minified javascript missing in ↵Bas Peschier
83a3add4bed8d8d49f93b30c817c66908b0a26ba. Refs #22038.
2014-02-15Split line and added indentation for better readability.Aleksander Budzinski
2014-02-15Fixed some flake8 errors from recent commits.Tim Graham
2014-02-15Fixed #22018 -- Fixed checks for ModelAdmin.fields not handling sub-lists.Aaron France
Flatten a level of sublists before checking for duplicate fields. When given sublists such as: ```python class FooAdmin(admin.ModelAdmin): fields = ('one', ('one', 'two')) ``` The previous code did not correctly detect the duplicated 'one' field. Thanks to jwa for the report.
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-13Removed _actions_icnt declaration from local scope in admin JS.Bas Peschier
Commit 4523fcd introduces _actions_icnt to the local scope, which overrides the value set in the HTML. The admin would incorrectly show selected rows in a change list as "1 of undefined selected".
2014-02-13Fixed #21064 -- Refactored common logic in ModelAdmin.add_view and change_view.Adam Avramov
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-02-10Fixed #21371 -- Added the block.super to admin bodyclass blocks.julien 'pouete' Godin
Thanks Keryn Knight for the report.
2014-02-09Fixed #21382 - Added "has_original" to stacked inlines.Ryan Kaskel
Report and original patch from jrief.
2014-02-09Fixed #21771 -- Made log_deletion consistent with other log methods.Alasdair Nicol
Thanks Keryn Knight for the report.
2014-02-08Fixed #21674 -- Deprecated the import_by_path() function in favor of ↵Berker Peksag
import_string(). Thanks Aymeric Augustin for the suggestion and review.
2014-02-04Removed two imports which are now unusedAlex Gaynor
2014-02-04Removed the this_is_the_login_form hackClaude Paroz
Refs #21911. Now that we have a more traditional login form, we don't need any more a special field telling us we are dealing with the login form.
2014-02-04Fixed #21911 -- Made admin views redirect to login when neededClaude Paroz
Historically, the Django admin used to pass through the request from an unauthorized access to the login view directly. Now we are using a proper redirection, which is also preventing inadvertantly changing data when POSTing login data to an admin view when user is already authorized. Thanks Marc Tamlyn and Tim Graham for the reviews.
2014-02-04Made staff_member_required redirect to loginClaude Paroz
Refs #21911.
2014-02-01Avoided importing models from django.contrib.admin.Aymeric Augustin
Fixed #21923. Refs #21719.
2014-01-25Fixed #21829 -- Added default AppConfigs.Aymeric Augustin
Thanks Russell for the report, Marc for the initial patch, Carl for the final review, and everyone who contributed to the design discussion.
2014-01-24Fixed typo in error message.Arne Brodowski
2014-01-24Fixed #21870 -- Admin check for list_editable_itemArne Brodowski
During the admin check for list_editable _check_list_editable_item should return an empty list if all checks pass. Additionally the Testcase test_readonly_and_editable was changed to test what the name implies instead of duplicating the logic of test_readonly.
2014-01-22Fixed #21846 -- Made NestedObjects handle related_name with %(app_label)s or ↵Loic Bistuer
%(class)s.
2014-01-20Fixed a couple of deprecation warningsAnssi Kääriäinen
2014-01-20Fixed #16905 -- Added extensible checks (nee validation) frameworkRussell Keith-Magee
This is the result of Christopher Medrela's 2013 Summer of Code project. Thanks also to Preston Holmes, Tim Graham, Anssi Kääriäinen, Florian Apolloner, and Alex Gaynor for review notes along the way. Also: Fixes #8579, fixes #3055, fixes #19844.
2014-01-18Fixed #21712 -- Moved autodiscover() to AdminConfig.ready().Aymeric Augustin
Thanks Marc Tamlyn for the initial version of the patch.
2014-01-18Fixed #21659 -- Modified the registration/password_change_form.html admin ↵Tim Graham
template to use {% admin_static %}. Thanks mcella.
2014-01-17Removed some unnecessary __exact operators in filters.Tim Graham
2014-01-06Fixed #21718 -- Renamed has_app to is_installed.Aymeric Augustin
2014-01-05Fixed #21675 -- Added app configs for contrib apps.Aymeric Augustin
2014-01-03Fixed selenium failure.Florian Apolloner
This fixes (at least according to tests on the ci itself) admin_widgets.tests.RelatedFieldWidgetSeleniumFirefoxTests.test_foreign_key_using_to_field (http://ci.djangoproject.com/job/Django/database=mysql_gis,python=python2.7/3792/testReport/junit/admin_widgets.tests/RelatedFieldWidgetSeleniumFirefoxTests/test_foreign_key_using_to_field/) The cause for this issue seems to be that wait_page_loaded was executed before click fired and as such no profile got saved (again just an educated guess, but with this fix I can no longer reproduce it -- fingers crossed).
2014-01-03Revert "Fixed #21227 -- Added workaround for selenium test failures"Florian Apolloner
This reverts commit 08c9ab5a0f564a3ac7803e6a97fae855f2e0524e.
2014-01-03Removed unneeded import.Florian Apolloner
2014-01-03Fixed a few flaky selenium tests.Florian Apolloner
Many thanks go to David Burns (@AutomatedTester) for helping me understand css selectors and pointing me towards the correct selenium methods.
2013-12-30Stopped populating the app registry as a side effect.Aymeric Augustin
Since it triggers imports, it shouldn't be done lightly. This commit adds a public API for doing it explicitly, django.setup(), and does it automatically when using manage.py and wsgi.py.
2013-12-29Replaced Options.object_name.lower() by Options.model_name.Aymeric Augustin
Thanks Simon for the suggestion. Also removed inappropriate lowercasing of app labels in migrations. Unlike model names, they are case sensitive.
2013-12-26Used app_config.verbose_name instead of app_label|capfirst.Aymeric Augustin
An admin view performed the capitalization in the template, unlike all others. Refs #10436.
2013-12-26Removed a few gratuitous lambdas.Aymeric Augustin
2013-12-24Renamed AppCache to Apps.Aymeric Augustin
Also renamed app_cache to apps and "app cache" to "app registry". Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
2013-12-23Used a more translator-friendly format in admin sites.pyClaude Paroz
2013-12-22Used application verbose names in the admin.Aymeric Augustin
2013-12-22Moved apps back in the toplevel django namespace.Aymeric Augustin
Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
2013-12-22Expurged INSTALLED_APPS from code and tests.Aymeric Augustin
Except the app cache code and a few specific tests, of course.
2013-12-22Stop testing for inclusion in INSTALLED_APPS.Aymeric Augustin
Removed some exception masking in the comments app that was harmful and couldn't be preserved easily.
2013-12-22Terminated AppCache._populate() with extreme prejudice.Aymeric Augustin
It was called _populate() before I renamed it to populate(). Since it has been superseded by populate_models() there's no reason to keep it. Removed the can_postpone argument of load_app() as it was only used by populate(). It's a private API and there's no replacement. Simplified load_app() accordingly. Then new version behaves exactly like the old one even though it's much shorter.
2013-12-20Revert "Changed admin/templates/admin/index.html to make <caption> translatable"Aymeric Augustin
This reverts commit a25fe3b65e39ff6f59ac545d7934461be6c13612. It didn't do anything. It merely added to every PO file: msgid "%(name)s" msgstr "%(name)s" Thanks Ramiro Morales for the report at: https://groups.google.com/d/msg/Django-I18N/vc2vQzv80UQ/EuaW38V7X7sJ Conflicts: django/contrib/admin/templates/admin/index.html
2013-12-17Moved the new app cache inside core.Aymeric Augustin
2013-12-17Removed the _-prefix for populate().Aymeric Augustin
Several parts of Django call get_apps() with a comment along this lines of "this has the side effect of calling _populate()". I fail to see how this is better than just calling populate()!
2013-12-17Removed module-level functions for the app cache.Aymeric Augustin
Since the original ones in django.db.models.loading were kept only for backwards compatibility, there's no need to recreate them. However, many internals of Django still relied on them. They were also imported in django.db.models. They never appear in the documentation, except a quick mention of get_models and get_app in the 1.2 release notes to document an edge case in GIS. I don't think that makes them a public API. This commit doesn't change the overall amount of global state but clarifies that it's tied to the app_cache object instead of hiding it behind half a dozen functions.
2013-12-16Fixed #17413 -- Serialization of form errors along with all metadata.Loic Bistuer
2013-12-14Fixed E127 pep8 warnings.Loic Bistuer
2013-12-11Fixed #21510 -- Readded search reset link in changelist search barClaude Paroz
Thanks moritz.pfeiffer at alp-phone.ch for the report and Tim Graham for the initial patch.