Changes between Version 2 and Version 3 of AuditTrail


Ignore:
Timestamp:
Aug 27, 2007, 8:43:54 AM (17 years ago)
Author:
George Vilches <gav@…>
Comment:

minor fix to the big change to test code block.

Legend:

Unmodified
Added
Removed
Modified
  • AuditTrail

    v2 v3  
    2525}}}
    2626
    27 This simple addition will do the rest, allowing you to run `syncdb` and install the audit model. Once it's installed, the following code will work as shown below.  As you will see, `Person.history` becomes a manager that's used to access the audit trail for a particular object.  The type of manager available depends on how you access the audit trail.  From an instance, the audit trail will automatically be filtered to only return results related to that instance.  From the class itself, the results will not be filtered in any way, and is the likely approach for doing reporting across several audited items.
     27This simple addition will do the rest, allowing you to run `syncdb` and install the audit model. Once it's installed, the following code will work as shown below.  As you will see, `Person.history` becomes a manager that's used to access the audit trail for a particular object.  The type of manager available depends on how you access the audit trail.  From an instance, the audit trail will automatically be filtered to only return results related to that instance.  From the model class itself, the results will not be filtered in any way, and is the likely approach for doing reporting across several audited items.
    2828
    2929{{{
     
    4848>>> person.history.count()
    49492
    50 >>> person.history.count()
    51 2L
    5250>>> person2.history.count()
    53 1L
     511
    5452>>> Person.history.count()
    55 3L
     533
    5654}}}
    5755
Back to Top