call get_user_model() at run time

setting User = get_user_model() at import time means that you can't call templated-emails from the same models.py that defines your custom user model, since your user model won't be compiled yet in its own models.py.  So if your custom User model does something that sends an email, you're going to get a circular dependency problem as long as templated-emails calls get_user_model() at import time.

We have a User model that wants to send an email confirmation when is_active gets set to True (when the user confirms their email address).  This patch allows us to call templated-emails from our custom User model.

Without this patch, we need to perform the import at run-time every time we want to send an email, which is ugly and slow.

Vielen Dank!