mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #36329 -- Removed non-code custom link text when cross-referencing Python objects.
Thanks Bruno Alla, Sarah Boyce, and Jacob Walls for reviews. Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
This commit is contained in:
@@ -50,8 +50,9 @@ following example will create a formset class to display two blank forms:
|
||||
|
||||
Formsets can be iterated and indexed, accessing forms in the order they were
|
||||
created. You can reorder the forms by overriding the default
|
||||
:meth:`iteration <object.__iter__>` and
|
||||
:meth:`indexing <object.__getitem__>` behavior if needed.
|
||||
:meth:`~object.__iter__` and :meth:`~object.__getitem__` methods if needed.
|
||||
(For more information on implementing these methods, see the
|
||||
:term:`Python documentation on sequences <sequence>`.)
|
||||
|
||||
.. _formsets-initial-data:
|
||||
|
||||
|
||||
@@ -299,14 +299,14 @@ for more information on the model's ``clean()`` hook.
|
||||
Considerations regarding model's ``error_messages``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Error messages defined at the
|
||||
:attr:`form field <django.forms.Field.error_messages>` level or at the
|
||||
Error messages defined at the form field level (
|
||||
:attr:`django.forms.Field.error_messages`) or at the
|
||||
:ref:`form Meta <modelforms-overriding-default-fields>` level always take
|
||||
precedence over the error messages defined at the
|
||||
:attr:`model field <django.db.models.Field.error_messages>` level.
|
||||
precedence over the error messages defined at the model field level
|
||||
(:attr:`django.db.models.Field.error_messages`).
|
||||
|
||||
Error messages defined on :attr:`model fields
|
||||
<django.db.models.Field.error_messages>` are only used when the
|
||||
Error messages defined on model fields
|
||||
(:attr:`django.db.models.Field.error_messages`) are only used when the
|
||||
``ValidationError`` is raised during the :ref:`model validation
|
||||
<validating-objects>` step and no corresponding error messages are defined at
|
||||
the form level.
|
||||
|
||||
Reference in New Issue
Block a user