1
0
mirror of https://github.com/django/django.git synced 2024-12-28 12:06:22 +00:00
Commit Graph

491 Commits

Author SHA1 Message Date
Jacob Walls
f0d0d29f03
Fixed typos in docs. 2021-06-03 07:49:50 +02:00
Hasan Ramezani
1143f3bb5e Fixed #32543 -- Added search_help_text to ModelAdmin. 2021-05-26 10:20:13 +02:00
David Sanders
dacc307d93
Fixed typo in docs/ref/contrib/admin/index.txt. 2021-05-19 07:28:56 +02:00
Raffaele Salmaso
3733ae8957 Fixed #32031 -- Added model class for each model to AdminSite.each_context(). 2021-05-13 06:57:09 +02:00
Mariusz Felisiak
cd74aad90e Refs #32682 -- Renamed use_distinct variable to may_have_duplicates.
QuerySet.distinct() is not the only way to avoid duplicate, it's also
not preferred.
2021-04-27 10:34:47 +02:00
manav014
3119a6deca Fixed #26607 -- Allowed customizing formset kwargs with ModelAdmin.get_formset_kwargs().
Thanks Nick Pope for reviews.
2021-02-15 11:37:35 +01:00
Ramon Saraiva
dcb094abe8 Fixed #32421 -- Made admindocs ModelDetailView show model cached properties. 2021-02-11 06:50:50 +01:00
Matthias Kestenholz
7b3ec6bcc8 Fixed #32371 -- Doc'd jquery.init.js dependency for admin widgets. 2021-01-20 20:32:46 +01:00
Mariusz Felisiak
b7dd89ed53 Removed versionadded/changed annotations for 3.1. 2021-01-14 17:50:04 +01:00
mimi89999
b5cef91a91 Fixed #31259 -- Added admin dark theme. 2021-01-14 08:27:29 +01:00
Nick Pope
9204485396
Fixed #16117 -- Added decorators for admin action and display functions.
Refs #25134, #32099.
2021-01-13 17:19:22 +01:00
Jon Dufresne
ba31b01034
Fixed #31747 -- Fixed model enumeration via admin URLs.
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2021-01-12 14:37:56 +01:00
Matthias Kestenholz
0a802233ec
Fixed #32018 -- Extracted admin colors into CSS variables.
Defined all colors used in the admin CSS as variables. Implemented the
following standardizations and accessibility improvements while at it:

- Improved the contrast of text to not use ratios of less than 3:1 anymore.
- Most hover states already used desaturated and darkened colors.
  Changed object tools to follow the same rule instead of showing the
  primary color on hover.

Various places used similar colors; those have been merged with the goal
of reducing the count of CSS variables. Contrasts have been improved in
a few places.

