from django.db import DatabaseError, connection
from django.db.models.signals import post_save
from mezzanine.accounts import get_profile_user_fieldname
from mezzanine.conf import settings
from mezzanine.utils.models import lazy_model_ops


__all__ = ()


if getattr(settings, "AUTH_PROFILE_MODULE", None):

    # This will be called when class_prepared signal has been sent
    # for both the profile and user model.
    def wait_for_models(profile_model, user_model):

        user_field = get_profile_user_fieldname(profile_model, user_model)

        def create_profile(sender, instance, created, **kwargs):
            if created:
                try:
                    kwargs = {str(user_field): instance}
                    profile_model.objects.create(**kwargs)
                except DatabaseError:
                    # User creation in initial syncdb may have been triggered,
                    # while profile model is under migration management and
                    # doesn't exist yet. We close the connection so that it
                    # gets re-opened, allowing syncdb to continue and complete.
                    connection.close()

        post_save.connect(create_profile, sender=user_model, weak=False)

    lazy_model_ops.add(wait_for_models,
                       settings.AUTH_PROFILE_MODULE, settings.AUTH_USER_MODEL)

@@ -145,16 +145,38 @@
 ieldname
+, get_profile_for_user
 %0Afrom me
@@ -618,22 +618,17 @@
 ated, **
-kwargs
+_
 ):%0A     
@@ -691,102 +691,37 @@
     
-kwargs = %7Bstr(user_field): instance%7D%0A                    profile_model.objects.create(**kwargs
+get_profile_for_user(instance
 )%0A  

Use get_profile_for_user() in profile signal handler