fix: no need to parse date ourself, mastodon.py v1.1.0 does it

This commit is contained in:
codl 2017-09-09 00:21:46 +02:00
parent 5a81c2bf14
commit 2f426fe5f7
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
2 changed files with 5 additions and 4 deletions

View File

@ -150,7 +150,7 @@ def post_from_api_object(obj, instance):
favourite=obj['favourited'],
has_media=('media_attachments' in obj
and bool(obj['media_attachments'])),
created_at=iso8601.parse_date(obj['created_at']),
created_at=obj['created_at'],
author_id=account_from_api_object(obj['account'], instance).id,
direct=obj['visibility'] == 'direct',
)

View File

@ -13,9 +13,10 @@ def app(redisdb):
app_.config['REDIS_URI'] = 'redis://localhost:15487'
app_.debug = True
@app_.route('/')
def hello():
return 'Hello, world!'
@app_.route('/', defaults={'name': 'world'})
@app_.route('/<name>')
def hello(name='world'):
return 'Hello, {name}!'.format(name=name)
with app_.app_context():
yield app_