[Inpycon] Fwd: Re: [BangPypers] Fwd: [PyCon-Organizers] PyCon Twitter Bot

Kenneth Gonsalves lawgon at au-kbc.org
Wed Jul 1 11:24:29 CEST 2009


again this has gone to BangPypers

----------  Forwarded Message  ----------

Subject: Re: [BangPypers] Fwd: [PyCon-Organizers] PyCon Twitter Bot
Date: Wednesday 01 July 2009
From: Kenneth Gonsalves <lawgon at au-kbc.org>
To: "Bangalore Python Users Group - India" <bangpypers at python.org>

On Wednesday 01 July 2009 09:43:49 Kenneth Gonsalves wrote:
> > I just need root ssh access on the inpycon machine. Kenneth,
> > can u send this info to me directly ?
>
> the conference software is a django application. To tweet, all we need to
> do is create a signal on save which will tweet the info to twitter. The
> only thing we need to do is to decide what info we are going to send. For
> example, every time a delegate registers, his name and a link to his info
> could be tweeted. Or when a talk is proposed, a post made, that can be
> tweeted also. AFAIK there is no need to install a bot.

ok - I have written the code. Whenever a delegate registers, this is tweeted 
(if that is the correct term). There are two questions:

1. do we enable it?
2. what information do we send? I would suggest just name with a link to his 
profile.

btw, the code is here:

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'].username))
    
post_save.connect(tweetit, sender=Delegate)

I think even no_mind would concede that django rocks.
-- 
regards
Kenneth Gonsalves
Associate
NRC-FOSS
http://nrcfosshelpline.in/web/

-------------------------------------------------------
-- 
regards
Kenneth Gonsalves
Associate
NRC-FOSS
http://nrcfosshelpline.in/web/


More information about the Inpycon mailing list