title: Why Django model signals are not working?
body: <p>I am trying to create activity streams of users from their status.</p>
  
  <p>models:</p>
  
  <pre><code>class Status(models.Model):
      body = models.TextField(max_length=200)
      image = models.ImageField(blank=True, null=True, upload_to=get_upload_file_name)
      privacy = models.CharField(max_length=1,choices=PRIVACY, default='F')
      pub_date = models.DateTimeField(auto_now_add=True, auto_now=False)
      user = models.ForeignKey(User)
  
  class Activity(models.Model):
      actor = models.ForeignKey(User)
      action = models.CharField(max_length=100)
      content_type = models.ForeignKey(ContentType)
      object_id = models.PositiveIntegerField()
      content_object = generic.GenericForeignKey('content_type', 'object_id')
      pub_date = models.DateTimeField(auto_now_add=True, auto_now=False)
  </code></pre>
  
  <p>However, although I create a new status, it does not create a new activity from the <code>post_save</code> signal. </p>
  
  <p>signals:</p>
  
  <pre><code>from django.contrib.contenttypes.models import ContentType
  from django.db.models.signals import post_save
  from status.models import Status
  from models import Activity
  
  def create_activity_item(sender, instance, signal, *args, **kwargs):
      if kwargs.get('created', True):
          ctype = ContentType.objects.get_for_model(instance)
  
          if ctype.name == 'Status':
              action = ' shared '
  
              activity = Activity.objects.get_or_create(
                  actor = instance.user,
                  action = action,
                  content_type = ctype,
                  object_id = instance.id,
                  pub_date = instance.pubdate
              )
  
  post_save.connect(create_activity_item, sender=Status)
  </code></pre>
  
  <p>What am I doing wrong? Please help me solve this problem. I will be very much grateful. Thank you.</p>
  
  <p><strong>Update:</strong></p>
  
  <p>However doing like this creates the activity:</p>
  
  <pre><code>@receiver(post_save, sender=Status)
  def create(sender, instance, **kwargs):
      if kwargs.get('created',True):
          ctype = ContentType.objects.get_for_model(instance)
          activity = Activity.objects.get_or_create(
              actor = instance.user,
              action = ' shared ',
              content_type = ctype,
              object_id = instance.id,
              pub_date = instance.pub_date
          )
  </code></pre>
  
  <p>Why doesn't the above works then?</p>