Changes between Version 38 and Version 39 of ModelInheritance


Ignore:
Timestamp:
06/10/2006 10:05:51 PM (9 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ModelInheritance

    v38 v39  
    3103101. auditing. I would like to have certain models have a created by/time and last-updated by/time on the record, and possibly a XXX_history table which shows the previous version on that entry when it gets changed.
    311311
    312 One way to implement this very useful and needed functionality may be to have a builtin 'log' model class containing modified_by/time (should be populated withour user input), reason for modification (user comments) ..etc. We can inherit this in our models when necessary and voila! our classes would have an additional myproj_myapp_log table for auditing purposes. This table would contain all the fields of the class before modification with the extra fields from the log class. This log table should additionally be non-editable. Only inserts should be possible. No deletes/modifications. Mysql has an 'archive' table type to facilitate this. Other DBs should have their corresponding types. A History view for an object then could be built in the admin page which lists all modifications to an object from its creation till date - we could list only the attributes that have changed and highlight the changes alone. Modification date filters could be provided. This feature, I think will appeal to many. "Django - The framework with Inbuilt data auditing" - The IT Departments will love this.
     312a. One way to implement this very useful and needed functionality may be to have a inbuilt 'log/history' model class containing modified_by,modified_time (should be populated *without* user input), optional reason for modification (user comments) ..etc. We can inherit this in our models if necessary and voila! our classes would have an additional myproj_myapp_log table for auditing purposes.
     313
     314b. This log table would contain one row per object per modification with all the attributes of the object before modification + the extra fields from the log class. This log table should additionally be non-editable. Only inserts should be possible. No deletes/modifications. Mysql has an 'archive' table type to facilitate this. Other DBs should have their corresponding types.
     315
     316c. A History view for the object then could be built in the admin page which lists all modifications to an object from its creation till date - we could list only the attributes that have changed and highlight the changes alone. Modification date filters could be provided.
     317
     318This feature will appeal to many. "Django - The framework with Inbuilt data auditing" - The IT Departments will love this.
    313319
    3143202. tagging. I would like to 'mark' a model as being taggable, and let the mixin worry about the rest. This I could do now by overriding the many2many field type, but I think a mixing would be nicer
Back to Top