1 2 3 4 5 6 7 8 9 10 11 12 | 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)
|
More like this
- twitterize filter by thomasw 3 years, 1 month ago
- twitter_status by zodman 3 years, 8 months ago
- Twitter oAuth example by henriklied 3 years, 2 months ago
- TwitterBackend by hameedullah 3 years ago
- Template tag: Last x twitter msgs of user by coulix 2 years, 10 months ago
Comments