<s> from django . conf import settings <EOL> try : <EOL> import twitter <EOL> except ImportError : <EOL> twitter = None <EOL> def can_tweet ( ) : <EOL> creds_available = ( hasattr ( settings , "<STR_LIT>" ) and <EOL> hasattr ( settings , "<STR_LIT>" ) ) <EOL> return twitter and creds_available </s>
