Special Views¶
Subclasses of cwf.views.base.View
that override the cwf.views.base.View.execute()
method.
The execute
method is used to get a view for the target
to render and call it.
These classes overwrite this behaviour to restrict or modify the result of calling the target.
Staff View¶
-
class
cwf.views.views.
StaffView
[source]¶ Restrict to staff members
-
execute
(target, request, args, kwargs)[source]¶ Use the django provided staff_member_required decorator to ensure only staff members can access any target on this class.
-
Local Only View¶
JSView¶
-
class
cwf.views.views.
JSView
[source]¶ Convert target output into a json response
-
execute
(target, request, args, kwargs)[source]¶ Assume the result of calling the target returns
(template, data)
.Proceed to return the data as a
json response
-