Пример #1
0
def send_weibo(sender, instance, **kwargs):
    article = instance
    blog_user = BlogUser.objects.get(user__username=settings.ADMINS[0][0])
    sina_client.set_access_token(blog_user.weibo_access_token, blog_user.weibo_access_token_expires)
    
    if settings.ENABLE_WEIBO_ACCOUNT:
        sync(sina_client, article, 1)
Пример #2
0
def send_tx_weibo(sender, instance, **kwargs):
    article = instance
    
    if settings.ENABLE_QQWEIBO_ACCOUNT:
        sync(tx_client, article, 2)