Kaydet (Commit) dbabf439 authored tarafından Andrei Kulakov's avatar Andrei Kulakov Kaydeden (comit) Tim Graham

Updated recommendation for testing keyword arg in custom fields.

üst 29c00733
......@@ -247,7 +247,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
modified ``__init__`` method with the old signature. So if you need a new
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.
.. _using-managers-in-migrations:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment