Preserve .json through redirects

This commit is contained in:
Simon Willison 2017-10-25 08:01:22 -07:00
commit f1b0521810

2
app.py
View file

@ -280,6 +280,8 @@ def resolve_db_name(db_name, **kwargs):
)
if 'table' in kwargs:
should_redirect += '/' + kwargs['table']
if 'as_json' in kwargs:
should_redirect += kwargs['as_json']
return name, expected, should_redirect
return name, expected, None