Changes between Initial Version and Version 1 of Ticket #29019, comment 5


Ignore:
Timestamp:
05/26/2018 09:55:49 AM (11 months ago)
Author:
Lenno Nagel
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29019, comment 5

    initial v1  
    33We explored a couple of ideas regarding this during DjangoCon Europe 2018.
    44
    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.
     5The 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.
    66
    77It 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.
Back to Top