File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ For instance you can write a class like this::
86
86
87
87
And then you can register it like this::
88
88
89
- app.add_url_view ('/about', RenderTemplateView.as_view(
89
+ app.add_url_rule ('/about', view_func= RenderTemplateView.as_view(
90
90
'about_page', template_name='about.html'))
91
91
92
92
Method Hints
@@ -108,7 +108,7 @@ information::
108
108
...
109
109
...
110
110
111
- app.add_url_view ('/myview', MyView.as_view('myview'))
111
+ app.add_url_rule ('/myview', view_func= MyView.as_view('myview'))
112
112
113
113
Method Based Dispatching
114
114
------------------------
@@ -130,7 +130,7 @@ easily do that. Each HTTP method maps to a function with the same name
130
130
user = User.from_form_data(request.form)
131
131
...
132
132
133
- app.add_url_view ('/users/', UserAPI.as_view('users'))
133
+ app.add_url_rule ('/users/', view_func= UserAPI.as_view('users'))
134
134
135
135
That way you also don't have to provide the
136
136
:attr: `~flask.views.View.methods ` attribute. It's automatically set based
You can’t perform that action at this time.
0 commit comments