A Entry in an object’s log.
Return a shortened, generalized version of an action type.
Useful for presenting an image signifying an action type. Example:
>>> print l.action_type
<NoticeType: project_component_added> >>> print l.action_type_short u’added’
Add ActionLog using a set of parameters.
Usage:
al = 'project_component_added'
context = {'component': object}
action_logging(request.user, [object], al , context=context):
Populates a template variable with the log for the given criteria.
Usage:
{% get_log <limit> as <varname> [for object <context_var_containing_user_obj>] %}
Examples:
{% get_log 10 as action_log for_object foo %}
{% get_log 10 as action_log for_user 23 %}
{% get_log 10 as action_log for_user current_user %}
Note that context_var_containing_user_obj can be a hard-coded integer (object ID) or the name of a template context variable containing the user object whose ID you want.
Mar 02, 2010