def tweet(self):
if can_tweet():
account = twitter.Api(
username=settings.TWITTER_USERNAME,
password=settings.TWITTER_PASSWORD,
)
account.PostUpdate(self.as_tweet())
else:
raise ImproperlyConfigured(
"Unable to send tweet due to either "
"missing python-twitter or required settings."
)
评论列表
文章目录