- Many borders used slightly different colors (e.g. #eaeaea vs. #eee)
- Help texts used #999, this has been changed to --body-quiet-color
  (#666) which has a better contrast.

Introduced fast color transitions on links and buttons.
2021-01-07 10:07:19 +01:00
Hasan Ramezani
bebd4cfa8f
Fixed #32273 -- Doc'd AdminSite.unregister(). 2020-12-16 08:08:49 +01:00
Jan Pieter Waagmeester
991dce4fc5
Corrected docs regarding attributes required for logging in to the admin.
Regression in 939dcff24f.
2020-12-11 23:12:43 +01:00
Hasan Ramezani
55fabc5337
Fixed #32232 -- Fixed typo in docs/ref/contrib/admin/actions.txt. 2020-11-30 10:07:28 +01:00
Nick Pope
300def5c34 Doc'd that admin site booleans are tri-state. 2020-11-14 07:28:13 +01:00
Nick Pope
aa53655e6e
Improved examples in ModelAdmin.list_display docs. 2020-11-14 06:36:40 +01:00
Nick Pope
477c800443
Changed docs and a code comment to use gender-neutral pronouns.
Follow up to e1b7723817.
2020-11-13 22:26:30 +01:00
Mariusz Felisiak
33e91f3ed8 Refs #32038 -- Added note to ModelAdmin.list_filter docs that GenericForeignKeys are not supported. 2020-09-25 10:09:28 +02:00
Enderson Menezes
67e4a9a4b9 Fixed #31909 -- Fixed typo in docs/ref/contrib/admin/index.txt. 2020-08-20 07:34:03 +02:00
Andrzej Bartosiński
eb215da363
Corrected admin.register() signature in docs. 2020-07-29 12:53:11 +02:00
Caio Ariede
d38c34119e Fixed #21528 -- Added note about filtering form field's queryset based on instance to admin docs. 2020-07-13 20:32:57 +02:00
Carlton Gibson
b142bd4a1b Refs #6903 -- Adjusted ModelAdmin.preserve_filters docs. 2020-07-02 20:46:34 +02:00
Alix
26a413507a Fixed #6933 -- Added support for searching against quoted phrases in ModelAdmin.search_fields. 2020-06-18 20:17:20 +02:00
Scott Cranfill
62f1655a64 Fixed #11157 -- Stopped removing stop words in admin's prepopulated_fields.
Co-Authored-By: Andy Chosak <andy@chosak.org>
2020-05-27 12:32:56 +02:00
Jon Dufresne
e341bed606 Refs #31034 -- Documented admin requires django.template.context_processors.request.
Required since d24ba1be7a.

Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2020-05-14 11:00:51 +02:00
Jon Dufresne
05ed7104c0
Fixed numbered list in admin overview docs. 2020-05-13 09:09:07 +02:00
Mariusz Felisiak
4c5236ef93 Removed versionadded/changed annotations for 3.0. 2020-05-13 09:07:51 +02:00
Tom Carrick
d24ba1be7a Fixed #31034 -- Added a navigation sidebar to the admin.
Co-authored-by: elky <elky@users.noreply.github.com>
Co-authored-by: Goetz <goetz.buerkle@gmail.com>
2020-05-11 18:16:38 +02:00
Mariusz Felisiak
30083e0780 Fixed #31485 -- Updated admin's jQuery to 3.5.1. 2020-05-05 11:00:05 +02:00
Nick Pope
058b38b43e
Improved message example in admin actions documentation.
Avoid partial string construction and make use of ``ngettext`` to show
example of how to handle plural variants with translations. Also make
use of ``messages.SUCCESS`` to highlight customizing the style of the
message - in this case it better fits what the message is conveying.
2020-04-16 11:26:33 +02:00
Adam Johnson
3bd29a8a97
Documented default value of InlineModelAdmin.extra. 2020-03-03 09:05:27 +01:00
Mariusz Felisiak
0ac8ac8b0d
Refs #25778 -- Updated some links to HTTPS and new locations. 2020-01-29 09:34:37 +01:00
Federico Jaramillo Martínez
372eaa395f Fixed #28991 -- Added EmptyFieldListFilter class in admin.filters.
Thanks Simon Charette and Carlton Gibson for reviews.

Co-Authored-By: Jonas Haag <jonas@lophus.org>
Co-Authored-By: Christophe Baldy <christophe.baldy@polyconseil.fr>
2020-01-03 07:58:04 +01:00
Mike Hansen
d291c72bf2 Fixed #30585 -- Added {% translate %} and {% blocktranslate %} template tags. 2019-12-18 13:15:38 +01:00
Jon Dufresne
e703b93a65 Fixed #31080 -- Removed redundant type="text/javascript" attribute from <script> tags. 2019-12-11 09:49:54 +01:00
Daniel Fairhead
e651b3095c Fixed #15742 -- Fixed an example of collecting selected objects in ModelAdmin.actions docs.
The queryset argument is already filtered, and request.POST doesn't
contain all selected objects when "Select All" is used.
2019-11-06 12:49:27 +01:00
Tamer Sherif
e3f647f4d5 Refs #10348 -- Doc'd that ModelAdmin ignores list_select_related when QuerySet.select_related() was already called. 2019-10-07 10:38:08 +02:00
Mariusz Felisiak
416c584cab Removed versionadded/changed annotations for 2.2. 2019-09-10 12:01:00 +02:00
Tobias Kunze
4a954cfd11 Fixed #30573 -- Rephrased documentation to avoid words that minimise the involved difficulty.
This patch does not remove all occurrences of the words in question.
Rather, I went through all of the occurrences of the words listed
below, and judged if they a) suggested the reader had some kind of
knowledge/experience, and b) if they added anything of value (including
tone of voice, etc). I left most of the words alone. I looked at the
following words:

- simply/simple
- easy/easier/easiest
- obvious
- just
- merely
- straightforward
- ridiculous

