Skip to content

Commit

Permalink
change filename
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Auriti committed Nov 12, 2016
1 parent 38faed0 commit 185819f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def post_to_twitter(sender, instance, *args, **kwargs):
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_key, access_secret)
api = tweepy.API(auth)
file = default_storage.open(instance.screenshot, 'rb')
file = default_storage.open(instance.screenshot.file.name, 'rb')
media_ids = api.media_upload(filename=instance.screenshot.file.name, file=file)
params = dict(status=mesg, media_ids=[media_ids.media_id_string])
api.update_status(**params)
Expand Down

0 comments on commit 185819f

Please sign in to comment.