Hi all, I was trying to adapt AuditTrail [1] to also automatically add generic foreignkey attributes.
The audittrail app now copies all the fields to the audit model, which means the contenttype and objectid are copied perfectly, but I would like to access the referenced object directly from the audit model (as I can on the original model). I am having trouble identifying the attributes from the original model that represent a generic foreignkey. Whatever I try, I get 'AttributeError: object must be accessed via instance'. e.g. type(MyModel.object) does not work but raises the error. Anybody know how get to these generic foreignkeys ? [1]: http://code.djangoproject.com/wiki/AuditTrail --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---