import twitter from django.db.models.signals import post_save def tweetit(sender,**kwargs): """ extract relevant info and tweet it """ if kwargs['created']: t = twitter.Api(settings.TWITTER_USER, settings.TWITTER_PASSWORD) t.PostUpdate("%s has registered as a delegate" %(kwargs['instance'])) post_save.connect(tweetit, sender=Delegate)