Browse Source

add missing quotes for dict key in views.rst

pull/2147/head
kamyar 8 years ago
parent
commit
4b14d11447
  1. 2
      docs/views.rst

2
docs/views.rst

@ -228,7 +228,7 @@ registration code::
def register_api(view, endpoint, url, pk='id', pk_type='int'):
view_func = view.as_view(endpoint)
app.add_url_rule(url, defaults={pk: None},
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,

Loading…
Cancel
Save