incuna/django-user-management — pull request #86 by KevinEtienne (2014-11-27 16:21:51+00:00)
Title: Split mixins between fields and methods

Customising fields on `BasicUserFieldsMixin` is not easy. I have a case where I need to override
`name` and `email`.

My use case:
```python
class User(AvatarMixin, VerifyEmailMixin, PermissionsMixin, AbstractBaseUser):
pass
```

With the current implementation the solution is to copy `VerifyEmailMixin` and its parent class
`BasicUserFieldsMixin` to redefine `name` and `email` fields to avoid name clashes.

It looks like splitting the current mixins to more mixins will allow redefining fields more easily.
I suggest to make `BasicUserFieldsMixin` and `VerifyEmailMixin` children classes of some fields and methods.

Example:
```python
class BasicUserFieldsMixin(IsStaffMixin, NameMixin, NameMethodsMixin):
pass

class VerifyEmailMixin(BasicUserFieldsMixin, IsActiveMixin, EmailVerificationMixin, VerifyEmailMethodsMixin):
pass
```

Which would allow us to create own `BasicUserFieldsMixin` and `VerifyEmailMixin` if one or more fields need changing.