def can_tweet():
    creds_available = (hasattr(settings, "TWITTER_USERNAME") and
                       hasattr(settings, "TWITTER_PASSWORD"))
    return twitter and creds_available
dataset/ETHPy150Open pinax/pinax-blog/pinax/blog/utils.py/can_tweet/original