Improved UI for CSV/JSON export, closes #266

This commit is contained in:
Simon Willison 2018-06-17 23:03:22 -07:00
commit 83f4ef7ec7
No known key found for this signature in database
GPG key ID: 17E2DEA2588B7F52
7 changed files with 78 additions and 14 deletions

View file

@ -170,6 +170,13 @@ def validate_sql_select(sql):
raise InvalidSql(msg)
def append_querystring(url, querystring):
op = "&" if ("?" in url) else "?"
return "{}{}{}".format(
url, op, querystring
)
def path_with_added_args(request, args, path=None):
path = path or request.path
if isinstance(args, dict):