mirror of
https://github.com/django/django.git
synced 2025-07-05 02:09:13 +00:00
[1.2.X] Fixed #14629 -- corrected a misspelling and poor wording in the docs. Thanks to OldTroll for the patch. Backport of [14466].
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14467 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
25452e3aa5
commit
80d6495f6e
@ -1213,11 +1213,11 @@ cannot create another model field called ``author`` in any class that inherits
|
|||||||
from that base class.
|
from that base class.
|
||||||
|
|
||||||
Overriding fields in a parent model leads to difficulties in areas such as
|
Overriding fields in a parent model leads to difficulties in areas such as
|
||||||
initialising new instances (specifying which field is being intialised in
|
initialising new instances (specifying which field is being initialized in
|
||||||
``Model.__init__``) and serialization. These are features which normal Python
|
``Model.__init__``) and serialization. These are features which normal Python
|
||||||
class inheritance doesn't have to deal with in quite the same way, so the
|
class inheritance doesn't have to deal with in quite the same way, so the
|
||||||
difference between Django model inheritance and Python class inheritance isn't
|
difference between Django model inheritance and Python class inheritance isn't
|
||||||
merely arbitrary.
|
arbitrary.
|
||||||
|
|
||||||
This restriction only applies to attributes which are
|
This restriction only applies to attributes which are
|
||||||
:class:`~django.db.models.fields.Field` instances. Normal Python attributes
|
:class:`~django.db.models.fields.Field` instances. Normal Python attributes
|
||||||
@ -1229,4 +1229,3 @@ different database tables).
|
|||||||
|
|
||||||
Django will raise a ``FieldError`` exception if you override any model field
|
Django will raise a ``FieldError`` exception if you override any model field
|
||||||
in any ancestor model.
|
in any ancestor model.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user