Changes between Version 31 and Version 32 of ModelInheritance
- Timestamp:
- Apr 27, 2006, 4:06:47 AM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ModelInheritance
v31 v32 301 301 302 302 == Mixins == 303 here are two scena iros where mixins would be useful (to me).303 here are two scenarios where mixins would be useful (to me). 304 304 305 305 1. 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. … … 307 307 2. 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 308 308 309 3. row-level-security. I would like to be able to specifify a the permissions of an item in either a tagging-like fashion or as a function of the values in that item. For instance, if an item has a field "approver", and the value is set to "John", then I want John to have read/write permissions on that item. As soon as the approver field is no longer set to "John", John would lo ose his privledge unless it was granted by something else in the item or some default.309 3. row-level-security. I would like to be able to specifify a the permissions of an item in either a tagging-like fashion or as a function of the values in that item. For instance, if an item has a field "approver", and the value is set to "John", then I want John to have read/write permissions on that item. As soon as the approver field is no longer set to "John", John would lose his privilege unless it was granted by something else in the item or some default.