Skip to content

Commit

Permalink
updating CHANGELOG AND README for 0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Krenesky committed Jun 17, 2011
1 parent 0d71f6d commit b6873ff
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 4 deletions.
13 changes: 11 additions & 2 deletions CHANGELOG
Expand Up @@ -2,13 +2,22 @@
Changelog
======================================

0.5.1

0.6
---------
* #5811 - 0.5.1 -> 0.6 south migrations
* #3819 - Allow Log entries to store arbitrary data in addition to ForeignKeys to objects
* #3825 - Allow LogActions (types) to register a cache processing function
* #5547 - Move log list formatting out of LogItem formatting
* #6267 - add generic object detail link
* #6279 - Templates are making too many queries to fetch contenttypes


0.5.1
---------
* #3675 - Migrations are not correctly updating LogItem.action_id for mysql


0.5
---------

* Initial release
26 changes: 24 additions & 2 deletions README
Expand Up @@ -63,11 +63,33 @@ Now, that LogAction type can be used whenever that action occurs
>>> log('EDIT', user, some_object)
>>> log('DELETE', user, some_object)

Arbitrary data can also be included with each log entry by including a
dict It is available in the LogAction template as {{data}}. This is
useful for caching information to reduce related queries when rendering
logs

>>> log('MY_ACTION', user, {'my_obj':str(obj1})

The data dict can be automatically populated from objects using a cache
function registered with the LogAction. The cache function recieves the user,
objects, and any data passed to log_Action(). It should return a dict. This
data overwrites manual data, you must merge it manually if you want to use both.

>>> def cache(user, obj1, obj2, obj3, data):
>>> return dict(obj_str=str(obj1))
>>>
>>> LogAction.objects.register('MY_ACTION', 'path/to/my/template.html', cache)

log_action can then be used as normal.

>>> log('MY_ACTION', user, some_object)


See the wiki for more details:
http://code.osuosl.org/projects/django-object-log/wiki

Authors
-------

Object Log was originally implemented at the Oregon
State University Open Source Lab (OSUOSL).
Object Log was implemented at the Oregon State University Open Source Lab
(OSUOSL). The primary author was Peter Krenesky.

0 comments on commit b6873ff

Please sign in to comment.