Commit Graph

1451 Commits

Author SHA1 Message Date
Loek van Gent 0207bdd2d4 Fixed #24474 -- Allowed configuring the admin's empty change list value. 2015-06-04 21:06:26 -04:00
Tim Graham ad0f0daf8c Fixed #24851 -- Fixed crash with reverse one-to-one relation in ModelAdmin.list_display
Forwardport of 2456276b02 from stable/1.8.x
2015-05-28 10:52:50 -04:00
Tim Graham fb94e7b8cf Fixed #24784 -- Fixed visibility regression in admin's FK widget. 2015-05-19 13:01:48 -04:00
Piotr Jakimiak 4157c502a5 Removed unnecessary arguments in .get method calls 2015-05-13 20:51:18 +02:00
Riccardo Magliocchetti bd53db5eab Fixed #24553 -- Added the list of available applications to AdminSite.each_context() 2015-05-11 12:07:36 -04:00
Piotr Jakimiak 34b6b89bd2 Used LogEntry methods to check LogEntry action_flag in __str__ 2015-05-07 21:02:47 -04:00
Samuel Paccoud d084176cc1 Fixed #16609 -- Fixed duplicate admin results when searching nested M2M relations.
This was fixed earlier but only when the M2M relation was at the first
level on the object. This commit fixes the issue even when the M2M is
at deeper levels, such as behind a foreign key.
2015-05-06 09:56:12 -04:00
Adam Zapletal 0894643e40 Fixed #23387 -- Kept "Save as new" button after validation errors in admin.
When "Save as new" is chosen and errors occur, only show the "Save as new"
button and not the other save buttons.

Thanks to Tino de Bruijn for doing the real work on this fix.
2015-05-02 19:41:10 -04:00
Tim Graham 2c3ce26beb Fixed #24676 -- Fixed help text positioning in ``contrib.admin`` filter_* widgets. 2015-05-01 15:32:05 -04:00
Claude Paroz 6aed5cfc6f Updated translations from Transifex
Updates for languages: Indonesian, Belarusian, Persian, and Dutch.
Forward port of cb370f8510 from stable/1.8.x
2015-04-30 14:29:08 +02:00
Curtis Maloney 14ecbd02a3 Removed cases of six.iter* wrapped in a list()
There's absolutely no advantage [and a mild performance hit] to using six.iter*
in these cases.
2015-04-18 23:29:29 +10:00
Riccardo Magliocchetti bcf700b4e3 Removed code duplication between AdminSite.index() and app_index(). 2015-04-15 09:56:22 -04:00
Eric Rouleau d72e0178e9 Fixed #24593 -- Fixed number formatting of readonly IntegerFields in the admin. 2015-04-14 17:49:08 -04:00
Tim Graham 1273a7a0e8 Revert "Fixed #24474 -- Allowed configuring the admin's empty change list value."
This reverts commit 72f769f494.

There are several test failures that need to be fixed.
2015-04-08 20:39:59 -04:00
Loek van Gent 72f769f494 Fixed #24474 -- Allowed configuring the admin's empty change list value. 2015-04-08 20:27:01 -04:00
Claude Paroz 88dfe544f6 Fetched updated contrib translations from Transifex
Forward port of 5483c66f85 from stable/1.8.x
2015-04-01 19:51:50 +02:00
Tim Graham 845817b039 Fixed #24466 -- Added JavaScript escaping in a couple places in the admin.
Thanks Aymeric Augustin and Florian Apolloner for work on the patch.
2015-03-30 19:07:17 -04:00
Caroline Simpson dc5b01ad05 Fixed #18773 -- Added logging for template variable resolving
Added a django.template logger without a default handler. Added
logging if there is an exception while resolving variables in a
template.
2015-03-27 19:19:48 -04:00
Anssi Kääriäinen 8f30556329 Renamed Field.rel attribute to remote_field
Field.rel is now deprecated. Rel objects have now also remote_field
attribute. This means that self == self.remote_field.remote_field.

