def get_auth(self): from weibopy.auth import OAuthHandler from weibopy.oauth import OAuthToken auth = OAuthHandler(settings.SINA_CONSUMER_KEY, settings.SINA_CONSUMER_SECRET) auth.access_token = OAuthToken(self.access_token, self.access_secret) return auth