summaryrefslogtreecommitdiff
path: root/docs/ref/contrib
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-04-21 12:03:59 +0200
committerGitHub <noreply@github.com>2023-04-21 12:03:59 +0200
commitc487634c106888effbba680e02269e489ab911a6 (patch)
tree3836f76a931abfe5fd7455571ad5a753d4b634b3 /docs/ref/contrib
parent8ed25d65ea7546fafd808086fa07e7e5bb5428fc (diff)
Added meaningful titles to ..admonition:: directives.
Diffstat (limited to 'docs/ref/contrib')
-rw-r--r--docs/ref/contrib/admin/index.txt10
-rw-r--r--docs/ref/contrib/index.txt2
2 files changed, 6 insertions, 6 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index 636d44c750..d3c3884329 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -327,7 +327,7 @@ subclass::
class FlatPageAdmin(admin.ModelAdmin):
fields = [("url", "title"), "content"]
- .. admonition:: Note
+ .. admonition:: Possible confusion with the ``ModelAdmin.fieldsets`` option
This ``fields`` option should not be confused with the ``fields``
dictionary key that is within the :attr:`~ModelAdmin.fieldsets` option,
@@ -466,7 +466,7 @@ subclass::
For an example see the section :ref:`admin-custom-validation`.
- .. admonition:: Note
+ .. admonition:: Omit the ``Meta.model`` attribute
If you define the ``Meta.model`` attribute on a
:class:`~django.forms.ModelForm`, you must also define the
@@ -480,7 +480,7 @@ subclass::
``fields = []`` in the ``Meta`` class to satisfy the validation on the
``ModelForm``.
- .. admonition:: Note
+ .. admonition:: ``ModelAdmin.exclude`` takes precedence
If your ``ModelForm`` and ``ModelAdmin`` both define an ``exclude``
option then ``ModelAdmin`` takes precedence::
@@ -1786,7 +1786,7 @@ templates used by the :class:`ModelAdmin` views:
kwargs["choices"].append(("ready", "Ready for deployment"))
return super().formfield_for_choice_field(db_field, request, **kwargs)
- .. admonition:: Note
+ .. admonition:: ``choices`` limitations
Any ``choices`` attribute set on the formfield will be limited to the
form field only. If the corresponding field on the model has choices
@@ -1817,7 +1817,7 @@ templates used by the :class:`ModelAdmin` views:
def get_changelist_form(self, request, **kwargs):
return MyForm
- .. admonition:: Note
+ .. admonition:: Omit the ``Meta.model`` attribute
If you define the ``Meta.model`` attribute on a
:class:`~django.forms.ModelForm`, you must also define the
diff --git a/docs/ref/contrib/index.txt b/docs/ref/contrib/index.txt
index a7944e0299..e72260834a 100644
--- a/docs/ref/contrib/index.txt
+++ b/docs/ref/contrib/index.txt
@@ -10,7 +10,7 @@ This code lives in :source:`django/contrib` in the Django distribution. This doc
gives a rundown of the packages in ``contrib``, along with any dependencies
those packages have.
-.. admonition:: Note
+.. admonition:: Including ``contrib`` packages in ``INSTALLED_APPS``
For most of these add-ons -- specifically, the add-ons that include either
models or template tags -- you'll need to add the package name (e.g.,