In addition, made the Rel objects a bit more like Field objects. Still,
marked ManyToManyFields as null=True.
2015-03-25 08:16:12 -04:00
Riccardo Magliocchetti 0decef337f Fixed #24405 -- Made admin related object JavaScript overridable
Consolidated it in one file and move the DOM related stuff to the
template so it is easily overridable. To override the popup behavior
you need to add handlers for the custom events triggered in the
admin_change_form_document_ready template block.
2015-03-24 11:51:37 -04:00
TomV a4a58811b9 Removed redundant model instantiation in contrib.admin; refs #11390. 2015-03-23 10:06:25 -04:00
Karl Hobley aea02ddfb7 Fixed #24490 -- Set LogEntry.change_message when adding an object. 2015-03-20 18:25:06 -04:00
Yair Chuchem eb5ebcc2d0 Fixed #24285 -- Made for_user argument optional for {% get_admin_log %} tag 2015-03-20 08:32:25 -04:00
Loek van Gent 35b3158d52 Fixed #24417 -- Added ModelAdmin.get_list_select_related() 2015-03-19 08:52:28 -04:00
Tim Graham e4a578e70e Fixed #24226 -- Changed admin EMPTY_CHANGELIST_VALUE from (None) to - 2015-03-12 09:40:56 -04:00
Anton Danilchenko 28e8c54d7d Fixed #24467 -- Removed conditional inclusion of actions.js & prepopulate.js.
The JavaScript may be required when using ModelAdmin.get_actions() or
get_prepopulated_fields(). Always including them is the easiest solution.
2015-03-11 20:18:59 -04:00
david 88c605e3e3 Fixed #23993 -- Added form.media to the admin login template. 2015-03-07 12:59:58 +01:00
Tim Graham d61ebc8fed Fixed #19538 -- Removed window.__admin_media_prefix__ from admin templates. 2015-03-05 06:44:16 -05:00
Tim Graham 36a17be9f3 Fixed #24426 -- Displayed admin actions panel when show_full_result_count=False. 2015-03-04 12:00:12 -05:00
Tim Graham fe42bfaaff Used format_html() in contrib.admin.utils for consistency. 2015-03-04 10:26:04 -05:00
Mathias André 85757d0e79 Removed outdated docstring for get_admin_url().
Since a4b8a4b632 the admin
URL returned by get_admin_url() is no longer relative to
the Django admin index page.
2015-03-03 07:46:12 -05:00
Andrei Kulakov 08572e8d12 Fixed #24294 -- Allowed staff_member_required decorator to handle args. 2015-03-02 13:15:34 -05:00
Rolf Jagerman fa9cb5dcdc Fixed #24406 -- Improved SelectFilter js to use click events
The SelectFilter widget used href to execute javascript. This was
problematic if one wishes to customize the widget, since the href
javascript is executed after events are handled. This change modifies
the javascript to use click events to handle button behavior.
2015-02-26 12:50:09 -05:00
Tim Graham 47b35b1844 Fixed #24411 -- Avoided dict key/method clash in admin delete views. 2015-02-25 07:15:56 -05:00
Anssi Kääriäinen f95122e541 Fixed #24381 -- removed ForeignObjectRel opts and to_opts
These cached properies were causing problems with pickling, and in
addition they were confusingly defined: field.rel.model._meta was
not the same as field.rel.opts.