Thanks to Carlton Gibson for guidance on how to approach this issue, and
to Tim Bell for providing the idea. But the enormous lion's share of
thanks go to Adam Johnson for his patient and helpful review.
2019-09-06 13:27:46 +02:00
Dulmandakh
06372a8d27 Fixed #30507 -- Updated admin's jQuery to 3.4.1. 2019-08-23 11:00:16 +02:00
parth
8543647306 Fixed #28831 -- Doc'd that InlineModelAdmin methods' obj argument is the parent object. 2019-05-31 12:35:15 +02:00
Jon Dufresne
97d3321e89 Changed tuple choices to list in docs. 2019-05-15 14:31:42 +02:00
Daniel Musketa
6fd9c9daa6 Fixed #30365 -- Fixed syntax highlighting in SQL examples.
Sphinx interprets some "%[a-z]" in SQL statements as a
"Literal.String.Interpol" which leads to incorrect highlighting.
2019-04-23 12:37:50 +02:00
Hasan Ramezani
917fd9d03f
Fixed #27755 -- Added ModelAdmin.get_inlines() hook. 2019-04-17 07:16:04 +02:00
Jani Tiainen
044cc54420
Fixed #30259 -- Added support for admin_order_field attribute on properties in ModelAdmin.list_display. 2019-03-24 20:43:56 +01:00
Hasan Ramezani
f63811f481 Fixed #29943 -- Doc'd that admin changelist may add pk to ordering. 2019-02-12 21:35:49 -05:00
Tim Graham
ec7e179aeb Removed versionadded/changed annotations for 2.1. 2019-01-17 10:50:25 -05:00
MaximZemskov
3c01fe30f3 Fixed #30097 -- Made 'obj' arg of InlineModelAdmin.has_add_permission() optional.
Restored backwards compatibility after refs #27991.
Regression in be6ca89396.
2019-01-11 18:02:43 -05:00
Tim Graham
682cdf6cab Refs #28205 -- Corrected ModelAdmin.prepopulated_fields docs regarding when they're populated. 2018-11-28 14:48:03 -05:00
Matthias Kestenholz
f9ff1df1da Fixed #29917 -- Stopped collecting ModelAdmin.actions from base ModelAdmins. 2018-11-09 18:52:30 -05:00
Curtis Maloney
c49ea6f591 Refs #20910 -- Replaced snippet directive with code-block. 2018-09-10 13:00:34 -04:00
Rodrigo
939dcff24f Polished the admin overview docs. 2018-08-21 11:35:50 -04:00
Adam Johnson
45086c294d Clarified the values accepted by ModelAdmin.fields. 2018-08-03 16:12:26 -04:00
Claude Paroz
6e78e10549 Added doc links for django.utils.html.escape(). 2018-07-18 11:32:27 -04:00
Carlton Gibson
5b73317181 Fixed #29502 -- Allowed users with the view permission to use autocomplete_fields. 2018-06-18 15:36:20 -04:00
Carlton Gibson
958c7b301e Fixed #29419 -- Allowed permissioning of admin actions. 2018-06-18 15:07:29 -04:00
Carlton Gibson
b30f9b131c Refs #29419, #8936 -- Removed change permission requirement for admin actions.
Partially reverted 825f0beda8.
2018-06-13 14:49:28 -04:00
humbertotm
747ff7a30b Fixed #29385 -- Made admindocs ModelDetailView show model properties.
Original patch by bkaluza. Tests and docs by humbertotm.
2018-06-03 21:00:28 -04:00
Tim Graham
7543ab1f8d Removed versionadded/changed annotations for 2.0. 2018-05-17 11:00:10 -04:00
olivierdalang
825f0beda8 Fixed #8936 -- Added a view permission and a read-only admin.
Co-authored-by: Petr Dlouhy <petr.dlouhy@email.cz>
Co-authored-by: Olivier Dalang <olivier.dalang@gmail.com>
2018-05-16 06:44:55 -04:00
T N
2405833c53 Fixed #29401 -- Updated admin's jQuery to 3.3.1. 2018-05-13 13:02:24 -04:00
Mariusz Felisiak
35319bf12c
Alphabetized imports in various docs.
Follow-up of d97cce3409 and 7d3fe36c62.
2018-05-12 19:37:42 +02:00
Kelly Hogan
9e86185936 Fixed #29351 -- Doc'd that ModelAdmin.prepopulated_fields removes stop words. 2018-05-02 13:15:39 -04:00
Jon Dufresne
be6ca89396 Fixed #27991 -- Added obj arg to InlineModelAdmin.has_add_permission().
Thanks Vladimir Ivanov for the initial patch.
2018-04-04 19:21:50 -04:00
Jon Dufresne
b31a9149e1 Documented InlineModelAdmin.has_(add/change/delete)_permission(). 2018-04-04 14:32:35 -04:00
Tim Graham
5fa4f40f45 Fixed #29227 -- Allowed BooleanField to be null=True.
Thanks Lynn Cyrin for contributing to the patch, and Nick Pope for review.
2018-03-20 12:10:10 -04:00
Tim Graham
4c02e3cda3 Refs #27728 -- Made cosmetic edits to admin template tag template overriding. 2018-03-01 11:45:08 -05:00
Raffaele Salmaso
5cc28dc752 Fixed #27728 -- Allowed overriding admin templatetags templates. 2018-02-28 08:49:40 +01:00
Becky Smith
8116e588db Fixed #17962 -- Added ModelAdmin.get_deleted_objects(). 2018-02-24 20:41:43 -05:00
Jon Dufresne
f5c6fc045a Added backticks around obj argument in admin docs. 2018-02-22 11:15:04 -05:00
Andreas Pelme
e307ff29d2 Fixed #27810 -- Allowed query expressions in admin_order_field. 2018-02-15 21:00:31 -05:00
Alexander Gaevsky
ef2512b2ff Fixed #25790 -- Allowed disable column sorting in the admin changelist.
Thanks Ramiro Morales for completing the patch.
2018-02-07 17:46:28 -05:00
Raffaele Salmaso
da3df5b878 Fixed #8500 -- Allowed overriding the default admin site instance. 2018-02-03 18:51:10 -05:00
Jon Dufresne
ff05de760c Fixed #29038 -- Removed closing slash from HTML void tags. 2018-01-21 02:09:10 -05:00
Дилян Палаузов
a38ae914d8 Fixed #28996 -- Simplified some boolean constructs and removed trivial continue statements. 2018-01-12 12:44:50 -05:00
Vasilis Aggelou
777f216d55 Fixed #15522 -- Added ModelAdmin.delete_queryset() to customize "delete selected objects" deletion. 2018-01-05 18:28:45 -05:00
Tim Graham
6deaddcca3 Fixed #28956 -- Updated admin's jQuery to 3.2.1. 2017-12-26 10:21:05 -05:00
Sam Collins
2d75e74e18 Fixed typo in docs/ref/contrib/admin/index.txt. 2017-12-07 10:52:46 -05:00
Krzysztof Nazarewski
244cc40155 Fixed #26184 -- Allowed using any lookups in ModelAdmin.search_fields.
Thanks Krzysztof Nazarewski for the initial patch.
2017-11-18 19:33:52 -05:00
Tim Graham
abaf0ab4a4
Fixed #28777 -- Clarified the docs for admin.register's args. 2017-11-09 21:21:43 -05:00
Botond Beres
56b364bacc Fixed #28205 -- Doc'd that ModelAdmin.prepopulated_fields only works on add forms. 2017-10-28 13:08:10 -04:00
Tim Graham
5446b72003 Removed versionadded/changed annotations for 1.11. 2017-09-22 12:51:18 -04:00
Sjoerd Job Postmus
df41b5a05d Fixed #28593 -- Added a simplified URL routing syntax per DEP 0201.
Thanks Aymeric Augustin for shepherding the DEP and patch review.
Thanks Marten Kenbeek and Tim Graham for contributing to the code.
Thanks Tom Christie, Shai Berger, and Tim Graham for the docs.
2017-09-20 18:04:42 -04:00
Johannes Hoppe
f13bd32110 Refs #14370 -- Fixed typo in ModelAdmin.autocomplete_fields docs. 2017-09-19 08:51:46 -04:00
Johannes Hoppe
94cd8efc50 Fixed #14370 -- Allowed using a Select2 widget for ForeignKey and ManyToManyField in the admin.
Thanks Florian Apolloner and Tim Graham for review and
contributing to the patch.
2017-09-18 13:48:02 -04:00
Simon Meers
60443e84b3 Fixed #17985 -- Documented ModelAdmin.lookup_allowed(). 2017-09-02 13:54:33 -04:00
Claude Paroz
c651331b34 Converted usage of ugettext* functions to their gettext* aliases
Thanks Tim Graham for the review.
2017-02-07 09:04:04 +01:00
chillaranand
dc165ec8e5 Refs #23919 -- Replaced super(ClassName, self) with super() in docs. 2017-01-25 11:53:05 -05:00
Tim Graham
f6acd1d271 Refs #23919 -- Removed Python 2 notes in docs. 2017-01-18 11:51:29 -05:00
Tim Graham
e27e4c0339 Removed versionadded/changed annotations for 1.10. 2017-01-17 20:52:05 -05:00
Tim Graham
d67a46e104 Refs #25135 -- Removed support for the contrib.admin allow_tags attribute.
Per deprecation timeline.
2017-01-17 20:52:01 -05:00
Tim Graham
a4cc622363 Fixed typos in docs/ref/contrib/admin/index.txt 2017-01-11 19:01:30 -05:00
Henry Dang
6af23a4521 Fixed #27377 -- Clarified that prepopulated_fields doesn't work with OneToOneField. 2016-12-19 08:33:46 -05:00
Javier Rojas
8ab8a8910c Doc'd how ModelAdmin.list_display uses short_description. 2016-12-15 15:57:04 -05:00
Michael Scott
1e629928e9 Fixed #27313 -- Allowed overriding admin popup response template. 2016-12-14 18:10:56 -05:00
Doug Harris
413216fb9f Fixed #27566 -- Clarified overriding ModelAdmin.save_model()/delete_model() docs. 2016-12-08 08:21:59 -05:00
akki
74ed20b49a Replaced "django" with "Django" in spelling_wordlist. 2016-11-15 17:00:50 -05:00
Riccardo Magliocchetti
a4e9e834e3 Fixed ModelAdmin.get_max_num() example if obj is None. 2016-10-17 07:33:38 -04:00