Browse Source

Merge pull request #579 from alex-morega/fix-doc-views

Fix code example in pluggable views documentation
pull/563/merge
Kenneth Reitz 12 years ago
parent
commit
ad30470102
  1. 2
      docs/views.rst

2
docs/views.rst

@ -36,7 +36,7 @@ based view you would do this::
users = User.query.all()
return render_template('users.html', objects=users)
app.add_url_rule('/users/', ShowUsers.as_view('show_users'))
app.add_url_rule('/users/', view_func=ShowUsers.as_view('show_users'))
As you can see what you have to do is to create a subclass of
:class:`flask.views.View` and implement

Loading…
Cancel
Save