Commit Graph

1633 Commits

Author SHA1 Message Date
Johannes Hoppe 01a294f8f0 Refs #14370 -- Vendored Select2 4.0.3 for use by the admin.
From https://github.com/select2/select2/releases/tag/4.0.3
2017-09-18 13:47:50 -04:00
elky dc37e8846e Fixed #26818 -- Added responsive CSS for the admin. 2017-09-16 19:11:19 -04:00
Mariusz Felisiak 0ec0e5029c Removed unnecessary parens in various code. 2017-09-13 21:20:29 -04:00
Mariusz Felisiak 0214f367bc Merged isinstance() calls. 2017-09-13 15:00:45 -04:00
Tim Graham 6e4c6281db Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."
This reverts commit 550cb3a365
because try/except performs better.
2017-09-07 08:16:21 -04:00
Sergey Fedoseev c309ec0824 Simplified admin.widgets.url_params_from_lookup_dict(). 2017-09-05 09:47:11 -04:00
Tim Graham e5bd585c6e Fixed #28543 -- Prevented ManyToManyField.value_from_object() from being lazy.
Previously, it was a QuerySet which could reevaluate to a new value if the
model's data changes. This is inconsistent with other Field.value_from_object()
methods.

This allows reverting the fix in the admin for refs #27998.
2017-08-31 09:34:44 -04:00
Claude Paroz afc06b5625 Fixed #28536 -- Removed old JS cross-browser utilities 2017-08-28 20:31:09 +02:00
Claude Paroz 8275662a24 Removed lone usage of jQuery in admin's calendar.js 2017-08-26 18:00:44 +02:00
Sergey Fedoseev f2b93b509c Removed unneeded iter() calls.
A few of these were unnecessarily added in 2b281cc35e.
2017-08-23 16:48:29 -04:00
Sergey Fedoseev fac74b84a3 Used OrderedDict.fromkeys() to initialize OrderedDict with None values. 2017-08-23 11:40:17 -04:00
Simon Meers 7bba82453c Fixed #28496 -- Added ModelAdmin.get_changelist_instance(). 2017-08-22 08:17:26 -04:00
bc500 09423db71a Fixed #28472 -- Optimized a jQuery selector in admin's actions.js. 2017-08-08 08:35:57 -04:00
Tim Graham 8df7681d0e Removed unneeded escape filter in templates where autoescaping is enabled. 2017-08-01 10:52:29 -04:00
Sergey Fedoseev 38988f289f Avoided creation of temporary sets. 2017-07-29 10:16:43 -04:00
Tom Forbes 462f1589cd Refs #23919 -- Updated contrib.admin's compress.py to use pathlib. 2017-07-21 10:24:49 -04:00
Johannes Hoppe c19b56f633 Fixed #28377 -- Made combining form Media retain relative asset order.
Thanks Florian Apolloner, Mariusz Felisiak, and Tim Graham for reviews.
2017-07-20 11:06:30 -04:00
Roman Selivanov d4da39685b Fixed #28414 -- Fixed ClearableFileInput rendering as a subwidget of MultiWidget. 2017-07-19 14:28:06 -04:00
Mads Jensen 550cb3a365 Fixed #27818 -- Replaced try/except/pass with contextlib.suppress(). 2017-06-28 14:07:55 -04:00
Lincoln Smith 15b465c584 Fixed #27998 -- Made ManyToManyField changes logged in admin's object history. 2017-06-14 13:07:06 -04:00
Mariusz Felisiak de9294727c Added tel input type to admin CSS. 2017-06-13 16:49:57 -04:00
monotonee 7c4f05fae2 Fixed #28295 -- Made admin's URLify.js trim trailing hyphens. 2017-06-13 14:58:30 -04:00
Paulo 9dc83c356d Fixed #27967 -- Fixed KeyError in admin's inline form with inherited non-editable pk.
Thanks Robin Anupol for the initial report and workaround.
2017-06-12 21:12:54 -04:00
Tim Graham c16aa69101 Factored shared Inline/ModelAdmin.get_fields() logic into BaseModelAdmin.
BaseModelAdmin.get_fields() was previously unused/untested.
2017-06-07 17:11:02 -04:00
kakulukia 525dc283a6 Fixed #28278 -- Fixed invalid HTML for a required AdminFileWidget. 2017-06-06 15:41:23 -04:00
Paulo 4ad2f86284 Fixed #28202 -- Fixed FieldListFilter.get_queryset() crash on invalid input. 2017-06-06 07:54:31 -04:00
Tim Graham 5a52d932ef Replaced Model._get_pk_val() with pk property.
Model.pk was added after _get_pk_val() and many places weren't simplified.
2017-06-05 15:20:34 -04:00
Paulo b7f99f84bc Fixed #28262 -- Fixed incorrect DisallowedModelAdminLookup when a nested reverse relation is in list_filter. 2017-06-05 10:29:54 -04:00
Tim Graham 37520d284e Removed useless hasattr() checks in ModelAdmin checks.
These attributes are defined on BaseModelAdmin and thus should always
be there.
2017-06-02 15:27:15 -04:00
Jon Dufresne 2c69824e5a Refs #23968 -- Removed unnecessary lists, generators, and tuple calls. 2017-06-01 19:08:59 -04:00
Claude Paroz ae2ac4c400 Updated translations from Transifex
Forward port of 02158a785e from stable/1.11.x
2017-05-31 21:43:40 +02:00
Jon Dufresne 21046e7773 Fixed #28249 -- Removed unnecessary dict.keys() calls.
iter(dict) is equivalent to iter(dict.keys()).
2017-05-27 19:08:46 -04:00
Tom 7afb476469 Fixed #28226 -- Replaced use of str.join() with concatenation. 2017-05-27 13:59:05 -04:00
Anton Samarchyan 385cf7091e Fixed #25006 -- Allowed custom time shortcuts in admin's time picker. 2017-05-27 10:50:18 -04:00
Yuichi Fujikawa f8bce94997 Fixed docstring typo in django/contrib/admin/actions.py. 2017-05-25 05:54:51 -04:00
Claude Paroz e7f75b0b14 Fixed #28085 -- Added missing plural forms in en translation catalogs 2017-05-05 21:25:37 +02:00
Claude Paroz 301de774c2 Refs #27795 -- Replaced many force_text() with str()
Thanks Tim Graham for the review.
2017-04-27 09:10:02 +02:00
Jon Dufresne 92bc727271 Replaced temporary lists used for passing arguments with iterables. 2017-04-26 10:54:20 -04:00
Claude Paroz 2dba812d86 Updated contrib translations from Transifex
Forward port of 290b2849f7 from stable/1.11.x
2017-04-04 12:39:02 +02:00
Adonys Alea Boffill a0d29a9abe Fixed #27942 -- Prevented admin from adding "add" buttons to all tables in inlines. 2017-03-30 10:39:59 -04:00
Tim Graham 1fa47dc45a Updated minified admin JavaScript for the latest closure compiler. 2017-03-30 10:06:52 -04:00
Mads Jensen ed0cbc8d8b Refs #23919 -- Removed some Python 2 compatibility code and comments. 2017-03-27 13:12:27 -04:00
Tim Graham 93d0770104 Refs #27919 -- Changed contrib widget's get_context() attrs kwarg to an arg.
Follow up to 075e93c16a.
2017-03-21 10:15:34 -04:00
Josh Schneier 6bc4ff36db Fixed #27897 -- Fixed crash with 'pk' in ModelAdmin.search_filters. 2017-03-15 13:45:18 -04:00
Claude Paroz 540ae68a5c Fixed #27920 -- Restored empty RadioSelect choice producing value=""
Regression in b52c73008a.
Thanks Tim Graham for the review.
2017-03-14 18:23:06 +01:00
Raphael Merx 2a3a0eb092 Fixed #27905 -- Added RelatedFieldWidgetWrapper.value_omitted_from_data(). 2017-03-07 13:56:29 -05:00
Tim Graham 784a53beef Reverted "Fixed #27878, refs #23919 -- Used python3 shebangs."
This reverts commit 4cffa9a1ff.
2017-03-07 10:10:32 -05:00
Anton Samarchyan e88d2dfcf4 Fixed #27475 -- Fixed NonExistentTimeError crash in ModelAdmin.date_hierarchy. 2017-03-06 12:01:31 -05:00
Claude Paroz 8346680e1c Refs #27795 -- Removed unneeded force_text calls
Thanks Tim Graham for the review.
2017-03-04 18:18:21 +01:00
David Szotten d82ee32aac Fixed #27889 -- Fixed incorrect check error if ModelAdmin.ordering refers to 'pk'. 2017-03-02 10:25:05 -05:00