Change docs to use f-strings

This commit is contained in:
erfanio 2019-10-26 17:19:00 +11:00
parent 8f422d2b5e
commit 07caa44224
7 changed files with 13 additions and 13 deletions

View file

@ -231,7 +231,7 @@ registration code::
app.add_url_rule(url, defaults={pk: None},
view_func=view_func, methods=['GET',])
app.add_url_rule(url, view_func=view_func, methods=['POST',])
app.add_url_rule('%s<%s:%s>' % (url, pk_type, pk), view_func=view_func,
app.add_url_rule(f'{url}<{pk_type}:{pk}>', view_func=view_func,
methods=['GET', 'PUT', 'DELETE'])
register_api(UserAPI, 'user_api', '/users/', pk='user_id')