GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
I'd like to define my own models by extending the classes in account.models. For example, I'd like to provide my own EmailConfirmation model so I can override the send method to do some project specific things with the email templates. Have I overlooked something, or is this currently not possible with django-user-accounts?
Here's one potential way to do it using get_model().
Projects can create their own class with account.EmailConfirmation as the superclass and override what ever methods they need. Then define the new class in the settings file using:
ACCOUNT_EMAIL_CONFIRMATION_MODEL = 'my_app.MyEmailConfirmation'
Overriding models is simply not something supported. This is largely due to Django not providing a mechanism for handling that.
However, you are not out of luck. Recently we added the ability to use hooks to customize email template functionality. See http://django-user-accounts.readthedocs.org/en/latest/settings.html#account-hookset