Permalink
Browse files

updating CHANGELOG AND README for 0.6

  • Loading branch information...
1 parent 0d71f6d commit b6873ffc21c4031754bc8d4a159aa0ea41a021ba @kreneskyp kreneskyp committed Jun 17, 2011
Showing with 35 additions and 4 deletions.
  1. +11 −2 CHANGELOG
  2. +24 −2 README
View
@@ -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
View
26 README
@@ -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.