mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[1.7.x] Updated recommendation for testing keyword arg in custom fields.
Backport of dbabf43920bfd99f0e720c7c20228c17128a2af8 from master
This commit is contained in:
parent
39a8640e30
commit
341a20ff6c
@ -284,7 +284,7 @@ You can't modify the number of positional arguments in an already migrated
|
|||||||
custom field without raising a ``TypeError``. The old migration will call the
|
custom field without raising a ``TypeError``. The old migration will call the
|
||||||
modified ``__init__`` method with the old signature. So if you need a new
|
modified ``__init__`` method with the old signature. So if you need a new
|
||||||
argument, please create a keyword argument and add something like
|
argument, please create a keyword argument and add something like
|
||||||
``assert kwargs.get('argument_name') is not None`` in the constructor.
|
``assert 'argument_name' in kwargs`` in the constructor.
|
||||||
|
|
||||||
Adding migrations to apps
|
Adding migrations to apps
|
||||||
-------------------------
|
-------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user