The code in this example:
posts.add_url_rule('/', view_func=ListView.as_view('list'))
posts.add_url_rule('/<slug>/', view_func=DetailView.as_view('detail'))
I don't understand the parameter passed in the function as_view
above, what is the purpose of list
and detail
here?