Hello,
I'm using django-audit-log 
<https://github.com/SirAnthony/django-audit-log>witch actively creates dynamic 
models by calling type('%sAuditLogEntry' 
% meta_name, (models.Model,), 
attrs)<https://github.com/SirAnthony/django-audit-log/blob/master/audit_log/models/managers.py#L201>.
 
In django 1.5 I getting error when trying to cache it (pickling phase). 
Example error string: Can't pickle <class 
'testproject.models.TestItemAuditLogEntry'>: attribute lookup 
testproject.models.TestItemAuditLogEntry failed. I think it because pickle 
tries to use class name with current environment.
I looked in django sources and found that this 
commit<https://github.com/django/django/commit/146aff3bac974e56ec8cb597c2720d1cd4f77b26>is
 cause of such behaviour. 
I'm not sure it is django bug (I'll write a ticket with test case and 
probably patch, instead), maybe I just need to made some hacks on my side, 
like implement intermediate model with custom __reduce__ like in 1.4 django 
or something alike.


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to