I have a block of code that works fine in Django 1.6.10 but does not work 
at all in Django 1.7.3.  I would expect my log statement to print every 
time a Django User is created and this is the behavior in 1.6.10:

import logging

from django.contrib.auth.models import User
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver

log = logging.getLogger(__name__)


class UserProfile(models.Model):
    uuid = models.CharField(max_length=36)
    user = models.OneToOneField(User)


@receiver(post_save, sender=User)
def create_user_profile(sender, instance, created, **kwargs):
    """
    When a new user is created, add a UserProfile
    """
    log.debug('received post save signal: {}'.format(instance))
    if created:
        UserProfile.objects.create(user=instance)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d732a896-d262-4673-8ff0-1080fec68498%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to