Changes between Initial Version and Version 1 of Ticket #29019, comment 5
- Timestamp:
- May 26, 2018, 9:55:49 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #29019, comment 5
initial v1 3 3 We explored a couple of ideas regarding this during DjangoCon Europe 2018. 4 4 5 The aspect that blocks implementation is the create_superuser function in the default UserManager class that has no support for M2M field data present in **kwargs. Such data would have to be extracted from kwargs and handled after the user.save(..) call, however we did not feel comfortable with proposing code for this solution without prior discussion.5 The aspect that blocks implementation is the create_superuser function in the default UserManager class that has no support for M2M field data present in kwargs. Such data would have to be extracted from kwargs and handled after the user.save(..) call, however we did not feel comfortable with proposing code for this solution without prior discussion. 6 6 7 7 It was found that it is perhaps best simply to warn the user whenever M2M fields have been added to REQUIRED_FIELDS and suggest that in this case, a custom user manager must also be written that handles the data properly. We could not find a safe way to detect whether the default manager has been overridden or whether it would handle the M2M field in the create_superuser function, so this warning has to be marked as ignored manually by the user.