Instead users should use field.rel.related_model._meta inplace of
field.rel.opts, and field.rel.to._meta in place of field.rel.to_opts.
2015-02-23 07:24:43 -05:00
Claude Paroz 1791a7e75a Fixed #15779 -- Allowed 'add' primary key in admin edition
Thanks Marwan Alsabbagh for the report, and Simon Charette and
Tim Graham for the reviews.
2015-02-14 11:19:55 +01:00
Loic Bistuer 18c0aaa912 Fixed #24289 -- Reversed usage of Field.many_to_one and one_to_many.
Thanks Carl Meyer and Tim Graham for the reviews and to all involved
in the discussion.
2015-02-14 02:28:24 +07:00
Tim Graham d64baaef3b Fixed #24333 -- Fixed admin history view crash with non-integer slug. 2015-02-12 14:19:44 -05:00
Collin Anderson 07cfe1bd82 Refs #14497 -- Handled empty readonly admin FileFields 2015-02-11 13:00:56 -05:00
Tim Graham 0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
Aymeric Augustin 27f9ff459b Caught all exceptions raised by Engine.get_default().
In addition to ImproperlyConfigured, Engine.get_default() may also raise
ImportError or other exceptions. It's better to catch all exceptions in
places where the default engine isn't strictly required.
2015-02-05 20:06:18 +01:00
Riccardo Magliocchetti 2be621e44c Fixed #14497 -- Improved admin widget for "read only" FileFields
Based on patch by Adam J Forster, Paul Collins, and Julien.
2015-02-04 09:05:23 -05:00
Tim Graham 327a00f48b Removed InlineAdminForm.field_count()
This method is unused since 337d102b86
2015-02-01 20:13:12 -05:00
seanwestfall 7a90b53d60 Fixed #24053 -- Removed admin CSS & images for IE6 & 7. 2015-01-27 07:48:11 -05:00
Tim Graham 67a76500a5 Removed support for admin validators per deprecation timeline; refs #16905. 2015-01-18 14:43:21 -05:00
Tim Graham 2c9e95639e Removed ModelAdmin.get_formsets() per deprecation timeline; refs #20702. 2015-01-17 18:02:35 -05:00
Collin Anderson a420f83e7d Fixed #24055 -- Keep reference to view class for resolve() 2015-01-17 22:09:10 +07:00
Tim Graham d4ee6cda58 Removed ModelAdmin.declared_fieldsets per deprecation timeline; refs #18681. 2015-01-17 08:40:33 -05:00
Tim Graham 9ce36512fa Removed backwards compatibility shims for "util" modules per deprecation timeline.
refs #17627.
2015-01-17 07:40:12 -05:00
Claude Paroz 53e1423eda Updated en translation catalogs
Forward port of 666c12e52 from stable/1.8.x
2015-01-17 11:19:37 +01:00
Claude Paroz b4ac232907 Fixed #24099 -- Removed contenttype.name deprecated field
This finsishes the work started on #16803.
Thanks Simon Charette, Tim Graham and Collin Anderson for the
reviews.
2015-01-16 20:21:34 +01:00
Aymeric Augustin 3bba4b420e Avoided exceptions in a non-critical check in the admin.
This change makes it possible to configure several Django template
engines in a project and still use the admin. On the flip side the
check is silently skipped when no Django template engine is configured.
2015-01-12 21:01:34 +01:00
Aymeric Augustin a3e783fe11 Deprecated passing a Context to a generic Template.render.
A deprecation path is required because the return type of
django.template.loader.get_template changed during the
multiple template engines refactor.

