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., diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 50714114fc..0965a05dad 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -3820,7 +3820,7 @@ documentation to learn how to create your aggregates. currently emulates these features using a text field. Attempts to use aggregation on date/time fields in SQLite will raise ``NotSupportedError``. -.. admonition:: Note +.. admonition:: Empty queryset Aggregation functions return ``None`` when used with an empty ``QuerySet``. For example, the ``Sum`` aggregation function returns ``None`` diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index 41387886c0..005d2d91cd 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -3128,7 +3128,7 @@ Default: ``messages.INFO`` Sets the minimum message level that will be recorded by the messages framework. See :ref:`message levels ` for more details. -.. admonition:: Important +.. admonition:: Avoiding circular imports If you override ``MESSAGE_LEVEL`` in your settings file and rely on any of the built-in constants, you must import the constants module directly to @@ -3183,7 +3183,7 @@ rendered as a CSS class in HTML. If you specify a value, it will extend the default. This means you only have to specify those values which you need to override. See :ref:`message-displaying` above for more details. -.. admonition:: Important +.. admonition:: Avoiding circular imports If you override ``MESSAGE_TAGS`` in your settings file and rely on any of the built-in constants, you must import the ``constants`` module directly to diff --git a/docs/topics/templates.txt b/docs/topics/templates.txt index 6920d2dfcd..df55cccb06 100644 --- a/docs/topics/templates.txt +++ b/docs/topics/templates.txt @@ -396,7 +396,7 @@ here's what Django will look for: When Django finds a template that exists, it stops looking. -.. admonition:: Tip +.. admonition:: Use ``django.template.loader.select_template()`` for more flexibility You can use :func:`~django.template.loader.select_template()` for flexible template loading. For example, if you've written a news story and want