#36963: JSONField("ContactInfo", default=contact_default) i think you need to
discribe more about the passed function
-------------------------------------+-------------------------------------
Reporter: yousef_fadli | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: 6.0
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by shubh-gitpush):
The documentation says that the callable must expect no arguments. Django
invokes it without passing self or cls, defining it as a normal instance
method or class method would not work unless extra wrapping is used.
Therefore, if the callable is defined inside the model class, it would
need to be a @staticmethod, or alternatively be defined at module level.
--
Ticket URL: <
https://code.djangoproject.com/ticket/36963#comment:1>