test_csrf_token_in_404 was incorrect: it tested the case when the
hardcoded template was rendered, and that template doesn't depend on the
CSRF token. This commit makes it test the case when a custom template is
rendered.
2015-01-12 21:01:34 +01:00
Muthiah Annamalai b75c707943 Fixed #24089 -- Added check for when ModelAdmin.fieldsets[1]['fields'] isn't a list/tuple. 2015-01-12 13:47:58 -05:00
Collin Anderson 58833f5197 Made Django's templates get their own LANGUAGE_* variables.
Refs #24117
2015-01-12 10:54:59 -05:00
Simon Charette 07988744b3 Fixed #13165 -- Added edit and delete links to admin foreign key widgets.
Thanks to Collin Anderson for the review and suggestions and Tim for the
final review.
2015-01-10 12:24:52 -05:00
Daniel Pyrathon fb48eb0581 Fixed #12663 -- Formalized the Model._meta API for retrieving fields.
Thanks to Russell Keith-Magee for mentoring this Google Summer of
Code 2014 project and everyone else who helped with the patch!
2015-01-06 19:25:12 -05:00
Daniel Pyrathon 8958170755 Fixed #9104 -- Moved FieldDoesNotExist to core.exceptions 2015-01-02 10:46:04 -05:00
Thomas Tanner 46068d850d Fixed #22295 -- Replaced permission check for displaying admin user-tools 2014-12-31 16:31:59 -05:00
Berker Peksag 32ca159c96 Ignored warnings correctly in test_get_formsets_with_inlines_returns_tuples().
The subclass check in ModelAdmin.get_formsets_with_inlines() wasn't
tested correctly because of the super() call in
EpisodeAdmin.get_formsets().
2014-12-31 08:24:09 -05:00
Aymeric Augustin 9eb4f28e89 Deprecated TEMPLATE_CONTEXT_PROCESSORS. 2014-12-28 17:02:31 +01:00
Aymeric Augustin cf1f36bb6e Deprecated current_app in TemplateResponse and render(_to_response). 2014-12-28 17:02:29 +01:00
Tim Graham 271d4f8f85 Fixed #23948 -- Moved password help text from the template to the form.
Thanks Mithos for the report and patch.
2014-12-26 08:09:12 -05:00
Anssi Kääriäinen f233bf47dd Fixed #21414 -- Removed RelatedObject and deprecated Field.related. 2014-12-23 10:54:25 -05:00
Collin Anderson a58cfe8e71 Upgrade jQuery from 1.11.1 to 1.11.2
refs #23355
2014-12-22 20:32:00 -05:00
Mosson, Andrew b7219c7ba5 Fixed #23497 -- Made admin system checks run for custom AdminSites. 2014-12-17 09:11:46 -05:00
Markus Holtermann aa5ef0d4fc Fixed #23822 -- Added support for serializing model managers in migration
Thanks to Shai Berger, Loïc Bistuer, Simon Charette, Andrew Godwin,
Tim Graham, Carl Meyer, and others for their review and input.
2014-12-15 08:34:15 -05:00
Tim Graham c7a19f4203 Fixed #23857 -- Fixed admin crash with "save as new" and deleting inline.
Thanks amarandon for the report.
2014-12-12 10:24:39 -05:00
Kevin Marsh e2868308bf Fixed template tag braces spacing. 2014-12-12 09:34:18 -05:00
Markus Amalthea Magnuson d4e449d730 Fixed typo in admin deprecation message. 2014-12-11 13:30:31 -05:00
Jon Dufresne 4468c08d70 Fixed #23968 -- Replaced list comprehension with generators and dict comprehension 2014-12-08 07:58:23 -05:00
Berker Peksag 560b4207b1 Removed redundant numbered parameters from str.format().
Since Python 2.7 and 3.1, "{0} {1}" is equivalent to "{} {}".
2014-12-03 14:27:38 -05:00
Kamil Braun 0623f4dea4 Fixed #23934 -- Fixed regression in admin views obj parameter. 2014-12-02 08:42:17 -05:00
Berker Peksag c8dcded930 Fixed #17890 -- Added an extra_context parameter to AdminSite.password_change(). 2014-11-29 10:31:09 -05:00
Simon Charette 3a9aa155e2 Fixed #23915 -- Made sure m2m fields through non-pk to_field are allowed in the admin.
refs #23754, #23862
2014-11-25 15:28:21 -05:00
Simon Charette f9c4e14aec Fixed #23754 -- Always allowed reference to the primary key in the admin
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-11-25 13:26:50 -05:00
Redouane Zait 8e7b384d89 Fixed #23898 -- Added missing context to admin's deleted_selected view.
Thanks Redouane Zait for the report.
2014-11-25 11:22:15 -05:00
Aymeric Augustin 18533fb558 Removed direct references to template-related settings. 2014-11-23 11:54:22 +01:00
Yigit Guler 9dde0a211e Fixed #23793 -- Clarified password reset messages. 2014-11-15 16:29:13 +01:00
averybigant b7a5b6ab86 Fixed #23750 -- Allowed core.checks.register to be used as a function 2014-11-11 16:29:32 +01:00
Veres Lajos a71a2ea756 Fixed typos using https://github.com/vlajos/misspell_fixer 2014-11-03 20:59:30 -05:00
a1tus 2d75515a4c Fixed #23444 -- Deprecated django.contrib.admin.helpers.InlineAdminForm.original_content_type_id 2014-10-23 09:49:24 -04:00
Konrad Świat 06b11b617e Fixed #23616 - Fixed generic relations in ModelAdmin.list_filter.
Thanks ranjur for reporting bug, timgraham for review,
and collinanderson for contributing tips.
2014-10-10 12:10:32 -04:00
Emmanuelle Delescolle a24cf21722 Fixed #23604 -- Allowed related m2m fields to be references in the admin.
Thanks Simon Charette for review.
2014-10-06 08:35:16 -04:00
Claude Paroz d6a15026c4 Updated translations from Transifex
Forward port of e9c8aefbce from stable/1.7.x
2014-09-30 20:55:50 +02:00
Nick Sandford f5cfd09c25 Fixed #7361 -- Added cancel link to admin delete views. 2014-09-30 08:45:04 -04:00
Thomas Chaumeny b2aad7b836 Replaced set([foo, ...]) by {foo, ...} literals. Refs PR 3282.
Thanks Collin Anderson for the review.
2014-09-29 00:01:38 +07:00
Thomas Chaumeny 17557d068c Fixed #8408 -- Added ModelAdmin.show_full_result_count to avoid COUNT() query.
Thanks lidaobing for the suggestion.
2014-09-26 12:12:40 -04:00
Simon Charette 342ccbddc1 Fixed #23431 -- Allowed inline and hidden references to admin fields.
This fixes a regression introduced by the 53ff096982 security fix.

Thanks to @a1tus for the report and Tim for the review.

refs #23329.
2014-09-08 13:49:07 -04:00
Tim Graham 1101467ce0 Limited lines to 119 characters in django/
refs #23395.
2014-09-05 09:22:16 -04:00
Ramiro Morales 3a297d7816 Fixed #23055 -- Made generic admin filter obey ModelAdmin queryset.
Thanks to Trac user synasius and to Ola Sitarska for helping in
identifying the issue and helping with the test case.
2014-08-30 10:07:00 -03:00
Claude Paroz 3a44e20005 Fixed #23374 -- Renamed StaticLiveServerCase to StaticLiveServerTestCase
Refs #20739. Thanks Raphaël Hertzog for the report and the initial
patch.
2014-08-28 08:44:26 +02:00
Simon Charette 3cbb7590cb Fixed #23329 -- Allowed inherited and m2m fields to be referenced in the admin.
Thanks to Trac alias Markush2010 and ross for the detailed reports.
2014-08-27 21:26:53 -04:00
areski a81af7f49d Fixed #13749 -- Added link from admin site to front-end site.
Thanks romankrv for the suggestion.
2014-08-27 08:34:53 -04:00
Erik Romijn cbdda28208 Fixed #23075 -- Added documentation on novalidate attribute and made it default for admin
Thanks to sehmaschine for the report and to Tim Graham for the review.
2014-08-26 14:20:31 +02:00
Tim Graham 7d62fb5957 Fixed #23355 -- Updated admin jQuery to 1.11.1. 2014-08-24 15:26:29 -04:00
Simon Charette 53ff096982 Prevented data leakage in contrib.admin via query string manipulation.
This is a security fix. Disclosure following shortly.
2014-08-20 14:39:40 -04:00
Claude Paroz efa67b897b Fetched translations from Transifex
Forward port of 49280a73ea from stable/1.7.x
2014-08-20 10:22:41 +02:00
areski 3021453285 Fixed #20133 -- Added summary to admin deletion confirmation pages.
Thanks jonash for the suggestion and initial patch.
2014-08-14 13:56:23 -04:00
Tim Graham cf79b57ad0 Fixed #21132 -- Removed the useless app_name argument to AdminSite.
Thanks MarkusH for the report and Florian for review.
2014-08-14 09:05:51 -04:00
Maxime Turcotte 25e06bca57 Fixed #18767 -- Fixed admin calendar for other locales than English.
Refactored openCalendar function from DateTimeShortcuts.js. Now, when
entered manually in the input field, the date will show up correctly on
the calendar for locales that don't use "-" for separator.

Thanks charettes for revivew and Alexey Boriskin for some of the patch.
2014-08-13 20:36:26 -04:00
Trey Hunner 468236889f Removed tabs from an admin CSS file. 2014-08-13 13:02:26 -04:00
areski 3687aa0093 Simplified admin delete confirmation templates using {% elif %}.
Thanks jonash for the initial patch; refs #20133.
2014-08-13 10:27:17 -04:00
Trey Hunner 6868643063 Added newlines to the ends of CSS, HTML, and JavaScript files missing them. 2014-08-12 19:22:09 -04:00
Collin Anderson 85c22dd4c4 Fixed #23262 -- Made SelectFilter2.js move items on enter Key press. 2014-08-12 16:17:00 -04:00
Stanislas Guerra 98e8da3709 Fixed #16311 -- Added a RelatedOnlyFieldListFilter class in admin.filters. 2014-08-04 09:39:02 -04:00
Nick Sandford 9d9f0acd7e Fixed #13163 -- Added ability to show change links on inline objects in admin.
Thanks DrMeers for the suggestion.
2014-07-31 08:07:28 -04:00
Alex Gaynor 037f81fedc Added a newline to appease flake8 2014-07-13 08:35:25 -07:00
Claude Paroz 22b2fb0ba1 Fixed #22939 -- Delayed admin_static backend detection
Thanks generalov for the report.
2014-07-12 18:49:43 +02:00
Anubhav Joshi 011abb7d96 Fixed #19671 -- Added warnings that null and validators are ignored for ManyToManyField.
Thanks Loic Bistuer and Tim Graham for help and review.
2014-07-09 16:01:09 -04:00
Claude Paroz e167e96cfe Fixed #22223 -- Prevented over-escaping URLs in reverse()
And follow more closely the class of characters defined in the
RFC 3986.
Thanks Erik van Zijst for the report and the initial patch, and
Tim Graham for the review.
2014-07-09 09:54:34 +02:00
Daniel Hahler 67f9f385aa Fixed various minor doc typos / references. 2014-07-05 20:26:26 -04:00
Riccardo Magliocchetti 68c9a72e29 Fixed #22894 -- Made admin add related/raw ID fields widgets customizable.
Decoupled behavior and style from the RelatedFieldWidgetWrapper and
ForeignKeyRawIdWidget.
2014-06-26 15:02:42 -04:00
Uriel Corfa bcd2e6c697 Removed 'to_field' from ForeignKey(settings.AUTH_USER_MODEL) in admin's initial migration.
This enables using a custom user model with a primary key with a name
different than 'id'; refs #22889.
2014-06-23 13:13:45 -04:00
Andrew Godwin f047dd2f3e Use __first__ not __latest__ for unknown app dependencies 2014-06-16 09:54:43 -07:00
Andrew Godwin edd9f8a7b2 Fixed #22563: Added migration to admin, fixed a few more loader issues. 2014-06-15 11:25:39 -07:00
Maxime Turcotte 504c89e800 Fixed #6327 -- Added has_module_permission method to BaseModelAdmin
Thanks chrj for the suggestion.
2014-06-13 09:31:40 -04:00
Greg Chapple d8f19bb3b6 Fixed #22792 -- Updated checks for list_display_links in model admin 2014-06-10 09:35:05 -04:00
Claude Paroz 96e4b52ab2 Converted Django scripts to argparse
Refs #19973.
2014-06-09 10:13:37 +02:00
Konstantin Koroviev e560558ecb Fixed #22746 -- Removed background property from pre/code in admin CSS. 2014-06-05 12:03:17 -04:00
Tim Graham 5046c110cf Revert "Fixed #19303 -- Fixed ModelAdmin.formfield_overrides on fields with choices"
This reverts commit 9d1987d767.
2014-06-02 07:05:38 -04:00
Claude Paroz 1a69d276bd Updated translation catalogs 2014-05-19 15:17:35 +02:00
Stas Rudakou ebd70d4d00 Fixed #22266 - quote PK before redirecting away from add_view (django.contrib.admin) 2014-05-16 18:33:17 +02:00
Anders Steinlein 4ef10f245a Fixed #17642 -- Added min_num support to modelformsets, inlines, and the admin.
Thanks Stephen Burrows for work on the patch as well.

Forwardport of 2914f66983 from stable/1.7.x
2014-05-15 07:25:35 -04:00
Ramiro Morales 5ea34f3f86 Restored site header text in password reset view.
It's the one shown when the optional integration described in
https://docs.djangoproject.com/en/dev/ref/contrib/admin/#adding-a-password-reset-feature
is used.

Follow-up to commits 6f470650d0 and 1d42a86ec7, together they fix
different small UI regressions after a962286b74.

