Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix code example in pluggable views documentation #579

Merged
merged 1 commit into from

4 participants

@mgax

No description provided.

@travisbot

This pull request fails (merged 11c7461 into 43f4120).

@travisbot

This pull request fails (merged 11c7461 into 43f4120).

@rdegges

+1 for this. I spent hours and hours debugging this trying to get pluggable views working. Was totally counter-intuitive to figure out as well, as the syntax itself looks correct, and looks correct.

Ugh.

@kennethreitz
Collaborator

:cake:

@kennethreitz kennethreitz merged commit ad30470 into mitsuhiko:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 20, 2012
  1. @mgax
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  docs/views.rst
View
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
Something went wrong with that request. Please try again.