class based views methods code example Example: Class based views 'function' object has no attribute 'as_view'