Refs #21293.
2014-05-07 23:12:58 -03:00
Alex Gaynor 2bcb8bfc8d Fix many many typos in comments throughout the codebase 2014-04-26 10:18:45 -07:00
Tim Graham b513fa5fc6 Fixed #22195 -- Used constants to define built-in tags for check framework.
Thanks Elvard for the patch.
2014-04-10 08:45:48 -04:00
Tim Graham 3cba90f22a Fixed #21084 -- Used proxy model's content type for admin log entries.
(the previous commit included only the test)
2014-04-07 09:04:49 -04:00
Tim Graham d73d0e071c Fixed #22218 -- Deprecated django.conf.urls.patterns.
Thanks Carl Meyer for the suggestion and Alex Gaynor and Carl for reviews.
2014-04-03 07:28:10 -04:00
Tim Graham 981b864fbd Replaced urllib/urlparse imports with from django.utils.six.moves. 2014-03-31 07:54:22 -04:00
Loic Bistuer 4339e9a92d Fixed #21795 -- Made add_preserved_filters account for url prefixes.
Thanks to trac username honyczek for the report. Refs #6903.
2014-03-31 07:19:59 -04:00
Alex Gaynor 778ce245dd Corrected many style guide violations that the newest version of flake8 catches 2014-03-30 12:11:05 -07:00
Tim Graham ed4c2e1c0d Fixed #22329 -- Used label_tag() in some admin auth templates.
refs #17922.
2014-03-29 08:54:56 -04:00
Maxime Turcotte 5e4e0b6fe9 Fixed #22306 -- Deprecated future versions of cycle and firstof template tags. 2014-03-28 18:55:06 -04:00
Ben Davis 16afffffe8 Fixed #22087 -- Made AdminReadonlyField respect ModelForm Meta overrides. 2014-03-25 09:33:13 -04:00
Ramiro Morales 491419b5ff Made m2m fields form help_text munging specific to admin widgets.
Refs #9321 and follow-up to e80de93af6.
2014-03-22 15:43:17 -03:00
Claude Paroz c94bff2b26 Fixed #22241 -- Selectively added line breaks in admin read-only fields
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-22 17:00:50 +01:00
Tim Graham 274048351a Removed reading of legacy admin popup GET parameter.
refs #20288.
2014-03-21 11:35:33 -04:00
Tim Graham bcc15e2b21 Removed backward compatible shims to rename get_query_set and similar queryset methods.
Also removed the backward compatible shims introduced to rename the
attributes ChangeList.root_query_set and ChangeList.query_set.
2014-03-21 07:47:25 -04:00
Tim Graham 6f470650d0 Fixed #21293 -- Adjusted admin header CSS to fix admin password reset template.
By removing the absolute positioning of the usertools div and using
float positioning, the #header div will expand based on the height of
its content.

Thanks EvilDMP for the report.
2014-03-11 06:56:27 -04:00
Aymeric Augustin 7339f43c71 Prevented admin from importing auth.User.
Since we don't enforce order between apps, root packages of contrib apps
cannot import models from unrelated apps.

Fix #22005, refs #21719.
2014-03-09 20:29:00 +01:00
Claude Paroz 210d0489c5 Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warnings
Thanks Anssi Kääriäinen for the idea and Simon Charette for the
review.
2014-03-08 09:57:40 +01:00
Russell Keith-Magee 70ec4d776e Fixed #22034 -- Added a specific set of relation checks for GenericInlineModelAdmin.
Thanks to jwa for the report.
2014-03-08 11:25:23 +08:00
James Jenkins ec675ed6cc Fixed #22070 -- Changed verbose_name for apps in django.contrib to use title case
Thanks bendavis78 for the report.
2014-03-06 18:43:04 -05:00
Baptiste Mispelon 20948612c7 Fixed issues and added new scripts to urlify.js
Added the following scripts:
* Lithuanian (thanks to petraszd for the patch)
* Serbian (thanks to offy)
* Azerbajani (thanks to Ali Ismayilov)

Fixed the following issues:
* In Polish character map, some uppercase letters were
  converted to a lowercase ascii equivalent.
* The letter Y with a diaeresis had a lowercase version but no uppercase.

The code was also simplified and cleaned up:
* Use of `var` statements everywhere
* Systematic use of semicolons
* Proper looping over arrays and objects.

Thanks to @oinopion for his help in getting the javascript
into proper shape.

Fixes #8561, #11035.
2014-03-06 00:14:27 +01:00
Gabe Jackson b77f26313c Fixed #22207 -- Added support for GenericRelation reverse lookups
GenericRelation now supports an optional related_query_name argument.
Setting related_query_name adds a relation from the related object back to
the content type for filtering, ordering and other query operations.

Thanks to Loic Bistuer for spotting a couple of important issues in
his review.
2014-03-05 22:37:53 +02:00
Russell Keith-Magee 20da67d325 Cleaned up a repr() hack that caused problems on Python3. 2014-03-04 09:50:09 +08:00
Rodolfo Carvalho 0d91225892 Fixed many typos in comments and docstrings.
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03 07:38:09 -05:00
Greg Chapple 6acaa52386 Fixed #22135 -- Added ModelAdmin.get_changeform_initial_data().
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-03-03 07:28:24 -05:00
Russell Keith-Magee 3c5fc708f1 Edited contrib.admin check messages for grammar and consistency. 2014-03-03 13:27:17 +08:00